diff --git a/VERSION.txt b/VERSION.txt index b19b52118..85f7059bb 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -v0.8.0 +v0.8.1 diff --git a/chart/jenkins-operator/README.md b/chart/jenkins-operator/README.md index e61ec2f6f..046726645 100644 --- a/chart/jenkins-operator/README.md +++ b/chart/jenkins-operator/README.md @@ -98,7 +98,7 @@ Kubernetes native operator which fully manages Jenkins on Kubernetes | jenkins.volumes[0].persistentVolumeClaim.claimName | string | `"jenkins-backup"` | | | operator.affinity | object | `{}` | | | operator.fullnameOverride | string | `""` | | -| operator.image | string | `"quay.io/jenkins-kubernetes-operator/operator:v0.8.0"` | | +| operator.image | string | `"quay.io/jenkins-kubernetes-operator/operator:v0.8.1"` | | | operator.imagePullPolicy | string | `"IfNotPresent"` | | | operator.imagePullSecrets | list | `[]` | | | operator.nameOverride | string | `""` | | diff --git a/chart/jenkins-operator/values.yaml b/chart/jenkins-operator/values.yaml index 2ecdb5796..a17dc8844 100644 --- a/chart/jenkins-operator/values.yaml +++ b/chart/jenkins-operator/values.yaml @@ -312,7 +312,7 @@ operator: replicaCount: 1 # image is the name (and tag) of the Jenkins Operator image - image: quay.io/jenkins-kubernetes-operator/operator:v0.8.0 + image: quay.io/jenkins-kubernetes-operator/operator:v0.8.1 # imagePullPolicy defines policy for pulling images imagePullPolicy: IfNotPresent diff --git a/docs/404.html b/docs/404.html deleted file mode 100644 index 6e3813253..000000000 --- a/docs/404.html +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -404 Page not found | Jenkins Operator - - - - - - - - - - - - - - - - - - - - - -
- - - -
-
-
- -
-
-

Not found

-

Oops! This page doesn't exist. Try going back to our home page.

- -

You can learn how to make a 404 page like this in Custom 404 Pages.

-
-
- -
- - - - -
- - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/about/index.html b/docs/about/index.html deleted file mode 100644 index 6ee76b521..000000000 --- a/docs/about/index.html +++ /dev/null @@ -1,166 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - -What's the Jenkins Operator? | Jenkins Operator - - - - - - - - - - - - - - - - - - - - - -
- - - -
-
-
- - - - - - - - -
-
- -
-Jenkins Operator is a Kubernetes native operator which fully manages Jenkins on Kubernetes.
It was built with immutability and declarative configuration as code in mind. -
-
-
-
- - - - - - - - -
-
-
- -
- Logo -
-
-

The main reason why we decided to develop the Jenkins Operator is the fact that we faced a lot of problems with standard Jenkins deployment. We want to make Jenkins more robust, suitable for dynamic and multi-tenant environments.

-

-
- Some of the problems we want to solve: -

    -
  • Installing plugins with incompatible versions or security vulnerabilities
  • -
  • Better configuration as code
  • -
  • Lack of end to end tests
  • -
  • Handling graceful shutdown properly
  • -
  • Security and hardening out of the box
  • -
  • Orphaned jobs with no jnlp connection
  • -
  • Making errors more visible for end users
  • -
-

- -
-
-
-
- - - -
- - - - -
- - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/about/index.xml b/docs/about/index.xml deleted file mode 100644 index 5073abfa8..000000000 --- a/docs/about/index.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - Jenkins Operator – What's the Jenkins Operator? - https://jenkinsci.github.io/kubernetes-operator/about/ - Recent Hugo news from gohugo.io - Hugo -- gohugo.io - - https://jenkinsci.github.io/kubernetes-operator/img/hugo.png - GoHugo.io - https://jenkinsci.github.io/kubernetes-operator/about/ - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/blog/2018/01/04/another-great-release/index.html b/docs/blog/2018/01/04/another-great-release/index.html deleted file mode 100644 index cb1ea0081..000000000 --- a/docs/blog/2018/01/04/another-great-release/index.html +++ /dev/null @@ -1,684 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Another Great Release | Jenkins Operator - - - - - - - - - - - - - - - - - - - - - - - - - - - - Another Great Release | Jenkins Operator - - -
- - - -
-
-
-
-
- - - - - -
- - - - -
- - - - -
- -
- - RSS - - -
-

Another Great Release

-
A short lead description about this content page. Text here can also be bold or italic and can even be split over multiple paragraphs.
- - - -

Text can be bold, italic, or strikethrough. Links should be blue with no underlines (unless hovered over).

- -

There should be whitespace between paragraphs. There should be whitespace between paragraphs. There should be whitespace between paragraphs. There should be whitespace between paragraphs.

- -

There should be whitespace between paragraphs. There should be whitespace between paragraphs. There should be whitespace between paragraphs. There should be whitespace between paragraphs.

- -
-

There should be no margin above this first sentence.

- -

Blockquotes should be a lighter gray with a border along the left side in the secondary color.

- -

There should be no margin below this final sentence.

-
- -

First Header

- -

This is a normal paragraph following a header. Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong. Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong. Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.

- -

Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.

- -

On big screens, paragraphs and headings should not take up the full container width, but we want tables, code blocks and similar to take the full width.

- -

Lorem markdownum tuta hospes stabat; idem saxum facit quaterque repetito -occumbere, oves novem gestit haerebat frena; qui. Respicit recurvam erat: -pignora hinc reppulit nos aut, aptos, ipsa.

- -

Meae optatos passa est Epiros utiliter Talibus niveis, hoc lata, edidit. -Dixi ad aestum.

- -

Header 2

- -
-

This is a blockquote following a header. Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.

-
- -

Header 3

-
This is a code block following a header.
-

Header 4

- -
    -
  • This is an unordered list following a header.
  • -
  • This is an unordered list following a header.
  • -
  • This is an unordered list following a header.
  • -
- -
Header 5
- -
    -
  1. This is an ordered list following a header.
  2. -
  3. This is an ordered list following a header.
  4. -
  5. This is an ordered list following a header.
  6. -
- -
Header 6
- - - - - - - - - - - - - - - - - - - - - - - - - -
WhatFollows
A tableA header
A tableA header
A tableA header
- -
- -

There’s a horizontal rule above and below this.

- -
- -

Here is an unordered list:

- -
    -
  • Salt-n-Pepa
  • -
  • Bel Biv DeVoe
  • -
  • Kid ‘N Play
  • -
- -

And an ordered list:

- -
    -
  1. Michael Jackson
  2. -
  3. Michael Bolton
  4. -
  5. Michael Bublé
  6. -
- -

And an unordered task list:

- -
    -
  • -
  • -
  • -
- -

And a “mixed” task list:

- -
    -
  • -
  • ?
  • -
  • -
- -

And a nested list:

- -
    -
  • Jackson 5 - -
      -
    • Michael
    • -
    • Tito
    • -
    • Jackie
    • -
    • Marlon
    • -
    • Jermaine
    • -
  • -
  • TMNT - -
      -
    • Leonardo
    • -
    • Michelangelo
    • -
    • Donatello
    • -
    • Raphael
    • -
  • -
- -

Definition lists can be used with Markdown syntax. Definition terms are bold.

- -
-
Name
-
Godzilla
-
Born
-
1952
-
Birthplace
-
Japan
-
Color
-
Green
-
- -
- -

Tables should have bold headings and alternating shaded rows.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ArtistAlbumYear
Michael JacksonThriller1982
PrincePurple Rain1984
Beastie BoysLicense to Ill1986
- -

If a table is too wide, it should scroll horizontally.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ArtistAlbumYearLabelAwardsSongs
Michael JacksonThriller1982Epic RecordsGrammy Award for Album of the Year, American Music Award for Favorite Pop/Rock Album, American Music Award for Favorite Soul/R&B Album, Brit Award for Best Selling Album, Grammy Award for Best Engineered Album, Non-ClassicalWanna Be Startin’ Somethin’, Baby Be Mine, The Girl Is Mine, Thriller, Beat It, Billie Jean, Human Nature, P.Y.T. (Pretty Young Thing), The Lady in My Life
PrincePurple Rain1984Warner Brothers RecordsGrammy Award for Best Score Soundtrack for Visual Media, American Music Award for Favorite Pop/Rock Album, American Music Award for Favorite Soul/R&B Album, Brit Award for Best Soundtrack/Cast Recording, Grammy Award for Best Rock Performance by a Duo or Group with VocalLet’s Go Crazy, Take Me With U, The Beautiful Ones, Computer Blue, Darling Nikki, When Doves Cry, I Would Die 4 U, Baby I’m a Star, Purple Rain
Beastie BoysLicense to Ill1986Mercury RecordsnoawardsbutthistablecelliswideRhymin & Stealin, The New Style, She’s Crafty, Posse in Effect, Slow Ride, Girls, (You Gotta) Fight for Your Right, No Sleep Till Brooklyn, Paul Revere, Hold It Now, Hit It, Brass Monkey, Slow and Low, Time to Get Ill
- -
- -

Code snippets like var foo = "bar"; can be shown inline.

- -

Also, this should vertically align with this and this.

- -

Code can also be shown in a block element.

-
foo := "bar";
-bar := "foo";
-

Code can also use syntax highlighting.

-
func main() {
-  input := `var foo = "bar";`
-
-  lexer := lexers.Get("javascript")
-  iterator, _ := lexer.Tokenise(nil, input)
-  style := styles.Get("github")
-  formatter := html.New(html.WithLineNumbers())
-
-  var buff bytes.Buffer
-  formatter.Format(&buff, style, iterator)
-
-  fmt.Println(buff.String())
-}
Long, single-line code blocks should not wrap. They should horizontally scroll if they are too long. This line should be long enough to demonstrate this.
-

Inline code inside table cells should still be distinguishable.

- - - - - - - - - - - - - - - - - - - - -
LanguageCode
Javascriptvar foo = "bar";
Rubyfoo = "bar"{
- -
- -

Small images should be shown at their actual size.

- -

- -

Large images should always scale down and fit in the content container.

- -

- -

Components

- -

Alerts

- -

- -

- - - - - - - - - - - - - - - - -

- -

Sizing

- -

Add some sections here to see how the ToC looks like. Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.

- -

Parameters available

- -

Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.

- -

Using pixels

- -

Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.

- -

Using rem

- -

Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.

- -

Memory

- -

Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.

- -

RAM to use

- -

Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.

- -

More is better

- -

Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.

- -

Used RAM

- -

Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.

-
This is the final element on the page and there should be no margin below this.
- - - - -
- - -
-
-
- - - - -
- - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/blog/2018/10/06/easy-documentation-with-docsy/featured-sunset-get.png b/docs/blog/2018/10/06/easy-documentation-with-docsy/featured-sunset-get.png deleted file mode 100644 index db3373c0b..000000000 Binary files a/docs/blog/2018/10/06/easy-documentation-with-docsy/featured-sunset-get.png and /dev/null differ diff --git a/docs/blog/2018/10/06/easy-documentation-with-docsy/featured-sunset-get_hu69849a7cdb847c2393a7b3a7f6061c86_387442_250x125_fill_catmullrom_smart1_2.png b/docs/blog/2018/10/06/easy-documentation-with-docsy/featured-sunset-get_hu69849a7cdb847c2393a7b3a7f6061c86_387442_250x125_fill_catmullrom_smart1_2.png deleted file mode 100644 index 30df1c3e1..000000000 Binary files a/docs/blog/2018/10/06/easy-documentation-with-docsy/featured-sunset-get_hu69849a7cdb847c2393a7b3a7f6061c86_387442_250x125_fill_catmullrom_smart1_2.png and /dev/null differ diff --git a/docs/blog/2018/10/06/easy-documentation-with-docsy/featured-sunset-get_hu69849a7cdb847c2393a7b3a7f6061c86_387442_600x300_fill_catmullrom_smart1_2.png b/docs/blog/2018/10/06/easy-documentation-with-docsy/featured-sunset-get_hu69849a7cdb847c2393a7b3a7f6061c86_387442_600x300_fill_catmullrom_smart1_2.png deleted file mode 100644 index 6dedbfbcf..000000000 Binary files a/docs/blog/2018/10/06/easy-documentation-with-docsy/featured-sunset-get_hu69849a7cdb847c2393a7b3a7f6061c86_387442_600x300_fill_catmullrom_smart1_2.png and /dev/null differ diff --git a/docs/blog/2018/10/06/easy-documentation-with-docsy/featured-sunset-get_hu69849a7cdb847c2393a7b3a7f6061c86_387442_640x0_resize_catmullrom_2.png b/docs/blog/2018/10/06/easy-documentation-with-docsy/featured-sunset-get_hu69849a7cdb847c2393a7b3a7f6061c86_387442_640x0_resize_catmullrom_2.png deleted file mode 100644 index e4f9fec0f..000000000 Binary files a/docs/blog/2018/10/06/easy-documentation-with-docsy/featured-sunset-get_hu69849a7cdb847c2393a7b3a7f6061c86_387442_640x0_resize_catmullrom_2.png and /dev/null differ diff --git a/docs/blog/2018/10/06/easy-documentation-with-docsy/index.html b/docs/blog/2018/10/06/easy-documentation-with-docsy/index.html deleted file mode 100644 index 2e2c2401a..000000000 --- a/docs/blog/2018/10/06/easy-documentation-with-docsy/index.html +++ /dev/null @@ -1,338 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Easy documentation with Docsy | Jenkins Operator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Easy documentation with Docsy | Jenkins Operator - - -
- - - -
-
-
-
-
- - - - - -
- - - - -
- - - - -
-
- - - - - - - - - - - - - -
-
- - RSS - - -
-

Easy documentation with Docsy

-
The Docsy Hugo theme lets project maintainers and contributors focus on content, not on reinventing a website infrastructure from scratch
- - - -

This is a typical blog post that includes images.

- -

The front matter specifies the date of the blog post, its title, a short description that will be displayed on the blog landing page, and its author.

- -

Including images

- -

Here’s an image (featured-sunset-get.png) that includes a byline and a caption.

- - - - - - - - -
- - -
-

-Fetch and scale an image in the upcoming Hugo 0.43. -
Photo: Riona MacNamara / CC-BY-CA

-
- -
- -

The front matter of this post specifies properties to be assigned to all image resources:

-
resources:
-- src: "**.{png,jpg}"
-  title: "Image #:counter"
-  params:
-    byline: "Photo: Riona MacNamara / CC-BY-CA"
-

To include the image in a page, specify its details like this:

-

-
-
-
-
-
-
-
- - -
-

-Fetch and scale an image in the upcoming Hugo 0.43. -
Photo: Riona MacNamara / CC-BY-CA

-
- -
-

The image will be rendered at the size and byline specified in the front matter.

- - - - - -
- - -
-
-
- - - - -
- - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/blog/2018/10/06/the-second-blog-post/index.html b/docs/blog/2018/10/06/the-second-blog-post/index.html deleted file mode 100644 index 33f1bc476..000000000 --- a/docs/blog/2018/10/06/the-second-blog-post/index.html +++ /dev/null @@ -1,684 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -The second blog post | Jenkins Operator - - - - - - - - - - - - - - - - - - - - - - - - - - - - The second blog post | Jenkins Operator - - -
- - - -
-
-
-
-
- - - - - -
- - - - -
- - - - -
- -
- - RSS - - -
-

The second blog post

-
A short lead description about this content page. Text here can also be bold or italic and can even be split over multiple paragraphs.
- - - -

Text can be bold, italic, or strikethrough. Links should be blue with no underlines (unless hovered over).

- -

There should be whitespace between paragraphs. There should be whitespace between paragraphs. There should be whitespace between paragraphs. There should be whitespace between paragraphs.

- -

There should be whitespace between paragraphs. There should be whitespace between paragraphs. There should be whitespace between paragraphs. There should be whitespace between paragraphs.

- -
-

There should be no margin above this first sentence.

- -

Blockquotes should be a lighter gray with a border along the left side in the secondary color.

- -

There should be no margin below this final sentence.

-
- -

First Header

- -

This is a normal paragraph following a header. Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong. Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong. Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.

- -

Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.

- -

On big screens, paragraphs and headings should not take up the full container width, but we want tables, code blocks and similar to take the full width.

- -

Lorem markdownum tuta hospes stabat; idem saxum facit quaterque repetito -occumbere, oves novem gestit haerebat frena; qui. Respicit recurvam erat: -pignora hinc reppulit nos aut, aptos, ipsa.

- -

Meae optatos passa est Epiros utiliter Talibus niveis, hoc lata, edidit. -Dixi ad aestum.

- -

Header 2

- -
-

This is a blockquote following a header. Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.

-
- -

Header 3

-
This is a code block following a header.
-

Header 4

- -
    -
  • This is an unordered list following a header.
  • -
  • This is an unordered list following a header.
  • -
  • This is an unordered list following a header.
  • -
- -
Header 5
- -
    -
  1. This is an ordered list following a header.
  2. -
  3. This is an ordered list following a header.
  4. -
  5. This is an ordered list following a header.
  6. -
- -
Header 6
- - - - - - - - - - - - - - - - - - - - - - - - - -
WhatFollows
A tableA header
A tableA header
A tableA header
- -
- -

There’s a horizontal rule above and below this.

- -
- -

Here is an unordered list:

- -
    -
  • Salt-n-Pepa
  • -
  • Bel Biv DeVoe
  • -
  • Kid ‘N Play
  • -
- -

And an ordered list:

- -
    -
  1. Michael Jackson
  2. -
  3. Michael Bolton
  4. -
  5. Michael Bublé
  6. -
- -

And an unordered task list:

- -
    -
  • -
  • -
  • -
- -

And a “mixed” task list:

- -
    -
  • -
  • ?
  • -
  • -
- -

And a nested list:

- -
    -
  • Jackson 5 - -
      -
    • Michael
    • -
    • Tito
    • -
    • Jackie
    • -
    • Marlon
    • -
    • Jermaine
    • -
  • -
  • TMNT - -
      -
    • Leonardo
    • -
    • Michelangelo
    • -
    • Donatello
    • -
    • Raphael
    • -
  • -
- -

Definition lists can be used with Markdown syntax. Definition terms are bold.

- -
-
Name
-
Godzilla
-
Born
-
1952
-
Birthplace
-
Japan
-
Color
-
Green
-
- -
- -

Tables should have bold headings and alternating shaded rows.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ArtistAlbumYear
Michael JacksonThriller1982
PrincePurple Rain1984
Beastie BoysLicense to Ill1986
- -

If a table is too wide, it should scroll horizontally.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ArtistAlbumYearLabelAwardsSongs
Michael JacksonThriller1982Epic RecordsGrammy Award for Album of the Year, American Music Award for Favorite Pop/Rock Album, American Music Award for Favorite Soul/R&B Album, Brit Award for Best Selling Album, Grammy Award for Best Engineered Album, Non-ClassicalWanna Be Startin’ Somethin’, Baby Be Mine, The Girl Is Mine, Thriller, Beat It, Billie Jean, Human Nature, P.Y.T. (Pretty Young Thing), The Lady in My Life
PrincePurple Rain1984Warner Brothers RecordsGrammy Award for Best Score Soundtrack for Visual Media, American Music Award for Favorite Pop/Rock Album, American Music Award for Favorite Soul/R&B Album, Brit Award for Best Soundtrack/Cast Recording, Grammy Award for Best Rock Performance by a Duo or Group with VocalLet’s Go Crazy, Take Me With U, The Beautiful Ones, Computer Blue, Darling Nikki, When Doves Cry, I Would Die 4 U, Baby I’m a Star, Purple Rain
Beastie BoysLicense to Ill1986Mercury RecordsnoawardsbutthistablecelliswideRhymin & Stealin, The New Style, She’s Crafty, Posse in Effect, Slow Ride, Girls, (You Gotta) Fight for Your Right, No Sleep Till Brooklyn, Paul Revere, Hold It Now, Hit It, Brass Monkey, Slow and Low, Time to Get Ill
- -
- -

Code snippets like var foo = "bar"; can be shown inline.

- -

Also, this should vertically align with this and this.

- -

Code can also be shown in a block element.

-
foo := "bar";
-bar := "foo";
-

Code can also use syntax highlighting.

-
func main() {
-  input := `var foo = "bar";`
-
-  lexer := lexers.Get("javascript")
-  iterator, _ := lexer.Tokenise(nil, input)
-  style := styles.Get("github")
-  formatter := html.New(html.WithLineNumbers())
-
-  var buff bytes.Buffer
-  formatter.Format(&buff, style, iterator)
-
-  fmt.Println(buff.String())
-}
Long, single-line code blocks should not wrap. They should horizontally scroll if they are too long. This line should be long enough to demonstrate this.
-

Inline code inside table cells should still be distinguishable.

- - - - - - - - - - - - - - - - - - - - -
LanguageCode
Javascriptvar foo = "bar";
Rubyfoo = "bar"{
- -
- -

Small images should be shown at their actual size.

- -

- -

Large images should always scale down and fit in the content container.

- -

- -

Components

- -

Alerts

- -

- -

- - - - - - - - - - - - - - - - -

- -

Sizing

- -

Add some sections here to see how the ToC looks like. Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.

- -

Parameters available

- -

Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.

- -

Using pixels

- -

Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.

- -

Using rem

- -

Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.

- -

Memory

- -

Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.

- -

RAM to use

- -

Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.

- -

More is better

- -

Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.

- -

Used RAM

- -

Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.

-
This is the final element on the page and there should be no margin below this.
- - - - -
- - -
-
-
- - - - -
- - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/blog/index.html b/docs/blog/index.html deleted file mode 100644 index cb213c72e..000000000 --- a/docs/blog/index.html +++ /dev/null @@ -1,334 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - -Docsy Blog | Jenkins Operator - - - - - - - - - - - - - - - - - - - - Docsy Blog | Jenkins Operator - - -
- - - -
-
-
-
-
- - - - - -
- - - - -
- - - - -
-
- - - - - - - - - - - -
-
- - RSS - - - - - - - - - -
-
- -

Posts in 2018

-
    - -
  • -
    -
    Second blog post
    -

    Saturday, October 06, 2018 in News

    - - - - - - -

    Text can be bold, italic, or strikethrough. Links should be blue with no underlines (unless hovered over). -There should be whitespace between paragraphs. There should be whitespace between paragraphs. There should be whitespace between paragraphs. …

    -

    Read more

    -
    -
  • - -
  • -
    -
    Announcing Docsy
    -

    Saturday, October 06, 2018 in News

    - - - - - - - -
    -Featured Image for Easy documentation with Docsy - -
    Photo: Riona MacNamara / CC-BY-CA
    - -
    - -

    This is a typical blog post that includes images. -The front matter specifies the date of the blog post, its title, a short description that will be displayed on the blog landing page, and its author. -Including images Here’s an image …

    -

    Read more

    -
    -
  • - -
  • -
    -
    Release New Features
    -

    Thursday, January 04, 2018 in Releases

    - - - - - - -

    Text can be bold, italic, or strikethrough. Links should be blue with no underlines (unless hovered over). -There should be whitespace between paragraphs. There should be whitespace between paragraphs. There should be whitespace between paragraphs. …

    -

    Read more

    -
    -
  • - -
- -
-
-
-
- - - -
-
- -
-
-
- - - - -
- - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/blog/index.xml b/docs/blog/index.xml deleted file mode 100644 index 95ec1dd19..000000000 --- a/docs/blog/index.xml +++ /dev/null @@ -1,839 +0,0 @@ - - - Jenkins Operator – Docsy Blog - https://jenkinsci.github.io/kubernetes-operator/blog/ - Recent Hugo news from gohugo.io - Hugo -- gohugo.io - - https://jenkinsci.github.io/kubernetes-operator/img/hugo.png - GoHugo.io - https://jenkinsci.github.io/kubernetes-operator/blog/ - - - - - - - - - - - - Blog: Easy documentation with Docsy - https://jenkinsci.github.io/kubernetes-operator/blog/2018/10/06/easy-documentation-with-docsy/ - Sat, 06 Oct 2018 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/blog/2018/10/06/easy-documentation-with-docsy/ - - - - - ]]> - - - -<p><strong>This is a typical blog post that includes images.</strong></p> - -<p>The front matter specifies the date of the blog post, its title, a short description that will be displayed on the blog landing page, and its author.</p> - -<h2 id="including-images">Including images</h2> - -<p>Here&rsquo;s an image (<code>featured-sunset-get.png</code>) that includes a byline and a caption.</p> - - - - - - - - -<div class="card rounded p-2 td-post-card mb-4 mt-4" style="max-width: 610px"> - <img class="card-img-top" src="https://jenkinsci.github.io/kubernetes-operator/kubernetes-operator/blog/2018/10/06/easy-documentation-with-docsy/featured-sunset-get_hu69849a7cdb847c2393a7b3a7f6061c86_387442_600x300_fill_catmullrom_smart1_2.png" width="600" height="300"> - - <div class="card-body px-0 pt-2 pb-0"> - <p class="card-text"> -Fetch and scale an image in the upcoming Hugo 0.43. -<small class="text-muted"><br/>Photo: Riona MacNamara / CC-BY-CA</small></p> - </div> - -</div> - -<p>The front matter of this post specifies properties to be assigned to all image resources:</p> -<pre><code>resources: -- src: "**.{png,jpg}" - title: "Image #:counter" - params: - byline: "Photo: Riona MacNamara / CC-BY-CA"</code></pre> -<p>To include the image in a page, specify its details like this:</p> -<pre><code> - - - - - - -<div class="card rounded p-2 td-post-card mb-4 mt-4" style="max-width: 610px"> - <img class="card-img-top" src="https://jenkinsci.github.io/kubernetes-operator/kubernetes-operator/blog/2018/10/06/easy-documentation-with-docsy/featured-sunset-get_hu69849a7cdb847c2393a7b3a7f6061c86_387442_600x300_fill_catmullrom_smart1_2.png" width="600" height="300"> - - <div class="card-body px-0 pt-2 pb-0"> - <p class="card-text"> -Fetch and scale an image in the upcoming Hugo 0.43. -<small class="text-muted"><br/>Photo: Riona MacNamara / CC-BY-CA</small></p> - </div> - -</div></code></pre> -<p>The image will be rendered at the size and byline specified in the front matter.</p> - - - - - - Blog: The second blog post - https://jenkinsci.github.io/kubernetes-operator/blog/2018/10/06/the-second-blog-post/ - Sat, 06 Oct 2018 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/blog/2018/10/06/the-second-blog-post/ - - - - - -<p>Text can be <strong>bold</strong>, <em>italic</em>, or <del>strikethrough</del>. <a href="https://github.com">Links</a> should be blue with no underlines (unless hovered over).</p> - -<p>There should be whitespace between paragraphs. There should be whitespace between paragraphs. There should be whitespace between paragraphs. There should be whitespace between paragraphs.</p> - -<p>There should be whitespace between paragraphs. There should be whitespace between paragraphs. There should be whitespace between paragraphs. There should be whitespace between paragraphs.</p> - -<blockquote> -<p>There should be no margin above this first sentence.</p> - -<p>Blockquotes should be a lighter gray with a border along the left side in the secondary color.</p> - -<p>There should be no margin below this final sentence.</p> -</blockquote> - -<h2 id="first-header">First Header</h2> - -<p>This is a normal paragraph following a header. Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong. Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong. Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.</p> - -<p>Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.</p> - -<p>On big screens, paragraphs and headings should not take up the full container width, but we want tables, code blocks and similar to take the full width.</p> - -<p>Lorem markdownum tuta hospes stabat; idem saxum facit quaterque repetito -occumbere, oves novem gestit haerebat frena; qui. Respicit recurvam erat: -pignora hinc reppulit nos <strong>aut</strong>, aptos, ipsa.</p> - -<p>Meae optatos <em>passa est</em> Epiros utiliter <em>Talibus niveis</em>, hoc lata, edidit. -Dixi ad aestum.</p> - -<h2 id="header-2">Header 2</h2> - -<blockquote> -<p>This is a blockquote following a header. Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.</p> -</blockquote> - -<h3 id="header-3">Header 3</h3> -<pre><code>This is a code block following a header.</code></pre> -<h4 id="header-4">Header 4</h4> - -<ul> -<li>This is an unordered list following a header.</li> -<li>This is an unordered list following a header.</li> -<li>This is an unordered list following a header.</li> -</ul> - -<h5 id="header-5">Header 5</h5> - -<ol> -<li>This is an ordered list following a header.</li> -<li>This is an ordered list following a header.</li> -<li>This is an ordered list following a header.</li> -</ol> - -<h6 id="header-6">Header 6</h6> - -<table> -<thead> -<tr> -<th>What</th> -<th>Follows</th> -</tr> -</thead> - -<tbody> -<tr> -<td>A table</td> -<td>A header</td> -</tr> - -<tr> -<td>A table</td> -<td>A header</td> -</tr> - -<tr> -<td>A table</td> -<td>A header</td> -</tr> -</tbody> -</table> - -<hr /> - -<p>There&rsquo;s a horizontal rule above and below this.</p> - -<hr /> - -<p>Here is an unordered list:</p> - -<ul> -<li>Salt-n-Pepa</li> -<li>Bel Biv DeVoe</li> -<li>Kid &lsquo;N Play</li> -</ul> - -<p>And an ordered list:</p> - -<ol> -<li>Michael Jackson</li> -<li>Michael Bolton</li> -<li>Michael Bublé</li> -</ol> - -<p>And an unordered task list:</p> - -<ul class="task-list"> -<li><label><input type="checkbox" checked disabled class="task-list-item"> Create a sample markdown document</label></li> -<li><label><input type="checkbox" checked disabled class="task-list-item"> Add task lists to it</label></li> -<li><label><input type="checkbox" disabled class="task-list-item"> Take a vacation</label></li> -</ul> - -<p>And a &ldquo;mixed&rdquo; task list:</p> - -<ul class="task-list"> -<li><label><input type="checkbox" disabled class="task-list-item"> Steal underpants</label></li> -<li>?</li> -<li><label><input type="checkbox" disabled class="task-list-item"> Profit!</label></li> -</ul> - -<p>And a nested list:</p> - -<ul> -<li>Jackson 5 - -<ul> -<li>Michael</li> -<li>Tito</li> -<li>Jackie</li> -<li>Marlon</li> -<li>Jermaine</li> -</ul></li> -<li>TMNT - -<ul> -<li>Leonardo</li> -<li>Michelangelo</li> -<li>Donatello</li> -<li>Raphael</li> -</ul></li> -</ul> - -<p>Definition lists can be used with Markdown syntax. Definition terms are bold.</p> - -<dl> -<dt>Name</dt> -<dd>Godzilla</dd> -<dt>Born</dt> -<dd>1952</dd> -<dt>Birthplace</dt> -<dd>Japan</dd> -<dt>Color</dt> -<dd>Green</dd> -</dl> - -<hr /> - -<p>Tables should have bold headings and alternating shaded rows.</p> - -<table> -<thead> -<tr> -<th>Artist</th> -<th>Album</th> -<th>Year</th> -</tr> -</thead> - -<tbody> -<tr> -<td>Michael Jackson</td> -<td>Thriller</td> -<td>1982</td> -</tr> - -<tr> -<td>Prince</td> -<td>Purple Rain</td> -<td>1984</td> -</tr> - -<tr> -<td>Beastie Boys</td> -<td>License to Ill</td> -<td>1986</td> -</tr> -</tbody> -</table> - -<p>If a table is too wide, it should scroll horizontally.</p> - -<table> -<thead> -<tr> -<th>Artist</th> -<th>Album</th> -<th>Year</th> -<th>Label</th> -<th>Awards</th> -<th>Songs</th> -</tr> -</thead> - -<tbody> -<tr> -<td>Michael Jackson</td> -<td>Thriller</td> -<td>1982</td> -<td>Epic Records</td> -<td>Grammy Award for Album of the Year, American Music Award for Favorite Pop/Rock Album, American Music Award for Favorite Soul/R&amp;B Album, Brit Award for Best Selling Album, Grammy Award for Best Engineered Album, Non-Classical</td> -<td>Wanna Be Startin&rsquo; Somethin&rsquo;, Baby Be Mine, The Girl Is Mine, Thriller, Beat It, Billie Jean, Human Nature, P.Y.T. (Pretty Young Thing), The Lady in My Life</td> -</tr> - -<tr> -<td>Prince</td> -<td>Purple Rain</td> -<td>1984</td> -<td>Warner Brothers Records</td> -<td>Grammy Award for Best Score Soundtrack for Visual Media, American Music Award for Favorite Pop/Rock Album, American Music Award for Favorite Soul/R&amp;B Album, Brit Award for Best Soundtrack/Cast Recording, Grammy Award for Best Rock Performance by a Duo or Group with Vocal</td> -<td>Let&rsquo;s Go Crazy, Take Me With U, The Beautiful Ones, Computer Blue, Darling Nikki, When Doves Cry, I Would Die 4 U, Baby I&rsquo;m a Star, Purple Rain</td> -</tr> - -<tr> -<td>Beastie Boys</td> -<td>License to Ill</td> -<td>1986</td> -<td>Mercury Records</td> -<td>noawardsbutthistablecelliswide</td> -<td>Rhymin &amp; Stealin, The New Style, She&rsquo;s Crafty, Posse in Effect, Slow Ride, Girls, (You Gotta) Fight for Your Right, No Sleep Till Brooklyn, Paul Revere, Hold It Now, Hit It, Brass Monkey, Slow and Low, Time to Get Ill</td> -</tr> -</tbody> -</table> - -<hr /> - -<p>Code snippets like <code>var foo = &quot;bar&quot;;</code> can be shown inline.</p> - -<p>Also, <code>this should vertically align</code> <del><code>with this</code></del> <del>and this</del>.</p> - -<p>Code can also be shown in a block element.</p> -<pre><code>foo := "bar"; -bar := "foo";</code></pre> -<p>Code can also use syntax highlighting.</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-go" data-lang="go"><span style="color:#204a87;font-weight:bold">func</span> <span style="color:#000">main</span><span style="color:#000;font-weight:bold">(</span><span style="color:#000;font-weight:bold">)</span> <span style="color:#000;font-weight:bold">{</span> - <span style="color:#000">input</span> <span style="color:#ce5c00;font-weight:bold">:=</span> <span style="color:#4e9a06">`</span><span style="color:#4e9a06">var foo = &#34;bar&#34;;</span><span style="color:#4e9a06">`</span> - - <span style="color:#000">lexer</span> <span style="color:#ce5c00;font-weight:bold">:=</span> <span style="color:#000">lexers</span><span style="color:#000;font-weight:bold">.</span><span style="color:#000">Get</span><span style="color:#000;font-weight:bold">(</span><span style="color:#4e9a06">&#34;javascript&#34;</span><span style="color:#000;font-weight:bold">)</span> - <span style="color:#000">iterator</span><span style="color:#000;font-weight:bold">,</span> <span style="color:#000">_</span> <span style="color:#ce5c00;font-weight:bold">:=</span> <span style="color:#000">lexer</span><span style="color:#000;font-weight:bold">.</span><span style="color:#000">Tokenise</span><span style="color:#000;font-weight:bold">(</span><span style="color:#204a87;font-weight:bold">nil</span><span style="color:#000;font-weight:bold">,</span> <span style="color:#000">input</span><span style="color:#000;font-weight:bold">)</span> - <span style="color:#000">style</span> <span style="color:#ce5c00;font-weight:bold">:=</span> <span style="color:#000">styles</span><span style="color:#000;font-weight:bold">.</span><span style="color:#000">Get</span><span style="color:#000;font-weight:bold">(</span><span style="color:#4e9a06">&#34;github&#34;</span><span style="color:#000;font-weight:bold">)</span> - <span style="color:#000">formatter</span> <span style="color:#ce5c00;font-weight:bold">:=</span> <span style="color:#000">html</span><span style="color:#000;font-weight:bold">.</span><span style="color:#000">New</span><span style="color:#000;font-weight:bold">(</span><span style="color:#000">html</span><span style="color:#000;font-weight:bold">.</span><span style="color:#000">WithLineNumbers</span><span style="color:#000;font-weight:bold">(</span><span style="color:#000;font-weight:bold">)</span><span style="color:#000;font-weight:bold">)</span> - - <span style="color:#204a87;font-weight:bold">var</span> <span style="color:#000">buff</span> <span style="color:#000">bytes</span><span style="color:#000;font-weight:bold">.</span><span style="color:#000">Buffer</span> - <span style="color:#000">formatter</span><span style="color:#000;font-weight:bold">.</span><span style="color:#000">Format</span><span style="color:#000;font-weight:bold">(</span><span style="color:#ce5c00;font-weight:bold">&amp;</span><span style="color:#000">buff</span><span style="color:#000;font-weight:bold">,</span> <span style="color:#000">style</span><span style="color:#000;font-weight:bold">,</span> <span style="color:#000">iterator</span><span style="color:#000;font-weight:bold">)</span> - - <span style="color:#000">fmt</span><span style="color:#000;font-weight:bold">.</span><span style="color:#000">Println</span><span style="color:#000;font-weight:bold">(</span><span style="color:#000">buff</span><span style="color:#000;font-weight:bold">.</span><span style="color:#000">String</span><span style="color:#000;font-weight:bold">(</span><span style="color:#000;font-weight:bold">)</span><span style="color:#000;font-weight:bold">)</span> -<span style="color:#000;font-weight:bold">}</span></code></pre></div><pre><code>Long, single-line code blocks should not wrap. They should horizontally scroll if they are too long. This line should be long enough to demonstrate this.</code></pre> -<p>Inline code inside table cells should still be distinguishable.</p> - -<table> -<thead> -<tr> -<th>Language</th> -<th>Code</th> -</tr> -</thead> - -<tbody> -<tr> -<td>Javascript</td> -<td><code>var foo = &quot;bar&quot;;</code></td> -</tr> - -<tr> -<td>Ruby</td> -<td><code>foo = &quot;bar&quot;{</code></td> -</tr> -</tbody> -</table> - -<hr /> - -<p>Small images should be shown at their actual size.</p> - -<p><img src="http://placekitten.com/g/300/200/" alt="" /></p> - -<p>Large images should always scale down and fit in the content container.</p> - -<p><img src="http://placekitten.com/g/1200/800/" alt="" /></p> - -<h2 id="components">Components</h2> - -<h3 id="alerts">Alerts</h3> - -<p> - -<div class="alert alert-primary" role="alert"> - -This is an alert. -</div> - - - -<div class="alert alert-primary" role="alert"> -<h4 class="alert-heading">Note:</h4> -This is an alert with a title. -</div> - - - -<div class="alert alert-primary" role="alert"> - -This is a successful alert. -</div> - - - -<div class="alert alert-primary" role="alert"> - -This is a warning! -</div> - - - -<div class="alert alert-primary" role="alert"> -<h4 class="alert-heading">Warning!</h4> -This is a warning with a title! -</div> -</p> - -<h2 id="sizing">Sizing</h2> - -<p>Add some sections here to see how the ToC looks like. Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.</p> - -<h3 id="parameters-available">Parameters available</h3> - -<p>Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.</p> - -<h3 id="using-pixels">Using pixels</h3> - -<p>Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.</p> - -<h3 id="using-rem">Using rem</h3> - -<p>Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.</p> - -<h2 id="memory">Memory</h2> - -<p>Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.</p> - -<h3 id="ram-to-use">RAM to use</h3> - -<p>Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.</p> - -<h3 id="more-is-better">More is better</h3> - -<p>Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.</p> - -<h3 id="used-ram">Used RAM</h3> - -<p>Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.</p> -<pre><code>This is the final element on the page and there should be no margin below this.</code></pre> - - - - - Blog: Another Great Release - https://jenkinsci.github.io/kubernetes-operator/blog/2018/01/04/another-great-release/ - Thu, 04 Jan 2018 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/blog/2018/01/04/another-great-release/ - - - - - -<p>Text can be <strong>bold</strong>, <em>italic</em>, or <del>strikethrough</del>. <a href="https://github.com">Links</a> should be blue with no underlines (unless hovered over).</p> - -<p>There should be whitespace between paragraphs. There should be whitespace between paragraphs. There should be whitespace between paragraphs. There should be whitespace between paragraphs.</p> - -<p>There should be whitespace between paragraphs. There should be whitespace between paragraphs. There should be whitespace between paragraphs. There should be whitespace between paragraphs.</p> - -<blockquote> -<p>There should be no margin above this first sentence.</p> - -<p>Blockquotes should be a lighter gray with a border along the left side in the secondary color.</p> - -<p>There should be no margin below this final sentence.</p> -</blockquote> - -<h2 id="first-header">First Header</h2> - -<p>This is a normal paragraph following a header. Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong. Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong. Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.</p> - -<p>Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.</p> - -<p>On big screens, paragraphs and headings should not take up the full container width, but we want tables, code blocks and similar to take the full width.</p> - -<p>Lorem markdownum tuta hospes stabat; idem saxum facit quaterque repetito -occumbere, oves novem gestit haerebat frena; qui. Respicit recurvam erat: -pignora hinc reppulit nos <strong>aut</strong>, aptos, ipsa.</p> - -<p>Meae optatos <em>passa est</em> Epiros utiliter <em>Talibus niveis</em>, hoc lata, edidit. -Dixi ad aestum.</p> - -<h2 id="header-2">Header 2</h2> - -<blockquote> -<p>This is a blockquote following a header. Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.</p> -</blockquote> - -<h3 id="header-3">Header 3</h3> -<pre><code>This is a code block following a header.</code></pre> -<h4 id="header-4">Header 4</h4> - -<ul> -<li>This is an unordered list following a header.</li> -<li>This is an unordered list following a header.</li> -<li>This is an unordered list following a header.</li> -</ul> - -<h5 id="header-5">Header 5</h5> - -<ol> -<li>This is an ordered list following a header.</li> -<li>This is an ordered list following a header.</li> -<li>This is an ordered list following a header.</li> -</ol> - -<h6 id="header-6">Header 6</h6> - -<table> -<thead> -<tr> -<th>What</th> -<th>Follows</th> -</tr> -</thead> - -<tbody> -<tr> -<td>A table</td> -<td>A header</td> -</tr> - -<tr> -<td>A table</td> -<td>A header</td> -</tr> - -<tr> -<td>A table</td> -<td>A header</td> -</tr> -</tbody> -</table> - -<hr /> - -<p>There&rsquo;s a horizontal rule above and below this.</p> - -<hr /> - -<p>Here is an unordered list:</p> - -<ul> -<li>Salt-n-Pepa</li> -<li>Bel Biv DeVoe</li> -<li>Kid &lsquo;N Play</li> -</ul> - -<p>And an ordered list:</p> - -<ol> -<li>Michael Jackson</li> -<li>Michael Bolton</li> -<li>Michael Bublé</li> -</ol> - -<p>And an unordered task list:</p> - -<ul class="task-list"> -<li><label><input type="checkbox" checked disabled class="task-list-item"> Create a sample markdown document</label></li> -<li><label><input type="checkbox" checked disabled class="task-list-item"> Add task lists to it</label></li> -<li><label><input type="checkbox" disabled class="task-list-item"> Take a vacation</label></li> -</ul> - -<p>And a &ldquo;mixed&rdquo; task list:</p> - -<ul class="task-list"> -<li><label><input type="checkbox" disabled class="task-list-item"> Steal underpants</label></li> -<li>?</li> -<li><label><input type="checkbox" disabled class="task-list-item"> Profit!</label></li> -</ul> - -<p>And a nested list:</p> - -<ul> -<li>Jackson 5 - -<ul> -<li>Michael</li> -<li>Tito</li> -<li>Jackie</li> -<li>Marlon</li> -<li>Jermaine</li> -</ul></li> -<li>TMNT - -<ul> -<li>Leonardo</li> -<li>Michelangelo</li> -<li>Donatello</li> -<li>Raphael</li> -</ul></li> -</ul> - -<p>Definition lists can be used with Markdown syntax. Definition terms are bold.</p> - -<dl> -<dt>Name</dt> -<dd>Godzilla</dd> -<dt>Born</dt> -<dd>1952</dd> -<dt>Birthplace</dt> -<dd>Japan</dd> -<dt>Color</dt> -<dd>Green</dd> -</dl> - -<hr /> - -<p>Tables should have bold headings and alternating shaded rows.</p> - -<table> -<thead> -<tr> -<th>Artist</th> -<th>Album</th> -<th>Year</th> -</tr> -</thead> - -<tbody> -<tr> -<td>Michael Jackson</td> -<td>Thriller</td> -<td>1982</td> -</tr> - -<tr> -<td>Prince</td> -<td>Purple Rain</td> -<td>1984</td> -</tr> - -<tr> -<td>Beastie Boys</td> -<td>License to Ill</td> -<td>1986</td> -</tr> -</tbody> -</table> - -<p>If a table is too wide, it should scroll horizontally.</p> - -<table> -<thead> -<tr> -<th>Artist</th> -<th>Album</th> -<th>Year</th> -<th>Label</th> -<th>Awards</th> -<th>Songs</th> -</tr> -</thead> - -<tbody> -<tr> -<td>Michael Jackson</td> -<td>Thriller</td> -<td>1982</td> -<td>Epic Records</td> -<td>Grammy Award for Album of the Year, American Music Award for Favorite Pop/Rock Album, American Music Award for Favorite Soul/R&amp;B Album, Brit Award for Best Selling Album, Grammy Award for Best Engineered Album, Non-Classical</td> -<td>Wanna Be Startin&rsquo; Somethin&rsquo;, Baby Be Mine, The Girl Is Mine, Thriller, Beat It, Billie Jean, Human Nature, P.Y.T. (Pretty Young Thing), The Lady in My Life</td> -</tr> - -<tr> -<td>Prince</td> -<td>Purple Rain</td> -<td>1984</td> -<td>Warner Brothers Records</td> -<td>Grammy Award for Best Score Soundtrack for Visual Media, American Music Award for Favorite Pop/Rock Album, American Music Award for Favorite Soul/R&amp;B Album, Brit Award for Best Soundtrack/Cast Recording, Grammy Award for Best Rock Performance by a Duo or Group with Vocal</td> -<td>Let&rsquo;s Go Crazy, Take Me With U, The Beautiful Ones, Computer Blue, Darling Nikki, When Doves Cry, I Would Die 4 U, Baby I&rsquo;m a Star, Purple Rain</td> -</tr> - -<tr> -<td>Beastie Boys</td> -<td>License to Ill</td> -<td>1986</td> -<td>Mercury Records</td> -<td>noawardsbutthistablecelliswide</td> -<td>Rhymin &amp; Stealin, The New Style, She&rsquo;s Crafty, Posse in Effect, Slow Ride, Girls, (You Gotta) Fight for Your Right, No Sleep Till Brooklyn, Paul Revere, Hold It Now, Hit It, Brass Monkey, Slow and Low, Time to Get Ill</td> -</tr> -</tbody> -</table> - -<hr /> - -<p>Code snippets like <code>var foo = &quot;bar&quot;;</code> can be shown inline.</p> - -<p>Also, <code>this should vertically align</code> <del><code>with this</code></del> <del>and this</del>.</p> - -<p>Code can also be shown in a block element.</p> -<pre><code>foo := "bar"; -bar := "foo";</code></pre> -<p>Code can also use syntax highlighting.</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-go" data-lang="go"><span style="color:#204a87;font-weight:bold">func</span> <span style="color:#000">main</span><span style="color:#000;font-weight:bold">(</span><span style="color:#000;font-weight:bold">)</span> <span style="color:#000;font-weight:bold">{</span> - <span style="color:#000">input</span> <span style="color:#ce5c00;font-weight:bold">:=</span> <span style="color:#4e9a06">`</span><span style="color:#4e9a06">var foo = &#34;bar&#34;;</span><span style="color:#4e9a06">`</span> - - <span style="color:#000">lexer</span> <span style="color:#ce5c00;font-weight:bold">:=</span> <span style="color:#000">lexers</span><span style="color:#000;font-weight:bold">.</span><span style="color:#000">Get</span><span style="color:#000;font-weight:bold">(</span><span style="color:#4e9a06">&#34;javascript&#34;</span><span style="color:#000;font-weight:bold">)</span> - <span style="color:#000">iterator</span><span style="color:#000;font-weight:bold">,</span> <span style="color:#000">_</span> <span style="color:#ce5c00;font-weight:bold">:=</span> <span style="color:#000">lexer</span><span style="color:#000;font-weight:bold">.</span><span style="color:#000">Tokenise</span><span style="color:#000;font-weight:bold">(</span><span style="color:#204a87;font-weight:bold">nil</span><span style="color:#000;font-weight:bold">,</span> <span style="color:#000">input</span><span style="color:#000;font-weight:bold">)</span> - <span style="color:#000">style</span> <span style="color:#ce5c00;font-weight:bold">:=</span> <span style="color:#000">styles</span><span style="color:#000;font-weight:bold">.</span><span style="color:#000">Get</span><span style="color:#000;font-weight:bold">(</span><span style="color:#4e9a06">&#34;github&#34;</span><span style="color:#000;font-weight:bold">)</span> - <span style="color:#000">formatter</span> <span style="color:#ce5c00;font-weight:bold">:=</span> <span style="color:#000">html</span><span style="color:#000;font-weight:bold">.</span><span style="color:#000">New</span><span style="color:#000;font-weight:bold">(</span><span style="color:#000">html</span><span style="color:#000;font-weight:bold">.</span><span style="color:#000">WithLineNumbers</span><span style="color:#000;font-weight:bold">(</span><span style="color:#000;font-weight:bold">)</span><span style="color:#000;font-weight:bold">)</span> - - <span style="color:#204a87;font-weight:bold">var</span> <span style="color:#000">buff</span> <span style="color:#000">bytes</span><span style="color:#000;font-weight:bold">.</span><span style="color:#000">Buffer</span> - <span style="color:#000">formatter</span><span style="color:#000;font-weight:bold">.</span><span style="color:#000">Format</span><span style="color:#000;font-weight:bold">(</span><span style="color:#ce5c00;font-weight:bold">&amp;</span><span style="color:#000">buff</span><span style="color:#000;font-weight:bold">,</span> <span style="color:#000">style</span><span style="color:#000;font-weight:bold">,</span> <span style="color:#000">iterator</span><span style="color:#000;font-weight:bold">)</span> - - <span style="color:#000">fmt</span><span style="color:#000;font-weight:bold">.</span><span style="color:#000">Println</span><span style="color:#000;font-weight:bold">(</span><span style="color:#000">buff</span><span style="color:#000;font-weight:bold">.</span><span style="color:#000">String</span><span style="color:#000;font-weight:bold">(</span><span style="color:#000;font-weight:bold">)</span><span style="color:#000;font-weight:bold">)</span> -<span style="color:#000;font-weight:bold">}</span></code></pre></div><pre><code>Long, single-line code blocks should not wrap. They should horizontally scroll if they are too long. This line should be long enough to demonstrate this.</code></pre> -<p>Inline code inside table cells should still be distinguishable.</p> - -<table> -<thead> -<tr> -<th>Language</th> -<th>Code</th> -</tr> -</thead> - -<tbody> -<tr> -<td>Javascript</td> -<td><code>var foo = &quot;bar&quot;;</code></td> -</tr> - -<tr> -<td>Ruby</td> -<td><code>foo = &quot;bar&quot;{</code></td> -</tr> -</tbody> -</table> - -<hr /> - -<p>Small images should be shown at their actual size.</p> - -<p><img src="http://placekitten.com/g/300/200/" alt="" /></p> - -<p>Large images should always scale down and fit in the content container.</p> - -<p><img src="http://placekitten.com/g/1200/800/" alt="" /></p> - -<h2 id="components">Components</h2> - -<h3 id="alerts">Alerts</h3> - -<p> - -<div class="alert alert-primary" role="alert"> - -This is an alert. -</div> - - - -<div class="alert alert-primary" role="alert"> -<h4 class="alert-heading">Note:</h4> -This is an alert with a title. -</div> - - - -<div class="alert alert-primary" role="alert"> - -This is a successful alert. -</div> - - - -<div class="alert alert-primary" role="alert"> - -This is a warning! -</div> - - - -<div class="alert alert-primary" role="alert"> -<h4 class="alert-heading">Warning!</h4> -This is a warning with a title! -</div> -</p> - -<h2 id="sizing">Sizing</h2> - -<p>Add some sections here to see how the ToC looks like. Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.</p> - -<h3 id="parameters-available">Parameters available</h3> - -<p>Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.</p> - -<h3 id="using-pixels">Using pixels</h3> - -<p>Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.</p> - -<h3 id="using-rem">Using rem</h3> - -<p>Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.</p> - -<h2 id="memory">Memory</h2> - -<p>Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.</p> - -<h3 id="ram-to-use">RAM to use</h3> - -<p>Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.</p> - -<h3 id="more-is-better">More is better</h3> - -<p>Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.</p> - -<h3 id="used-ram">Used RAM</h3> - -<p>Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.</p> -<pre><code>This is the final element on the page and there should be no margin below this.</code></pre> - - - - - \ No newline at end of file diff --git a/docs/blog/news/index.html b/docs/blog/news/index.html deleted file mode 100644 index 0c82e6128..000000000 --- a/docs/blog/news/index.html +++ /dev/null @@ -1,318 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - -News About Docsy | Jenkins Operator - - - - - - - - - - - - - - - - - - - - News About Docsy | Jenkins Operator - - -
- - - -
-
-
-
-
- - - - - -
- - - - -
- - - - -
-
- - - - - - - - - - - -
-
- - RSS - - - - - - - - - -
-
- -

Posts in 2018

-
    - -
  • -
    -
    Second blog post
    -

    Saturday, October 06, 2018 in News

    - - - - - - -

    Text can be bold, italic, or strikethrough. Links should be blue with no underlines (unless hovered over). -There should be whitespace between paragraphs. There should be whitespace between paragraphs. There should be whitespace between paragraphs. …

    -

    Read more

    -
    -
  • - -
  • -
    -
    Announcing Docsy
    -

    Saturday, October 06, 2018 in News

    - - - - - - - -
    -Featured Image for Easy documentation with Docsy - -
    Photo: Riona MacNamara / CC-BY-CA
    - -
    - -

    This is a typical blog post that includes images. -The front matter specifies the date of the blog post, its title, a short description that will be displayed on the blog landing page, and its author. -Including images Here’s an image …

    -

    Read more

    -
    -
  • - -
- -
-
-
-
- - - -
-
- -
-
-
- - - - -
- - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/blog/news/index.xml b/docs/blog/news/index.xml deleted file mode 100644 index 3aa9a56fe..000000000 --- a/docs/blog/news/index.xml +++ /dev/null @@ -1,466 +0,0 @@ - - - Jenkins Operator – News About Docsy - https://jenkinsci.github.io/kubernetes-operator/blog/news/ - Recent Hugo news from gohugo.io - Hugo -- gohugo.io - Sat, 06 Oct 2018 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/img/hugo.png - GoHugo.io - https://jenkinsci.github.io/kubernetes-operator/blog/news/ - - - - - - - - - - - - Blog: Easy documentation with Docsy - https://jenkinsci.github.io/kubernetes-operator/blog/2018/10/06/easy-documentation-with-docsy/ - Sat, 06 Oct 2018 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/blog/2018/10/06/easy-documentation-with-docsy/ - - - - - ]]> - - - -<p><strong>This is a typical blog post that includes images.</strong></p> - -<p>The front matter specifies the date of the blog post, its title, a short description that will be displayed on the blog landing page, and its author.</p> - -<h2 id="including-images">Including images</h2> - -<p>Here&rsquo;s an image (<code>featured-sunset-get.png</code>) that includes a byline and a caption.</p> - - - - - - - - -<div class="card rounded p-2 td-post-card mb-4 mt-4" style="max-width: 610px"> - <img class="card-img-top" src="https://jenkinsci.github.io/kubernetes-operator/kubernetes-operator/blog/2018/10/06/easy-documentation-with-docsy/featured-sunset-get_hu69849a7cdb847c2393a7b3a7f6061c86_387442_600x300_fill_catmullrom_smart1_2.png" width="600" height="300"> - - <div class="card-body px-0 pt-2 pb-0"> - <p class="card-text"> -Fetch and scale an image in the upcoming Hugo 0.43. -<small class="text-muted"><br/>Photo: Riona MacNamara / CC-BY-CA</small></p> - </div> - -</div> - -<p>The front matter of this post specifies properties to be assigned to all image resources:</p> -<pre><code>resources: -- src: "**.{png,jpg}" - title: "Image #:counter" - params: - byline: "Photo: Riona MacNamara / CC-BY-CA"</code></pre> -<p>To include the image in a page, specify its details like this:</p> -<pre><code> - - - - - - -<div class="card rounded p-2 td-post-card mb-4 mt-4" style="max-width: 610px"> - <img class="card-img-top" src="https://jenkinsci.github.io/kubernetes-operator/kubernetes-operator/blog/2018/10/06/easy-documentation-with-docsy/featured-sunset-get_hu69849a7cdb847c2393a7b3a7f6061c86_387442_600x300_fill_catmullrom_smart1_2.png" width="600" height="300"> - - <div class="card-body px-0 pt-2 pb-0"> - <p class="card-text"> -Fetch and scale an image in the upcoming Hugo 0.43. -<small class="text-muted"><br/>Photo: Riona MacNamara / CC-BY-CA</small></p> - </div> - -</div></code></pre> -<p>The image will be rendered at the size and byline specified in the front matter.</p> - - - - - - Blog: The second blog post - https://jenkinsci.github.io/kubernetes-operator/blog/2018/10/06/the-second-blog-post/ - Sat, 06 Oct 2018 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/blog/2018/10/06/the-second-blog-post/ - - - - - -<p>Text can be <strong>bold</strong>, <em>italic</em>, or <del>strikethrough</del>. <a href="https://github.com">Links</a> should be blue with no underlines (unless hovered over).</p> - -<p>There should be whitespace between paragraphs. There should be whitespace between paragraphs. There should be whitespace between paragraphs. There should be whitespace between paragraphs.</p> - -<p>There should be whitespace between paragraphs. There should be whitespace between paragraphs. There should be whitespace between paragraphs. There should be whitespace between paragraphs.</p> - -<blockquote> -<p>There should be no margin above this first sentence.</p> - -<p>Blockquotes should be a lighter gray with a border along the left side in the secondary color.</p> - -<p>There should be no margin below this final sentence.</p> -</blockquote> - -<h2 id="first-header">First Header</h2> - -<p>This is a normal paragraph following a header. Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong. Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong. Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.</p> - -<p>Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.</p> - -<p>On big screens, paragraphs and headings should not take up the full container width, but we want tables, code blocks and similar to take the full width.</p> - -<p>Lorem markdownum tuta hospes stabat; idem saxum facit quaterque repetito -occumbere, oves novem gestit haerebat frena; qui. Respicit recurvam erat: -pignora hinc reppulit nos <strong>aut</strong>, aptos, ipsa.</p> - -<p>Meae optatos <em>passa est</em> Epiros utiliter <em>Talibus niveis</em>, hoc lata, edidit. -Dixi ad aestum.</p> - -<h2 id="header-2">Header 2</h2> - -<blockquote> -<p>This is a blockquote following a header. Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.</p> -</blockquote> - -<h3 id="header-3">Header 3</h3> -<pre><code>This is a code block following a header.</code></pre> -<h4 id="header-4">Header 4</h4> - -<ul> -<li>This is an unordered list following a header.</li> -<li>This is an unordered list following a header.</li> -<li>This is an unordered list following a header.</li> -</ul> - -<h5 id="header-5">Header 5</h5> - -<ol> -<li>This is an ordered list following a header.</li> -<li>This is an ordered list following a header.</li> -<li>This is an ordered list following a header.</li> -</ol> - -<h6 id="header-6">Header 6</h6> - -<table> -<thead> -<tr> -<th>What</th> -<th>Follows</th> -</tr> -</thead> - -<tbody> -<tr> -<td>A table</td> -<td>A header</td> -</tr> - -<tr> -<td>A table</td> -<td>A header</td> -</tr> - -<tr> -<td>A table</td> -<td>A header</td> -</tr> -</tbody> -</table> - -<hr /> - -<p>There&rsquo;s a horizontal rule above and below this.</p> - -<hr /> - -<p>Here is an unordered list:</p> - -<ul> -<li>Salt-n-Pepa</li> -<li>Bel Biv DeVoe</li> -<li>Kid &lsquo;N Play</li> -</ul> - -<p>And an ordered list:</p> - -<ol> -<li>Michael Jackson</li> -<li>Michael Bolton</li> -<li>Michael Bublé</li> -</ol> - -<p>And an unordered task list:</p> - -<ul class="task-list"> -<li><label><input type="checkbox" checked disabled class="task-list-item"> Create a sample markdown document</label></li> -<li><label><input type="checkbox" checked disabled class="task-list-item"> Add task lists to it</label></li> -<li><label><input type="checkbox" disabled class="task-list-item"> Take a vacation</label></li> -</ul> - -<p>And a &ldquo;mixed&rdquo; task list:</p> - -<ul class="task-list"> -<li><label><input type="checkbox" disabled class="task-list-item"> Steal underpants</label></li> -<li>?</li> -<li><label><input type="checkbox" disabled class="task-list-item"> Profit!</label></li> -</ul> - -<p>And a nested list:</p> - -<ul> -<li>Jackson 5 - -<ul> -<li>Michael</li> -<li>Tito</li> -<li>Jackie</li> -<li>Marlon</li> -<li>Jermaine</li> -</ul></li> -<li>TMNT - -<ul> -<li>Leonardo</li> -<li>Michelangelo</li> -<li>Donatello</li> -<li>Raphael</li> -</ul></li> -</ul> - -<p>Definition lists can be used with Markdown syntax. Definition terms are bold.</p> - -<dl> -<dt>Name</dt> -<dd>Godzilla</dd> -<dt>Born</dt> -<dd>1952</dd> -<dt>Birthplace</dt> -<dd>Japan</dd> -<dt>Color</dt> -<dd>Green</dd> -</dl> - -<hr /> - -<p>Tables should have bold headings and alternating shaded rows.</p> - -<table> -<thead> -<tr> -<th>Artist</th> -<th>Album</th> -<th>Year</th> -</tr> -</thead> - -<tbody> -<tr> -<td>Michael Jackson</td> -<td>Thriller</td> -<td>1982</td> -</tr> - -<tr> -<td>Prince</td> -<td>Purple Rain</td> -<td>1984</td> -</tr> - -<tr> -<td>Beastie Boys</td> -<td>License to Ill</td> -<td>1986</td> -</tr> -</tbody> -</table> - -<p>If a table is too wide, it should scroll horizontally.</p> - -<table> -<thead> -<tr> -<th>Artist</th> -<th>Album</th> -<th>Year</th> -<th>Label</th> -<th>Awards</th> -<th>Songs</th> -</tr> -</thead> - -<tbody> -<tr> -<td>Michael Jackson</td> -<td>Thriller</td> -<td>1982</td> -<td>Epic Records</td> -<td>Grammy Award for Album of the Year, American Music Award for Favorite Pop/Rock Album, American Music Award for Favorite Soul/R&amp;B Album, Brit Award for Best Selling Album, Grammy Award for Best Engineered Album, Non-Classical</td> -<td>Wanna Be Startin&rsquo; Somethin&rsquo;, Baby Be Mine, The Girl Is Mine, Thriller, Beat It, Billie Jean, Human Nature, P.Y.T. (Pretty Young Thing), The Lady in My Life</td> -</tr> - -<tr> -<td>Prince</td> -<td>Purple Rain</td> -<td>1984</td> -<td>Warner Brothers Records</td> -<td>Grammy Award for Best Score Soundtrack for Visual Media, American Music Award for Favorite Pop/Rock Album, American Music Award for Favorite Soul/R&amp;B Album, Brit Award for Best Soundtrack/Cast Recording, Grammy Award for Best Rock Performance by a Duo or Group with Vocal</td> -<td>Let&rsquo;s Go Crazy, Take Me With U, The Beautiful Ones, Computer Blue, Darling Nikki, When Doves Cry, I Would Die 4 U, Baby I&rsquo;m a Star, Purple Rain</td> -</tr> - -<tr> -<td>Beastie Boys</td> -<td>License to Ill</td> -<td>1986</td> -<td>Mercury Records</td> -<td>noawardsbutthistablecelliswide</td> -<td>Rhymin &amp; Stealin, The New Style, She&rsquo;s Crafty, Posse in Effect, Slow Ride, Girls, (You Gotta) Fight for Your Right, No Sleep Till Brooklyn, Paul Revere, Hold It Now, Hit It, Brass Monkey, Slow and Low, Time to Get Ill</td> -</tr> -</tbody> -</table> - -<hr /> - -<p>Code snippets like <code>var foo = &quot;bar&quot;;</code> can be shown inline.</p> - -<p>Also, <code>this should vertically align</code> <del><code>with this</code></del> <del>and this</del>.</p> - -<p>Code can also be shown in a block element.</p> -<pre><code>foo := "bar"; -bar := "foo";</code></pre> -<p>Code can also use syntax highlighting.</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-go" data-lang="go"><span style="color:#204a87;font-weight:bold">func</span> <span style="color:#000">main</span><span style="color:#000;font-weight:bold">(</span><span style="color:#000;font-weight:bold">)</span> <span style="color:#000;font-weight:bold">{</span> - <span style="color:#000">input</span> <span style="color:#ce5c00;font-weight:bold">:=</span> <span style="color:#4e9a06">`</span><span style="color:#4e9a06">var foo = &#34;bar&#34;;</span><span style="color:#4e9a06">`</span> - - <span style="color:#000">lexer</span> <span style="color:#ce5c00;font-weight:bold">:=</span> <span style="color:#000">lexers</span><span style="color:#000;font-weight:bold">.</span><span style="color:#000">Get</span><span style="color:#000;font-weight:bold">(</span><span style="color:#4e9a06">&#34;javascript&#34;</span><span style="color:#000;font-weight:bold">)</span> - <span style="color:#000">iterator</span><span style="color:#000;font-weight:bold">,</span> <span style="color:#000">_</span> <span style="color:#ce5c00;font-weight:bold">:=</span> <span style="color:#000">lexer</span><span style="color:#000;font-weight:bold">.</span><span style="color:#000">Tokenise</span><span style="color:#000;font-weight:bold">(</span><span style="color:#204a87;font-weight:bold">nil</span><span style="color:#000;font-weight:bold">,</span> <span style="color:#000">input</span><span style="color:#000;font-weight:bold">)</span> - <span style="color:#000">style</span> <span style="color:#ce5c00;font-weight:bold">:=</span> <span style="color:#000">styles</span><span style="color:#000;font-weight:bold">.</span><span style="color:#000">Get</span><span style="color:#000;font-weight:bold">(</span><span style="color:#4e9a06">&#34;github&#34;</span><span style="color:#000;font-weight:bold">)</span> - <span style="color:#000">formatter</span> <span style="color:#ce5c00;font-weight:bold">:=</span> <span style="color:#000">html</span><span style="color:#000;font-weight:bold">.</span><span style="color:#000">New</span><span style="color:#000;font-weight:bold">(</span><span style="color:#000">html</span><span style="color:#000;font-weight:bold">.</span><span style="color:#000">WithLineNumbers</span><span style="color:#000;font-weight:bold">(</span><span style="color:#000;font-weight:bold">)</span><span style="color:#000;font-weight:bold">)</span> - - <span style="color:#204a87;font-weight:bold">var</span> <span style="color:#000">buff</span> <span style="color:#000">bytes</span><span style="color:#000;font-weight:bold">.</span><span style="color:#000">Buffer</span> - <span style="color:#000">formatter</span><span style="color:#000;font-weight:bold">.</span><span style="color:#000">Format</span><span style="color:#000;font-weight:bold">(</span><span style="color:#ce5c00;font-weight:bold">&amp;</span><span style="color:#000">buff</span><span style="color:#000;font-weight:bold">,</span> <span style="color:#000">style</span><span style="color:#000;font-weight:bold">,</span> <span style="color:#000">iterator</span><span style="color:#000;font-weight:bold">)</span> - - <span style="color:#000">fmt</span><span style="color:#000;font-weight:bold">.</span><span style="color:#000">Println</span><span style="color:#000;font-weight:bold">(</span><span style="color:#000">buff</span><span style="color:#000;font-weight:bold">.</span><span style="color:#000">String</span><span style="color:#000;font-weight:bold">(</span><span style="color:#000;font-weight:bold">)</span><span style="color:#000;font-weight:bold">)</span> -<span style="color:#000;font-weight:bold">}</span></code></pre></div><pre><code>Long, single-line code blocks should not wrap. They should horizontally scroll if they are too long. This line should be long enough to demonstrate this.</code></pre> -<p>Inline code inside table cells should still be distinguishable.</p> - -<table> -<thead> -<tr> -<th>Language</th> -<th>Code</th> -</tr> -</thead> - -<tbody> -<tr> -<td>Javascript</td> -<td><code>var foo = &quot;bar&quot;;</code></td> -</tr> - -<tr> -<td>Ruby</td> -<td><code>foo = &quot;bar&quot;{</code></td> -</tr> -</tbody> -</table> - -<hr /> - -<p>Small images should be shown at their actual size.</p> - -<p><img src="http://placekitten.com/g/300/200/" alt="" /></p> - -<p>Large images should always scale down and fit in the content container.</p> - -<p><img src="http://placekitten.com/g/1200/800/" alt="" /></p> - -<h2 id="components">Components</h2> - -<h3 id="alerts">Alerts</h3> - -<p> - -<div class="alert alert-primary" role="alert"> - -This is an alert. -</div> - - - -<div class="alert alert-primary" role="alert"> -<h4 class="alert-heading">Note:</h4> -This is an alert with a title. -</div> - - - -<div class="alert alert-primary" role="alert"> - -This is a successful alert. -</div> - - - -<div class="alert alert-primary" role="alert"> - -This is a warning! -</div> - - - -<div class="alert alert-primary" role="alert"> -<h4 class="alert-heading">Warning!</h4> -This is a warning with a title! -</div> -</p> - -<h2 id="sizing">Sizing</h2> - -<p>Add some sections here to see how the ToC looks like. Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.</p> - -<h3 id="parameters-available">Parameters available</h3> - -<p>Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.</p> - -<h3 id="using-pixels">Using pixels</h3> - -<p>Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.</p> - -<h3 id="using-rem">Using rem</h3> - -<p>Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.</p> - -<h2 id="memory">Memory</h2> - -<p>Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.</p> - -<h3 id="ram-to-use">RAM to use</h3> - -<p>Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.</p> - -<h3 id="more-is-better">More is better</h3> - -<p>Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.</p> - -<h3 id="used-ram">Used RAM</h3> - -<p>Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.</p> -<pre><code>This is the final element on the page and there should be no margin below this.</code></pre> - - - - - \ No newline at end of file diff --git a/docs/blog/news/page/1/index.html b/docs/blog/news/page/1/index.html deleted file mode 100644 index 39296f729..000000000 --- a/docs/blog/news/page/1/index.html +++ /dev/null @@ -1 +0,0 @@ -https://jenkinsci.github.io/kubernetes-operator/blog/news/ \ No newline at end of file diff --git a/docs/blog/page/1/index.html b/docs/blog/page/1/index.html deleted file mode 100644 index 071b42a08..000000000 --- a/docs/blog/page/1/index.html +++ /dev/null @@ -1 +0,0 @@ -https://jenkinsci.github.io/kubernetes-operator/blog/ \ No newline at end of file diff --git a/docs/blog/releases/index.html b/docs/blog/releases/index.html deleted file mode 100644 index dc6f54c3e..000000000 --- a/docs/blog/releases/index.html +++ /dev/null @@ -1,293 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - -New Releases | Jenkins Operator - - - - - - - - - - - - - - - - - - - - New Releases | Jenkins Operator - - -
- - - -
-
-
-
-
- - - - - -
- - - - -
- - - - -
-
- - - - - - - - - - - -
-
- - RSS - - - - - - - - - -
-
- -

Posts in 2018

-
    - -
  • -
    -
    Release New Features
    -

    Thursday, January 04, 2018 in Releases

    - - - - - - -

    Text can be bold, italic, or strikethrough. Links should be blue with no underlines (unless hovered over). -There should be whitespace between paragraphs. There should be whitespace between paragraphs. There should be whitespace between paragraphs. …

    -

    Read more

    -
    -
  • - -
- -
-
-
-
- - - -
-
- -
-
-
- - - - -
- - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/blog/releases/index.xml b/docs/blog/releases/index.xml deleted file mode 100644 index 4aa64996c..000000000 --- a/docs/blog/releases/index.xml +++ /dev/null @@ -1,397 +0,0 @@ - - - Jenkins Operator – New Releases - https://jenkinsci.github.io/kubernetes-operator/blog/releases/ - Recent Hugo news from gohugo.io - Hugo -- gohugo.io - Thu, 04 Jan 2018 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/img/hugo.png - GoHugo.io - https://jenkinsci.github.io/kubernetes-operator/blog/releases/ - - - - - - - - - - - - Blog: Another Great Release - https://jenkinsci.github.io/kubernetes-operator/blog/2018/01/04/another-great-release/ - Thu, 04 Jan 2018 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/blog/2018/01/04/another-great-release/ - - - - - -<p>Text can be <strong>bold</strong>, <em>italic</em>, or <del>strikethrough</del>. <a href="https://github.com">Links</a> should be blue with no underlines (unless hovered over).</p> - -<p>There should be whitespace between paragraphs. There should be whitespace between paragraphs. There should be whitespace between paragraphs. There should be whitespace between paragraphs.</p> - -<p>There should be whitespace between paragraphs. There should be whitespace between paragraphs. There should be whitespace between paragraphs. There should be whitespace between paragraphs.</p> - -<blockquote> -<p>There should be no margin above this first sentence.</p> - -<p>Blockquotes should be a lighter gray with a border along the left side in the secondary color.</p> - -<p>There should be no margin below this final sentence.</p> -</blockquote> - -<h2 id="first-header">First Header</h2> - -<p>This is a normal paragraph following a header. Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong. Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong. Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.</p> - -<p>Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.</p> - -<p>On big screens, paragraphs and headings should not take up the full container width, but we want tables, code blocks and similar to take the full width.</p> - -<p>Lorem markdownum tuta hospes stabat; idem saxum facit quaterque repetito -occumbere, oves novem gestit haerebat frena; qui. Respicit recurvam erat: -pignora hinc reppulit nos <strong>aut</strong>, aptos, ipsa.</p> - -<p>Meae optatos <em>passa est</em> Epiros utiliter <em>Talibus niveis</em>, hoc lata, edidit. -Dixi ad aestum.</p> - -<h2 id="header-2">Header 2</h2> - -<blockquote> -<p>This is a blockquote following a header. Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.</p> -</blockquote> - -<h3 id="header-3">Header 3</h3> -<pre><code>This is a code block following a header.</code></pre> -<h4 id="header-4">Header 4</h4> - -<ul> -<li>This is an unordered list following a header.</li> -<li>This is an unordered list following a header.</li> -<li>This is an unordered list following a header.</li> -</ul> - -<h5 id="header-5">Header 5</h5> - -<ol> -<li>This is an ordered list following a header.</li> -<li>This is an ordered list following a header.</li> -<li>This is an ordered list following a header.</li> -</ol> - -<h6 id="header-6">Header 6</h6> - -<table> -<thead> -<tr> -<th>What</th> -<th>Follows</th> -</tr> -</thead> - -<tbody> -<tr> -<td>A table</td> -<td>A header</td> -</tr> - -<tr> -<td>A table</td> -<td>A header</td> -</tr> - -<tr> -<td>A table</td> -<td>A header</td> -</tr> -</tbody> -</table> - -<hr /> - -<p>There&rsquo;s a horizontal rule above and below this.</p> - -<hr /> - -<p>Here is an unordered list:</p> - -<ul> -<li>Salt-n-Pepa</li> -<li>Bel Biv DeVoe</li> -<li>Kid &lsquo;N Play</li> -</ul> - -<p>And an ordered list:</p> - -<ol> -<li>Michael Jackson</li> -<li>Michael Bolton</li> -<li>Michael Bublé</li> -</ol> - -<p>And an unordered task list:</p> - -<ul class="task-list"> -<li><label><input type="checkbox" checked disabled class="task-list-item"> Create a sample markdown document</label></li> -<li><label><input type="checkbox" checked disabled class="task-list-item"> Add task lists to it</label></li> -<li><label><input type="checkbox" disabled class="task-list-item"> Take a vacation</label></li> -</ul> - -<p>And a &ldquo;mixed&rdquo; task list:</p> - -<ul class="task-list"> -<li><label><input type="checkbox" disabled class="task-list-item"> Steal underpants</label></li> -<li>?</li> -<li><label><input type="checkbox" disabled class="task-list-item"> Profit!</label></li> -</ul> - -<p>And a nested list:</p> - -<ul> -<li>Jackson 5 - -<ul> -<li>Michael</li> -<li>Tito</li> -<li>Jackie</li> -<li>Marlon</li> -<li>Jermaine</li> -</ul></li> -<li>TMNT - -<ul> -<li>Leonardo</li> -<li>Michelangelo</li> -<li>Donatello</li> -<li>Raphael</li> -</ul></li> -</ul> - -<p>Definition lists can be used with Markdown syntax. Definition terms are bold.</p> - -<dl> -<dt>Name</dt> -<dd>Godzilla</dd> -<dt>Born</dt> -<dd>1952</dd> -<dt>Birthplace</dt> -<dd>Japan</dd> -<dt>Color</dt> -<dd>Green</dd> -</dl> - -<hr /> - -<p>Tables should have bold headings and alternating shaded rows.</p> - -<table> -<thead> -<tr> -<th>Artist</th> -<th>Album</th> -<th>Year</th> -</tr> -</thead> - -<tbody> -<tr> -<td>Michael Jackson</td> -<td>Thriller</td> -<td>1982</td> -</tr> - -<tr> -<td>Prince</td> -<td>Purple Rain</td> -<td>1984</td> -</tr> - -<tr> -<td>Beastie Boys</td> -<td>License to Ill</td> -<td>1986</td> -</tr> -</tbody> -</table> - -<p>If a table is too wide, it should scroll horizontally.</p> - -<table> -<thead> -<tr> -<th>Artist</th> -<th>Album</th> -<th>Year</th> -<th>Label</th> -<th>Awards</th> -<th>Songs</th> -</tr> -</thead> - -<tbody> -<tr> -<td>Michael Jackson</td> -<td>Thriller</td> -<td>1982</td> -<td>Epic Records</td> -<td>Grammy Award for Album of the Year, American Music Award for Favorite Pop/Rock Album, American Music Award for Favorite Soul/R&amp;B Album, Brit Award for Best Selling Album, Grammy Award for Best Engineered Album, Non-Classical</td> -<td>Wanna Be Startin&rsquo; Somethin&rsquo;, Baby Be Mine, The Girl Is Mine, Thriller, Beat It, Billie Jean, Human Nature, P.Y.T. (Pretty Young Thing), The Lady in My Life</td> -</tr> - -<tr> -<td>Prince</td> -<td>Purple Rain</td> -<td>1984</td> -<td>Warner Brothers Records</td> -<td>Grammy Award for Best Score Soundtrack for Visual Media, American Music Award for Favorite Pop/Rock Album, American Music Award for Favorite Soul/R&amp;B Album, Brit Award for Best Soundtrack/Cast Recording, Grammy Award for Best Rock Performance by a Duo or Group with Vocal</td> -<td>Let&rsquo;s Go Crazy, Take Me With U, The Beautiful Ones, Computer Blue, Darling Nikki, When Doves Cry, I Would Die 4 U, Baby I&rsquo;m a Star, Purple Rain</td> -</tr> - -<tr> -<td>Beastie Boys</td> -<td>License to Ill</td> -<td>1986</td> -<td>Mercury Records</td> -<td>noawardsbutthistablecelliswide</td> -<td>Rhymin &amp; Stealin, The New Style, She&rsquo;s Crafty, Posse in Effect, Slow Ride, Girls, (You Gotta) Fight for Your Right, No Sleep Till Brooklyn, Paul Revere, Hold It Now, Hit It, Brass Monkey, Slow and Low, Time to Get Ill</td> -</tr> -</tbody> -</table> - -<hr /> - -<p>Code snippets like <code>var foo = &quot;bar&quot;;</code> can be shown inline.</p> - -<p>Also, <code>this should vertically align</code> <del><code>with this</code></del> <del>and this</del>.</p> - -<p>Code can also be shown in a block element.</p> -<pre><code>foo := "bar"; -bar := "foo";</code></pre> -<p>Code can also use syntax highlighting.</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-go" data-lang="go"><span style="color:#204a87;font-weight:bold">func</span> <span style="color:#000">main</span><span style="color:#000;font-weight:bold">(</span><span style="color:#000;font-weight:bold">)</span> <span style="color:#000;font-weight:bold">{</span> - <span style="color:#000">input</span> <span style="color:#ce5c00;font-weight:bold">:=</span> <span style="color:#4e9a06">`</span><span style="color:#4e9a06">var foo = &#34;bar&#34;;</span><span style="color:#4e9a06">`</span> - - <span style="color:#000">lexer</span> <span style="color:#ce5c00;font-weight:bold">:=</span> <span style="color:#000">lexers</span><span style="color:#000;font-weight:bold">.</span><span style="color:#000">Get</span><span style="color:#000;font-weight:bold">(</span><span style="color:#4e9a06">&#34;javascript&#34;</span><span style="color:#000;font-weight:bold">)</span> - <span style="color:#000">iterator</span><span style="color:#000;font-weight:bold">,</span> <span style="color:#000">_</span> <span style="color:#ce5c00;font-weight:bold">:=</span> <span style="color:#000">lexer</span><span style="color:#000;font-weight:bold">.</span><span style="color:#000">Tokenise</span><span style="color:#000;font-weight:bold">(</span><span style="color:#204a87;font-weight:bold">nil</span><span style="color:#000;font-weight:bold">,</span> <span style="color:#000">input</span><span style="color:#000;font-weight:bold">)</span> - <span style="color:#000">style</span> <span style="color:#ce5c00;font-weight:bold">:=</span> <span style="color:#000">styles</span><span style="color:#000;font-weight:bold">.</span><span style="color:#000">Get</span><span style="color:#000;font-weight:bold">(</span><span style="color:#4e9a06">&#34;github&#34;</span><span style="color:#000;font-weight:bold">)</span> - <span style="color:#000">formatter</span> <span style="color:#ce5c00;font-weight:bold">:=</span> <span style="color:#000">html</span><span style="color:#000;font-weight:bold">.</span><span style="color:#000">New</span><span style="color:#000;font-weight:bold">(</span><span style="color:#000">html</span><span style="color:#000;font-weight:bold">.</span><span style="color:#000">WithLineNumbers</span><span style="color:#000;font-weight:bold">(</span><span style="color:#000;font-weight:bold">)</span><span style="color:#000;font-weight:bold">)</span> - - <span style="color:#204a87;font-weight:bold">var</span> <span style="color:#000">buff</span> <span style="color:#000">bytes</span><span style="color:#000;font-weight:bold">.</span><span style="color:#000">Buffer</span> - <span style="color:#000">formatter</span><span style="color:#000;font-weight:bold">.</span><span style="color:#000">Format</span><span style="color:#000;font-weight:bold">(</span><span style="color:#ce5c00;font-weight:bold">&amp;</span><span style="color:#000">buff</span><span style="color:#000;font-weight:bold">,</span> <span style="color:#000">style</span><span style="color:#000;font-weight:bold">,</span> <span style="color:#000">iterator</span><span style="color:#000;font-weight:bold">)</span> - - <span style="color:#000">fmt</span><span style="color:#000;font-weight:bold">.</span><span style="color:#000">Println</span><span style="color:#000;font-weight:bold">(</span><span style="color:#000">buff</span><span style="color:#000;font-weight:bold">.</span><span style="color:#000">String</span><span style="color:#000;font-weight:bold">(</span><span style="color:#000;font-weight:bold">)</span><span style="color:#000;font-weight:bold">)</span> -<span style="color:#000;font-weight:bold">}</span></code></pre></div><pre><code>Long, single-line code blocks should not wrap. They should horizontally scroll if they are too long. This line should be long enough to demonstrate this.</code></pre> -<p>Inline code inside table cells should still be distinguishable.</p> - -<table> -<thead> -<tr> -<th>Language</th> -<th>Code</th> -</tr> -</thead> - -<tbody> -<tr> -<td>Javascript</td> -<td><code>var foo = &quot;bar&quot;;</code></td> -</tr> - -<tr> -<td>Ruby</td> -<td><code>foo = &quot;bar&quot;{</code></td> -</tr> -</tbody> -</table> - -<hr /> - -<p>Small images should be shown at their actual size.</p> - -<p><img src="http://placekitten.com/g/300/200/" alt="" /></p> - -<p>Large images should always scale down and fit in the content container.</p> - -<p><img src="http://placekitten.com/g/1200/800/" alt="" /></p> - -<h2 id="components">Components</h2> - -<h3 id="alerts">Alerts</h3> - -<p> - -<div class="alert alert-primary" role="alert"> - -This is an alert. -</div> - - - -<div class="alert alert-primary" role="alert"> -<h4 class="alert-heading">Note:</h4> -This is an alert with a title. -</div> - - - -<div class="alert alert-primary" role="alert"> - -This is a successful alert. -</div> - - - -<div class="alert alert-primary" role="alert"> - -This is a warning! -</div> - - - -<div class="alert alert-primary" role="alert"> -<h4 class="alert-heading">Warning!</h4> -This is a warning with a title! -</div> -</p> - -<h2 id="sizing">Sizing</h2> - -<p>Add some sections here to see how the ToC looks like. Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.</p> - -<h3 id="parameters-available">Parameters available</h3> - -<p>Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.</p> - -<h3 id="using-pixels">Using pixels</h3> - -<p>Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.</p> - -<h3 id="using-rem">Using rem</h3> - -<p>Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.</p> - -<h2 id="memory">Memory</h2> - -<p>Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.</p> - -<h3 id="ram-to-use">RAM to use</h3> - -<p>Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.</p> - -<h3 id="more-is-better">More is better</h3> - -<p>Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.</p> - -<h3 id="used-ram">Used RAM</h3> - -<p>Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.</p> -<pre><code>This is the final element on the page and there should be no margin below this.</code></pre> - - - - - \ No newline at end of file diff --git a/docs/blog/releases/page/1/index.html b/docs/blog/releases/page/1/index.html deleted file mode 100644 index bc2f8fcb2..000000000 --- a/docs/blog/releases/page/1/index.html +++ /dev/null @@ -1 +0,0 @@ -https://jenkinsci.github.io/kubernetes-operator/blog/releases/ \ No newline at end of file diff --git a/docs/community/index.html b/docs/community/index.html deleted file mode 100644 index 1f3115095..000000000 --- a/docs/community/index.html +++ /dev/null @@ -1,148 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - -Community | Jenkins Operator - - - - - - - - - - - - - - - - - - - - - -
- - - -
-
-
- - - -
-
- -

Join the Jenkins Operator community

- -

Jenkins Operator is an open source project that anyone in the community can use, improve, and enjoy. We'd love you to join us! Here's a few ways to find out what's happening and get involved. - -

-
- - - - - - - -
- - -
- - -
- - - - -
- - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/community/index.xml b/docs/community/index.xml deleted file mode 100644 index e73eae94b..000000000 --- a/docs/community/index.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - Jenkins Operator – Community - https://jenkinsci.github.io/kubernetes-operator/community/ - Recent Hugo news from gohugo.io - Hugo -- gohugo.io - - https://jenkinsci.github.io/kubernetes-operator/img/hugo.png - GoHugo.io - https://jenkinsci.github.io/kubernetes-operator/community/ - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/docs/developer-guide/index.html b/docs/docs/developer-guide/index.html deleted file mode 100644 index 4cc8bcdf0..000000000 --- a/docs/docs/developer-guide/index.html +++ /dev/null @@ -1,1411 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - -Developer Guide | Jenkins Operator - - - - - - - - - - - - - - - - - - - - Developer Guide | Jenkins Operator - - -
- - - -
-
-
-
-
- - - - - -
- - - - -
- - - - -
- -
- - - -
-

Developer Guide

-
Jenkins Operator for developers
- - - - -
-

This document explains how to setup your development environment.

- -
- - -

Prerequisites

- -
    -
  • operator_sdk version 1.3.0
  • -
  • git
  • -
  • go version 1.15.6
  • -
  • goimports, golint, checkmake and staticcheck
  • -
  • minikube version 1.21.0 (preferred Hypervisor - virtualbox) (automatically downloaded)
  • -
  • docker version 17.03+
  • -
- -

Clone repository and download dependencies

-
git clone git@github.com:jenkinsci/kubernetes-operator.git
-cd kubernetes-operator
-make go-dependencies
-

Build and run with a minikube

- -

Start minikube instance configured for Jenkins Operator. Appropriate minikube version will be downloaded to bin folder.

-
make minikube-start
-

Next run Jenkins Operator locally.

-
make run
-

Console output indicating readiness of this phase:

-
+ build
-+ run
-kubectl config use-context minikube
-Switched to context "minikube".
-Watching 'default' namespace
-bin/manager --jenkins-api-hostname=192.168.99.252 --jenkins-api-port=0 --jenkins-api-use-nodeport=true --cluster-domain=cluster.local
-2021-02-08T14:14:45.263+0100    INFO    cmd     Version: v0.5.0
-2021-02-08T14:14:45.263+0100    INFO    cmd     Git commit: 305dbeda-dirty-dirty
-2021-02-08T14:14:45.264+0100    INFO    cmd     Go Version: go1.15.6
-2021-02-08T14:14:45.264+0100    INFO    cmd     Go OS/Arch: darwin/amd64
-2021-02-08T14:14:45.264+0100    INFO    cmd     Watch namespace: default
-2021-02-08T14:14:45.592+0100    INFO    controller-runtime.metrics      metrics server is starting to listen    {"addr": "0.0.0.0:8383"}
-2021-02-08T14:14:45.599+0100    INFO    cmd     starting manager
-2021-02-08T14:14:45.599+0100    INFO    controller-runtime.manager      starting metrics server {"path": "/metrics"}
-2021-02-08T14:14:45.599+0100    INFO    controller-runtime.manager.controller.jenkins   Starting EventSource    {"reconciler group": "jenkins.io", "reconciler kind": "Jenkins", "source": "kind source: jenkins.io/v1alpha2, Kind=Jenkins"}
-2021-02-08T14:14:45.700+0100    INFO    controller-runtime.manager.controller.jenkins   Starting EventSource    {"reconciler group": "jenkins.io", "reconciler kind": "Jenkins", "source": "kind source: /, Kind="}
-2021-02-08T14:14:45.800+0100    INFO    controller-runtime.manager.controller.jenkins   Starting EventSource    {"reconciler group": "jenkins.io", "reconciler kind": "Jenkins", "source": "kind source: /, Kind="}
-2021-02-08T14:14:45.901+0100    INFO    controller-runtime.manager.controller.jenkins   Starting EventSource    {"reconciler group": "jenkins.io", "reconciler kind": "Jenkins", "source": "kind source: /, Kind="}
-2021-02-08T14:14:46.003+0100    INFO    controller-runtime.manager.controller.jenkins   Starting EventSource    {"reconciler group": "jenkins.io", "reconciler kind": "Jenkins", "source": "kind source: core/v1, Kind=Secret"}
-2021-02-08T14:14:46.004+0100    INFO    controller-runtime.manager.controller.jenkins   Starting EventSource    {"reconciler group": "jenkins.io", "reconciler kind": "Jenkins", "source": "kind source: core/v1, Kind=ConfigMap"}
-2021-02-08T14:14:46.004+0100    INFO    controller-runtime.manager.controller.jenkins   Starting EventSource    {"reconciler group": "jenkins.io", "reconciler kind": "Jenkins", "source": "kind source: jenkins.io/v1alpha2, Kind=Jenkins"}
-2021-02-08T14:14:46.004+0100    INFO    controller-runtime.manager.controller.jenkins   Starting Controller     {"reconciler group": "jenkins.io", "reconciler kind": "Jenkins"}
-2021-02-08T14:14:46.004+0100    INFO    controller-runtime.manager.controller.jenkins   Starting workers        {"reconciler group": "jenkins.io", "reconciler kind": "Jenkins", "worker count": 1}
-

Lastly apply Jenkins Custom Resource to minikube cluster:

-
kubectl apply -f config/samples/jenkins.io_v1alpha2_jenkins.yaml
-
-{"level":"info","ts":1612790690.875426,"logger":"controller-jenkins","msg":"Setting default Jenkins container command","cr":"jenkins-example"}
-{"level":"info","ts":1612790690.8754492,"logger":"controller-jenkins","msg":"Setting default Jenkins container JAVA_OPTS environment variable","cr":"jenkins-example"}
-{"level":"info","ts":1612790690.875456,"logger":"controller-jenkins","msg":"Setting default operator plugins","cr":"jenkins-example"}
-{"level":"info","ts":1612790690.875463,"logger":"controller-jenkins","msg":"Setting default Jenkins master service","cr":"jenkins-example"}
-{"level":"info","ts":1612790690.875467,"logger":"controller-jenkins","msg":"Setting default Jenkins slave service","cr":"jenkins-example"}
-{"level":"info","ts":1612790690.881811,"logger":"controller-jenkins","msg":"*v1alpha2.Jenkins/jenkins-example has been updated","cr":"jenkins-example"}
-{"level":"info","ts":1612790691.252834,"logger":"controller-jenkins","msg":"Creating a new Jenkins Master Pod default/jenkins-jenkins-example","cr":"jenkins-example"}
-{"level":"info","ts":1612790691.322793,"logger":"controller-jenkins","msg":"Jenkins master pod restarted by operator:","cr":"jenkins-example"}
-{"level":"info","ts":1612790691.322817,"logger":"controller-jenkins","msg":"Jenkins Operator version has changed, actual '' new 'v0.5.0'","cr":"jenkins-example"}
-{"level":"info","ts":1612790691.3228202,"logger":"controller-jenkins","msg":"Jenkins CR has been replaced","cr":"jenkins-example"}
-{"level":"info","ts":1612790695.8789551,"logger":"controller-jenkins","msg":"Creating a new Jenkins Master Pod default/jenkins-jenkins-example","cr":"jenkins-example"}
-{"level":"warn","ts":1612790817.9423082,"logger":"controller-jenkins","msg":"Reconcile loop failed: couldn't't init Jenkins API client: Get \"http://192.168.99.254:31998/api/json\": dial tcp 192.168.99.254:31998: connect: connection refused","cr":"jenkins-example"}
-{"level":"warn","ts":1612790817.9998221,"logger":"controller-jenkins","msg":"Reconcile loop failed: couldn't't init Jenkins API client: Get \"http://192.168.99.254:31998/api/json\": dial tcp 192.168.99.254:31998: connect: connection refused","cr":"jenkins-example"}
-{"level":"info","ts":1612790818.581316,"logger":"controller-jenkins","msg":"base-groovy ConfigMap 'jenkins-operator-base-configuration-jenkins-example' name '1-basic-settings.groovy' running groovy script","cr":"jenkins-example"}
-...
-{"level":"info","ts":1612790820.9473379,"logger":"controller-jenkins","msg":"base-groovy ConfigMap 'jenkins-operator-base-configuration-jenkins-example' name '8-disable-job-dsl-script-approval.groovy' running groovy script","cr":"jenkins-example"}
-{"level":"info","ts":1612790821.244055,"logger":"controller-jenkins","msg":"Base configuration phase is complete, took 2m6s","cr":"jenkins-example"}
-{"level":"info","ts":1612790821.7953842,"logger":"controller-jenkins","msg":"Waiting for Seed Job Agent `seed-job-agent`...","cr":"jenkins-example"}
-...
-
-{"level":"info","ts":1612790851.843638,"logger":"controller-jenkins","msg":"Waiting for Seed Job Agent `seed-job-agent`...","cr":"jenkins-example"}
-{"level":"info","ts":1612790853.489524,"logger":"controller-jenkins","msg":"User configuration phase is complete, took 2m38s","cr":"jenkins-example"}
-
-Two log lines says that Jenkins Operator works correctly:
-
-* `Base configuration phase is complete` - ensures manifests, Jenkins pod, Jenkins configuration and Jenkins API token
-* `User configuration phase is complete` - ensures Jenkins restore, backup and seed jobs along with user configuration
-
-> Details about base and user phase can be found [here](https://jenkinsci.github.io/kubernetes-operator/docs/how-it-works/architecture-and-design/).
kubectl get jenkins -o yaml
-
-apiVersion: v1
-items:
-- apiVersion: jenkins.io/v1alpha2
-  kind: Jenkins
-  metadata:
-  ...
-  spec:
-    backup:
-      action: {}
-      containerName: ""
-      interval: 0
-      makeBackupBeforePodDeletion: false
-    configurationAsCode:
-      configurations: []
-      secret:
-        name: ""
-    groovyScripts:
-      configurations: []
-      secret:
-        name: ""
-    jenkinsAPISettings:
-      authorizationStrategy: createUser
-    master:
-      basePlugins:
-      ...
-      containers:
-      - command:
-        - bash
-        - -c
-        - /var/jenkins/scripts/init.sh && exec /usr/bin/tini -s -- /usr/local/bin/jenkins.sh
-        env:
-        - name: JAVA_OPTS
-          value: -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap
-            -XX:MaxRAMFraction=1 -Djenkins.install.runSetupWizard=false -Djava.awt.headless=true
-        image: jenkins/jenkins:2.263.3-lts-alpine
-        imagePullPolicy: Always
-        livenessProbe:
-        ...
-        readinessProbe:
-        ...
-        resources:
-          limits:
-            cpu: 1500m
-            memory: 3Gi
-          requests:
-            cpu: "1"
-            memory: 500Mi
-      disableCSRFProtection: false
-    restore:
-      action: {}
-      containerName: ""
-      getLatestAction: {}
-    seedJobs:
-    - additionalClasspath: ""
-      bitbucketPushTrigger: false
-      buildPeriodically: ""
-      description: Jenkins Operator repository
-      failOnMissingPlugin: false
-      githubPushTrigger: false
-      id: jenkins-operator
-      ignoreMissingFiles: false
-      pollSCM: ""
-      repositoryBranch: master
-      repositoryUrl: https://github.com/jenkinsci/kubernetes-operator.git
-      targets: cicd/jobs/*.jenkins
-      unstableOnDeprecation: false
-    service:
-      port: 8080
-      type: NodePort
-    serviceAccount: {}
-    slaveService:
-      port: 50000
-      type: ClusterIP
-  status:
-    appliedGroovyScripts:
-    - configurationType: base-groovy
-      hash: 2ownqpRyBjQYmzTRttUx7axok3CKe2E45frI5iRwH0w=
-      name: 1-basic-settings.groovy
-      source: jenkins-operator-base-configuration-jenkins-example
-    ...
-    baseConfigurationCompletedTime: "2021-02-08T13:27:01Z"
-    createdSeedJobs:
-    - jenkins-operator
-    operatorVersion: v0.5.0
-    provisionStartTime: "2021-02-08T13:24:55Z"
-    userAndPasswordHash: nnfZsWmFfAYlYyVYeKhWW2KB4L8mE61JUfetAsr9IMM=
-    userConfigurationCompletedTime: "2021-02-08T13:27:33Z"
-kind: List
-metadata:
-  resourceVersion: ""
-  selfLink: ""
kubectl get po
-
-NAME                                              READY   STATUS              RESTARTS   AGE
-jenkins-jenkins-example                           1/1     Running             0          23m
-seed-job-agent-jenkins-example-758cc7cc5c-82hbl   1/1     Running             0          21m
-

Build and run with Docker Desktop

- -

Install Docker Desktop. If you are using Docker Desktop for Windows, you will also need to install WSL or WSL2. Ensure that Docker Desktop is currently running, and that you have enabled Kubernetes in it.

- -

Run Jenkins Operator locally.

-
make config="config.docker-desktop.env" run
-

From this point on, Docker Desktop usage is identical to minikube usage.

- -

Debug Jenkins Operator

-
make run OPERATOR_EXTRA_ARGS="--debug"
-

Stop or delete minikube cluster

- -

To stop Kubernetes cluster running locally on minikube:

-
minikube stop
-

To delete the cluster altogether:

-
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.

-
make run NAMESPACE=default KUBECTL_CONTEXT=remote-k8s EXTRA_ARGS='--kubeconfig ~/.kube/config'
-

Once Jenkins Operator are up and running, apply Jenkins custom resource:

-
kubectl --context remote-k8s --namespace default apply -f deploy/crds/jenkins_v1alpha2_jenkins_cr.yaml
-kubectl --context remote-k8s --namespace default get jenkins -o yaml
-kubectl --context remote-k8s --namespace default get po
-

Testing

- -

Tests are written using Ginkgo with Gomega.

- -

Run unit tests with go fmt, lint, staticcheck, vet:

-
make verify
-

Run unit tests only:

-
make test
-

Running E2E tests

- -

Run e2e tests with minikube:

-
make minikube-start
-make e2e
-

Run Helm e2e tests:

-
eval $(bin/minikube docker-env)
-make helm-e2e
-

Run the specific e2e test:

-
make e2e E2E_TEST_SELECTOR='^TestConfiguration$'
-

Building docker image on minikube

- -

To be able to work with the docker daemon on minikube machine run the following command before building an image:

-
eval $(bin/minikube docker-env)
-

When api/v1alpha2/jenkins_types.go has changed

- -

Run:

-
make manifests
-

Getting the Jenkins URL and basic credentials

-
minikube service jenkins-operator-http-<cr_name> --url
-kubectl get secret jenkins-operator-credentials-<cr_name> -o 'jsonpath={.data.user}' | base64 -d
-kubectl get secret jenkins-operator-credentials-<cr_name> -o 'jsonpath={.data.password}' | base64 -d
-

Webhook

- -

To deploy the operator along with webhook, run :

-
eval $(minikube docker-env)
-make deploy-webhook
-

It uses cert-manager as an external dependency.

- -

Self-learning

- - - -
- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - -
Last modified January 16, 2023 -
-
- -
-
-
- - - - -
- - - - - - - - - - - - - - diff --git a/docs/docs/developer-guide/index.xml b/docs/docs/developer-guide/index.xml deleted file mode 100644 index e6e3640fb..000000000 --- a/docs/docs/developer-guide/index.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - Jenkins Operator – Developer Guide - https://jenkinsci.github.io/kubernetes-operator/docs/developer-guide/ - Recent Hugo news from gohugo.io - Hugo -- gohugo.io - Mon, 16 Jan 2023 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/img/hugo.png - GoHugo.io - https://jenkinsci.github.io/kubernetes-operator/docs/developer-guide/ - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/docs/faq/index.html b/docs/docs/faq/index.html deleted file mode 100644 index c2d6ec8af..000000000 --- a/docs/docs/faq/index.html +++ /dev/null @@ -1,1167 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - -FAQ | Jenkins Operator - - - - - - - - - - - - - - - - - - - - FAQ | Jenkins Operator - - -
- - - -
-
-
-
-
- - - - - -
- - - - -
- - - - -
- -
- - - -
-

FAQ

-
Frequently Asked Questions about running Jenkins Operator
- - -

This document answers the most frequently asked questions.

- -

My Jenkins pod keeps restarting with ‘missing-plugins’ errors.

- -

Jenkins can lose compatibility with its plugins or their dependencies. -If you want to reduce the probability of it happening, don’t use ‘latest’ Jenkins image tag. -Use set version of Jenkins image and declare plugins and all their dependencies in the Jenkins -Custom Resource under ‘plugins’. If you are not sure which plugins to pin, you can check the logs -from the ‘initial-config’ initcontainer or ‘jenkins-master’.

- -

My job fails saying I don’t have necessary permissions.

- -

You can always add a custom Role for your Jenkins with the permissions you need and reference it in the -Jenkins Custom Resource under ‘spec.roles’. The Operator will create a RoleBinding for it. Be careful. -Operator may also not have these permissions. As a quick temporary workaround, you can manually bind this -role to the Operator service account.

- -

How can I change JENKINS_HOME from volume to Persistent Volume?

- -

In order to provide smooth extension, scalability and errorless backups, Jenkins needs to stay ephemeral. -There is no way to change volume for JENKINS_HOME. All the configurations should be volatile in Jenkins -and kept in a VCS.

- -
- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - -
Last modified August 19, 2021 -
-
- -
-
-
- - - - -
- - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/docs/faq/index.xml b/docs/docs/faq/index.xml deleted file mode 100644 index 149a3b542..000000000 --- a/docs/docs/faq/index.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - Jenkins Operator – FAQ - https://jenkinsci.github.io/kubernetes-operator/docs/faq/ - Recent Hugo news from gohugo.io - Hugo -- gohugo.io - Thu, 19 Aug 2021 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/img/hugo.png - GoHugo.io - https://jenkinsci.github.io/kubernetes-operator/docs/faq/ - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/docs/getting-started/index.html b/docs/docs/getting-started/index.html deleted file mode 100644 index ca947b9f5..000000000 --- a/docs/docs/getting-started/index.html +++ /dev/null @@ -1,1201 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - -Getting Started | Jenkins Operator - - - - - - - - - - - - - - - - - - - - Getting Started | Jenkins Operator - - -
- - - -
-
-
-
-
- - - - - -
- - - - -
- - - - -
-
- - - - - - - - - - - - - -
-
- - - -
-

Getting Started

-
How to work with Jenkins Operator
- - - - -
-

This document describes a getting started guide for Jenkins Operator

- -
- - -

First Steps

- -

Prepare your Kubernetes cluster and set up your kubectl access.

- -

Once you have a running Kubernetes cluster you can focus on installing Jenkins Operator according to the -Installation guide.

- -
- - - - -
- - - - - - -
-
- Latest (v0.7.x) -
-

How to work with the latest, currently supported Jenkins Operator version. -

-
- - - -
-
- v0.6.x -
-

How to work with Jenkins Operator 0.6.x version. We recommend migrating to a newer version. -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- v0.5.x -
-

How to work with Jenkins Operator 0.5.x version. We recommend migrating to a newer version. -

-
- - - - - - - - - - - - - - - - - -
-
- v0.4.x -
-

How to work with Jenkins Operator 0.4.x version. We recommend migrating to a newer version. -

-
- - - - - - - - - - - - - - - - - -
-
- v0.3.x -
-

How to work with Jenkins Operator 0.3.x version. We recommend migrating to a newer version. -

-
- - - - - - - - - -
-
- v0.2.x -
-

How to work with Jenkins Operator 0.2.x version. We recommend migrating to a newer version. -

-
- - - - - - - - - -
-
- v0.1.x -
-

How to work with Jenkins Operator 0.1.x version. We recommend migrating to a newer version. -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - -
Last modified August 19, 2021 -
-
- -
-
-
- - - - -
- - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/docs/getting-started/index.xml b/docs/docs/getting-started/index.xml deleted file mode 100644 index 6ccbf29d7..000000000 --- a/docs/docs/getting-started/index.xml +++ /dev/null @@ -1,221 +0,0 @@ - - - Jenkins Operator – Getting Started - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/ - Recent Hugo news from gohugo.io - Hugo -- gohugo.io - Thu, 19 Aug 2021 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/img/hugo.png - GoHugo.io - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/ - - - - - - - - - - - - Docs: Latest (v0.7.x) - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/ - Wed, 08 Dec 2021 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/ - - - - - - - -<div class="pageinfo pageinfo-primary"> -<p>This document describes a getting started guide for <strong>Jenkins Operator</strong> <code>v0.7.x</code> and also additional configuration.</p> - -</div> - - -<h2 id="first-steps">First Steps</h2> - -<p>Prepare your Kubernetes cluster and set up your <code>kubectl</code> access.</p> - -<p>Once you have a running Kubernetes cluster you can focus on installing <strong>Jenkins Operator</strong> according to the -<a href="https://jenkinsci.github.io/kubernetes-operator/kubernetes-operator/docs/getting-started/latest/installing-the-operator/">Installation</a> guide.</p> - - - - - - Docs: v0.6.x - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.6.x/ - Wed, 08 Dec 2021 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.6.x/ - - - - - - - -<div class="pageinfo pageinfo-primary"> -<p>This document describes a getting started guide for <strong>Jenkins Operator</strong> <code>v0.6.x</code> and also additional configuration.</p> - -</div> - - -<h2 id="first-steps">First Steps</h2> - -<p>Prepare your Kubernetes cluster and set up your <code>kubectl</code> access.</p> - -<p>Once you have a running Kubernetes cluster you can focus on installing <strong>Jenkins Operator</strong> according to the -<a href="https://jenkinsci.github.io/kubernetes-operator/kubernetes-operator/docs/getting-started/latest/installing-the-operator/">Installation</a> guide.</p> - - - - - - Docs: v0.5.x - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.5.x/ - Thu, 19 Aug 2021 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.5.x/ - - - - - - - -<div class="pageinfo pageinfo-primary"> -<p>This document describes a getting started guide for <strong>Jenkins Operator</strong> <code>v0.5.x</code> and also additional configuration.</p> - -</div> - - -<h2 id="first-steps">First Steps</h2> - -<p>Prepare your Kubernetes cluster and set up your <code>kubectl</code> access.</p> - -<p>Once you have running Kubernetes cluster you can focus on installing <strong>Jenkins Operator</strong> according to the <a href="https://jenkinsci.github.io/kubernetes-operator/kubernetes-operator/docs/installation/">Installation</a> guide.</p> - - - - - - Docs: v0.4.x - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.4.x/ - Thu, 19 Aug 2021 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.4.x/ - - - - - - - -<div class="pageinfo pageinfo-primary"> -<p>This document describes a getting started guide for <strong>Jenkins Operator</strong> <code>v0.4.x</code> and also additional configuration.</p> - -</div> - - -<h2 id="first-steps">First Steps</h2> - -<p>Prepare your Kubernetes cluster and set up your <code>kubectl</code> access.</p> - -<p>Once you have running Kubernetes cluster you can focus on installing <strong>Jenkins Operator</strong> according to the <a href="https://jenkinsci.github.io/kubernetes-operator/kubernetes-operator/docs/installation/">Installation</a> guide.</p> - - - - - - Docs: v0.3.x - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.3.x/ - Thu, 19 Aug 2021 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.3.x/ - - - - - - - -<div class="pageinfo pageinfo-primary"> -<p>This document describes a getting started guide for <strong>Jenkins Operator</strong> <code>v0.3.x</code> and also additional configuration.</p> - -</div> - - -<h2 id="first-steps">First Steps</h2> - -<p>Prepare your Kubernetes cluster and set up your <code>kubectl</code> access.</p> - -<p>Once you have running Kubernetes cluster you can focus on installing <strong>Jenkins Operator</strong> according to the <a href="https://jenkinsci.github.io/kubernetes-operator/kubernetes-operator/docs/installation/">Installation</a> guide.</p> - - - - - - Docs: v0.2.x - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.2.x/ - Thu, 19 Aug 2021 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.2.x/ - - - - - - - -<div class="pageinfo pageinfo-primary"> -<p>This document describes a getting started guide for <strong>Jenkins Operator</strong> <code>v0.2.x</code> and also additional configuration.</p> - -</div> - - -<h2 id="first-steps">First Steps</h2> - -<p>Prepare your Kubernetes cluster and set up your <code>kubectl</code> access.</p> - -<p>Once you have running Kubernetes cluster you can focus on installing <strong>Jenkins Operator</strong> according to the <a href="https://jenkinsci.github.io/kubernetes-operator/kubernetes-operator/docs/installation/">Installation</a> guide.</p> - - - - - - Docs: v0.1.x - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.1.x/ - Thu, 19 Aug 2021 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.1.x/ - - - - - - - -<div class="pageinfo pageinfo-primary"> -<p>This document describes a getting started guide for <strong>Jenkins Operator</strong> <code>v0.1.x</code> and also additional configuration.</p> - -</div> - - -<h2 id="first-steps">First Steps</h2> - -<p>Prepare your Kubernetes cluster and set up your <code>kubectl</code> access.</p> - -<p>Once you have running Kubernetes cluster you can focus on installing <strong>Jenkins Operator</strong> according to the <a href="https://jenkinsci.github.io/kubernetes-operator/docs/installation/">Installation</a> guide.</p> - - - - - - \ No newline at end of file diff --git a/docs/docs/getting-started/latest/aks/index.html b/docs/docs/getting-started/latest/aks/index.html deleted file mode 100644 index b4ff2eb6c..000000000 --- a/docs/docs/getting-started/latest/aks/index.html +++ /dev/null @@ -1,986 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -AKS | Jenkins Operator - - - - - - - - - - - - - - - - - - - - - - - - - - - - AKS | Jenkins Operator - - -
- - - -
-
-
-
-
- - - - - -
- - - - -
- - - - -
-
- - - - - - - - - - - -
-
- - - -
-

AKS

-
Additional configuration for Azure Kubernetes Service
-

Azure AKS managed Kubernetes service adds to every pod the following environment variables:

-
- name: KUBERNETES_PORT_443_TCP_ADDR
-  value:
-- name: KUBERNETES_PORT
-  value: tcp://
-- name: KUBERNETES_PORT_443_TCP
-  value: tcp://
-- name: KUBERNETES_SERVICE_HOST
-  value:
-

The operator is aware of it and omits these environment variables when checking if a Jenkins pod environment has been changed. It prevents the -restart of a Jenkins pod over and over again.

- - - -
Last modified December 8, 2021 -
-
- - -
-
-
- - - - -
- - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/docs/getting-started/latest/configuring-backup-and-restore/index.html b/docs/docs/getting-started/latest/configuring-backup-and-restore/index.html deleted file mode 100644 index 31bc3ec0f..000000000 --- a/docs/docs/getting-started/latest/configuring-backup-and-restore/index.html +++ /dev/null @@ -1,1089 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Configuring backup and restore | Jenkins Operator - - - - - - - - - - - - - - - - - - - - - - - - - - - - Configuring backup and restore | Jenkins Operator - - -
- - - -
-
-
-
-
- - - - - -
- - - - -
- - - - -
-
- - - - - - - - - - - - - - - -
-
- - - -
-

Configuring backup and restore

-
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

- -

Create PVC

- -

Save to the file named pvc.yaml:

-
apiVersion: v1
-kind: PersistentVolumeClaim
-metadata:
-  name: <pvc_name>
-  namespace: <namespace>
-spec:
-  accessModes:
-  - ReadWriteOnce
-  resources:
-    requests:
-      storage: 500Gi
-

Run the following command:

-
$ kubectl -n <namespace> create -f pvc.yaml
-

Configure Jenkins CR

-
apiVersion: jenkins.io/v1alpha2
-kind: Jenkins
-metadata:
-  name: jenkins-cr
-spec:
-  jenkinsAPISettings:
-    authorizationStrategy: createUser
-  master:
-    securityContext:
-      runAsUser: 1000
-      fsGroup: 1000
-    disableCSRFProtection: false
-    containers:
-      - name: jenkins-master
-        image: jenkins/jenkins:2.277.4-lts-alpine
-        imagePullPolicy: IfNotPresent
-        resources:
-          limits:
-            cpu: 1500m
-            memory: 3Gi
-          requests:
-            cpu: "1"
-            memory: 500Mi
-      - name: backup # container responsible for the backup and restore
-        env:
-          - name: BACKUP_DIR
-            value: /backup
-          - name: JENKINS_HOME
-            value: /jenkins-home
-          - name: BACKUP_COUNT
-            value: "3" # keep only the 2 most recent backups
-        image: virtuslab/jenkins-operator-backup-pvc:v0.1.1 # look at backup/pvc directory
-        imagePullPolicy: IfNotPresent
-        volumeMounts:
-          - mountPath: /jenkins-home # Jenkins home volume
-            name: jenkins-home
-          - mountPath: /backup # backup volume
-            name: backup
-        resources:
-          limits:
-            cpu: 1000m
-            memory: 3Gi
-          requests:
-            cpu: "1"
-            memory: 500Mi
-    volumes:
-      - name: backup # PVC volume where backups will be stored
-        persistentVolumeClaim:
-          claimName: <pvc_name>
-  backup:
-    containerName: backup # container name is responsible for backup
-    action:
-      exec:
-        command:
-          - /home/user/bin/backup.sh # this command is invoked on "backup" container to make backup, for example /home/user/bin/backup.sh <backup_number>, <backup_number> is passed by operator
-    interval: 30 # how often make backup in seconds
-    makeBackupBeforePodDeletion: true # make a backup before pod deletion
-  restore:
-    containerName: backup # container name is responsible for restore backup
-    action:
-      exec:
-        command:
-          - /home/user/bin/restore.sh # this command is invoked on "backup" container to make restore backup, for example /home/user/bin/restore.sh <backup_number>, <backup_number> is passed by operator
-    #recoveryOnce: <backup_number> # if want to restore specific backup configure this field and then Jenkins will be restarted and desired backup will be restored
-    getLatestAction:
-      exec:
-        command:
-          - /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
- - -
Last modified January 8, 2023 -
-
- - -
-
-
- - - - -
- - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/docs/getting-started/latest/configuring-seed-jobs-and-pipelines/index.html b/docs/docs/getting-started/latest/configuring-seed-jobs-and-pipelines/index.html deleted file mode 100644 index 5a52cf054..000000000 --- a/docs/docs/getting-started/latest/configuring-seed-jobs-and-pipelines/index.html +++ /dev/null @@ -1,1273 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Configuring Seed Jobs and Pipelines | Jenkins Operator - - - - - - - - - - - - - - - - - - - - - - - - - - - - Configuring Seed Jobs and Pipelines | Jenkins Operator - - -
- - - -
-
-
-
-
- - - - - -
- - - - -
- - - - -
- -
- - - -
-

Configuring Seed Jobs and Pipelines

-
How to configure Jenkins with Operator
- - -

Configure Seed Jobs and Pipelines

- -

Jenkins operator uses job-dsl and kubernetes-credentials-provider plugins for configuring jobs -and deploy keys.

- -

Prepare job definitions and pipelines

- -

First you have to prepare pipelines and job definition in your GitHub repository using the following structure:

-
cicd/
-├── jobs
-│   └── k8s.jenkins
-└── pipelines
-    └── k8s.jenkins
-

cicd/jobs/k8s.jenkins is a job definition:

-
#!/usr/bin/env groovy
-
-pipelineJob('k8s-e2e') {
-    displayName('Kubernetes Plugin E2E Test')
-
-    logRotator {
-        numToKeep(10)
-        daysToKeep(30)
-    }
-
-    configure { project ->
-        project / 'properties' / 'org.jenkinsci.plugins.workflow.job.properties.DurabilityHintJobProperty' {
-            hint('PERFORMANCE_OPTIMIZED')
-        }
-    }
-
-    definition {
-        cpsScm {
-            scm {
-                git {
-                    remote {
-                        url('https://github.com/jenkinsci/kubernetes-operator.git')
-                        credentials('jenkins-operator')
-                    }
-                    branches('*/master')
-                }
-            }
-            scriptPath('cicd/pipelines/k8s.jenkins')
-        }
-    }
-}
-

cicd/pipelines/k8s.jenkins is an actual Jenkins pipeline:

-
#!/usr/bin/env groovy
-
-def label = "k8s-${UUID.randomUUID().toString()}"
-def home = "/home/jenkins"
-def workspace = "${home}/workspace/build-jenkins-operator"
-def workdir = "${workspace}/src/github.com/jenkinsci/kubernetes-operator/"
-
-podTemplate(label: label,
-        containers: [
-                containerTemplate(name: 'alpine', image: 'alpine:3.11', ttyEnabled: true, command: 'cat'),
-        ],
-        ) {
-    node(label) {
-        stage('Run shell') {
-            container('alpine') {
-                sh 'echo "hello world"'
-            }
-        }
-    }
-}
-

Configure Seed Jobs

- -

Jenkins Seed Jobs are configured using Jenkins.spec.seedJobs section from your custom resource manifest:

-
apiVersion: jenkins.io/v1alpha2
-kind: Jenkins
-metadata:
-  name: example
-spec:
-  seedJobs:
-  - id: jenkins-operator
-    targets: "cicd/jobs/*.jenkins"
-    description: "Jenkins Operator repository"
-    repositoryBranch: master
-    repositoryUrl: https://github.com/jenkinsci/kubernetes-operator.git
-

Jenkins Operator will automatically discover and configure all the seed jobs.

- -

You can verify if deploy keys were successfully configured in the Jenkins Credentials tab.

- -

jenkins

- -

You can verify if your pipelines were successfully configured in the Jenkins Seed Job console output.

- -

jenkins

- -

If your GitHub repository is private you have to configure SSH or username/password authentication.

- -

SSH authentication

- -

Generate SSH Keys

- -

There are two methods of SSH private key generation:

-
$ openssl genrsa -out <filename> 2048
-

or

-
$ ssh-keygen -t rsa -b 2048
-$ ssh-keygen -p -f <filename> -m pem
-

Then copy content from generated file.

- -

Public key

- -

If you want to upload your public key to your Git server you need to extract it.

- -

If key was generated by openssl then you need to type this to extract public key:

-
$ openssl rsa -in <filename> -pubout > <filename>.pub
-

If key was generated by ssh-keygen the public key content is located in .pub and there is no need to extract public key

- -

Configure SSH authentication

- -

Configure a seed job like this:

-
apiVersion: jenkins.io/v1alpha2
-kind: Jenkins
-metadata:
-  name: example
-spec:
-  seedJobs:
-  - id: jenkins-operator-ssh
-    credentialType: basicSSHUserPrivateKey
-    credentialID: k8s-ssh
-    targets: "cicd/jobs/*.jenkins"
-    description: "Jenkins Operator repository"
-    repositoryBranch: master
-    repositoryUrl: git@github.com:jenkinsci/kubernetes-operator.git
-

and create a Kubernetes Secret (name of secret should be the same from credentialID field):

-
apiVersion: v1
-kind: Secret
-metadata:
-  name: k8s-ssh
-  labels:
-    "jenkins.io/credentials-type": "basicSSHUserPrivateKey"
-  annotations:
-    "jenkins.io/credentials-description" : "ssh github.com:jenkinsci/kubernetes-operator"
-stringData:
-  privateKey: |
-    -----BEGIN RSA PRIVATE KEY-----
-    MIIJKAIBAAKCAgEAxxDpleJjMCN5nusfW/AtBAZhx8UVVlhhhIKXvQ+dFODQIdzO
-    oDXybs1zVHWOj31zqbbJnsfsVZ9Uf3p9k6xpJ3WFY9b85WasqTDN1xmSd6swD4N8
-    ...
-  username: github_user_name
-

Username & password authentication

- -

Configure the seed job like:

-
apiVersion: jenkins.io/v1alpha2
-kind: Jenkins
-metadata:
-  name: example
-spec:
-  seedJobs:
-  - id: jenkins-operator-user-pass
-    credentialType: usernamePassword
-    credentialID: k8s-user-pass
-    targets: "cicd/jobs/*.jenkins"
-    description: "Jenkins Operator repository"
-    repositoryBranch: master
-    repositoryUrl: https://github.com/jenkinsci/kubernetes-operator.git
-

and create a Kubernetes Secret (name of secret should be the same from credentialID field):

-
apiVersion: v1
-kind: Secret
-metadata:
-  name: k8s-user-pass
-stringData:
-  username: github_user_name
-  password: password_or_token
-

External authentication

- -

You can use external credential type if you want to configure authentication using Configuration As Code or Groovy Script.

- -

Example:

-
apiVersion: jenkins.io/v1alpha2
-kind: Jenkins
-metadata:
-  name: example
-spec:
-  seedJobs:
-  - id: jenkins-operator-external
-    credentialType: external
-    credentialID: k8s-external
-    targets: "cicd/jobs/*.jenkins"
-    description: "Jenkins Operator repository"
-    repositoryBranch: master
-    repositoryUrl: https://github.com/jenkinsci/kubernetes-operator.git
-

Remember that credentialID must match the id of the credentials configured in Jenkins. Consult the -Jenkins docs for using credentials for details.

- -

HTTP Proxy for downloading plugins

- -

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.:

-
spec:
-  master:
-    containers:
-      - name: jenkins-master
-        env:
-          - name: CURL_OPTIONS
-            value: -L -x <proxy_url>
-

In CURL_OPTIONS var you can set additional arguments to curl command.

- -

Pulling Docker images from private repositories

- -

To pull a Docker Image from private repository you can use imagePullSecrets.

- -

Please follow the instructions on creating a secret with a docker config.

- -

Docker Hub Configuration

- -

To use Docker Hub additional steps are required.

- -

Edit the previously created secret:

-
kubectl -n <namespace> edit secret <name>
-

The .dockerconfigjson key’s value needs to be replaced with a modified version.

- -

After modifications, it needs to be encoded as a Base64 value before setting the .dockerconfigjson key.

- -

Example config file to modify and use:

-
{
-    "auths":{
-        "https://index.docker.io/v1/":{
-            "username":"user",
-            "password":"password",
-            "email":"yourdockeremail@gmail.com",
-            "auth":"base64 of string user:password"
-        },
-        "auth.docker.io":{
-            "username":"user",
-            "password":"password",
-            "email":"yourdockeremail@gmail.com",
-            "auth":"base64 of string user:password"
-        },
-        "registry.docker.io":{
-            "username":"user",
-            "password":"password",
-            "email":"yourdockeremail@gmail.com",
-            "auth":"base64 of string user:password"
-        },
-        "docker.io":{
-            "username":"user",
-            "password":"password",
-            "email":"yourdockeremail@gmail.com",
-            "auth":"base64 of string user:password"
-        },
-        "https://registry-1.docker.io/v2/": {
-            "username":"user",
-            "password":"password",
-            "email":"yourdockeremail@gmail.com",
-            "auth":"base64 of string user:password"
-        },
-        "registry-1.docker.io/v2/": {
-            "username":"user",
-            "password":"password",
-            "email":"yourdockeremail@gmail.com",
-            "auth":"base64 of string user:password"
-        },
-        "registry-1.docker.io": {
-            "username":"user",
-            "password":"password",
-            "email":"yourdockeremail@gmail.com",
-            "auth":"base64 of string user:password"
-        },
-        "https://registry-1.docker.io": {
-            "username":"user",
-            "password":"password",
-            "email":"yourdockeremail@gmail.com",
-            "auth":"base64 of string user:password"
-        }
-    }
-}
- - -
Last modified December 8, 2021 -
-
- - -
-
-
- - - - -
- - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/docs/getting-started/latest/custom-backup-and-restore/index.html b/docs/docs/getting-started/latest/custom-backup-and-restore/index.html deleted file mode 100644 index 334ece92e..000000000 --- a/docs/docs/getting-started/latest/custom-backup-and-restore/index.html +++ /dev/null @@ -1,1158 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Custom backup and restore providers | Jenkins Operator - - - - - - - - - - - - - - - - - - - - - - - - - - - - Custom backup and restore providers | Jenkins Operator - - -
- - - -
-
-
-
-
- - - - - -
- - - - -
- - - - -
- -
- - - -
-

Custom backup and restore providers

-
Custom backup and restore provider
- - -

With enough effort one can create a custom backup and restore provider -for the Jenkins Operator.

- -

Requirements

- -

Two commands (e.g. scripts) are required:

- -
    -
  • a backup command, e.g. backup.sh that takes one argument, a backup number
  • -
  • a restore command, e.g. backup.sh that takes one argument, a backup number
  • -
- -

Both scripts need to return an exit code of 0 on success and 1 or greater for failure.

- -

One of those scripts (or the entry point of the container) needs to be responsible -for backup cleanup or rotation if required, or an external system.

- -

How it works

- -

The mechanism relies on basic Kubernetes and UNIX functionalities.

- -

The backup (and restore) container runs as a sidecar in the same -Kubernetes pod as the Jenkins master.

- -

Name of the backup and restore containers can be set as necessary using -spec.backup.containerName and spec.restore.containerName. -In most cases it will be the same container, but we allow for less common use cases.

- -

The operator will call a backup or restore commands inside a sidecar container when necessary:

- -
    -
  • backup command (defined in spec.backup.action.exec.command) -will be called every N seconds configurable in: spec.backup.interval -and on pod shutdown (if enabled in spec.backup.makeBackupBeforePodDeletion) -with an integer representing the current backup number as first and only argument
  • -
  • restore command (defined in spec.restore.action.exec.command) -will be called at Jenkins startup -with an integer representing the backup number to restore as first and only argument -(can be overridden using spec.restore.recoveryOnce)
  • -
- -

Example AWS S3 backup using the CLI

- -

This example shows abbreviated version of a simple AWS S3 backup implementation -using: aws-cli, bash and kube2iam.

- -

In addition to your normal Jenkins CustomResource some additional settings -for backup and restore are required, e.g.:

-
kind: Jenkins
-apiVersion: jenkins.io/v1alpha1
-metadata:
-  name: example
-  namespace: jenkins
-spec:
-  master:
-    masterAnnotations:
-      iam.amazonaws.com/role: "my-example-backup-role" # tell kube2iam where the AWS IAM role is
-    containers:
-      - name: jenkins-master
-        ...
-      - name: backup # container responsible for backup and restore
-        image: quay.io/virtuslab/aws-cli:1.16.263-2
-        workingDir: /home/user/bin/
-        command: # our container entry point
-          - sleep
-          - infinity
-        env:
-          - name: BACKUP_BUCKET
-            value: my-example-bucket # the S3 bucket name to use
-          - name: BACKUP_PATH
-            value: my-backup-path # the S3 bucket path prefix to use
-          - name: JENKINS_HOME
-            value: /jenkins-home # the path to mount jenkins home dir in the backup container
-        volumeMounts:
-          - mountPath: /jenkins-home # Jenkins home volume
-            name: jenkins-home
-          - mountPath: /home/user/bin/backup.sh
-            name: backup-scripts
-            subPath: backup.sh
-            readOnly: true
-          - mountPath: /home/user/bin/restore.sh
-            name: backup-scripts
-            subPath: restore.sh
-            readOnly: true
-    volumes:
-      - name: backup-scripts
-        configMap:
-          defaultMode: 0754
-          name: jenkins-operator-backup-s3
-    securityContext: # make sure both containers use the same UID and GUID
-      runAsUser: 1000
-      fsGroup: 1000
-  ...
-  backup:
-    containerName: backup # container name responsible for backup
-    interval: 3600 # how often make a backup in seconds
-    makeBackupBeforePodDeletion: true # trigger backup just before deleting the pod
-    action:
-      exec:
-        command:
-          # this command is invoked on "backup" container to create a backup,
-          # <backup_number> is passed by operator,
-          # for example /home/user/bin/backup.sh <backup_number>
-          - /home/user/bin/backup.sh
-  restore:
-    containerName: backup # container name is responsible for restore backup
-    action:
-      exec:
-        command:
-          # this command is invoked on "backup" container to restore a backup,
-          # <backup_number> is passed by operator
-          # for example /home/user/bin/restore.sh <backup_number>
-          - /home/user/bin/restore.sh
-#    recoveryOnce: <backup_number> # if want to restore specific backup configure this field and then Jenkins will be restarted and desired backup will be restored
-

The actual backup and restore scripts will be provided in a ConfigMap:

-
kind: ConfigMap
-apiVersion: v1
-metadata:
-  name: jenkins-operator-backup-s3
-  namespace: jenkins
-  labels:
-    app: jenkins-operator
-data:
-  backup.sh: |-
-    #!/bin/bash -xeu
-    [[ ! $# -eq 1 ]] && echo "Usage: $0 backup_number" && exit 1;
-    [[ -z "${BACKUP_BUCKET}" ]] && echo "Required 'BACKUP_BUCKET' env not set" && exit 1;
-    [[ -z "${BACKUP_PATH}" ]] && echo "Required 'BACKUP_PATH' env not set" && exit 1;
-    [[ -z "${JENKINS_HOME}" ]] && echo "Required 'JENKINS_HOME' env not set" && exit 1;
-
-    backup_number=$1
-    echo "Running backup #${backup_number}"
-
-    BACKUP_TMP_DIR=$(mktemp -d)
-    tar -C ${JENKINS_HOME} -czf "${BACKUP_TMP_DIR}/${backup_number}.tar.gz" --exclude jobs/*/workspace* -c jobs && \
-
-    aws s3 cp ${BACKUP_TMP_DIR}/${backup_number}.tar.gz s3://${BACKUP_BUCKET}/${BACKUP_PATH}/${backup_number}.tar.gz
-    echo Done
-
-  restore.sh: |-
-    #!/bin/bash -xeu
-    [[ ! $# -eq 1 ]] && echo "Usage: $0 backup_number" && exit 1
-    [[ -z "${BACKUP_BUCKET}" ]] && echo "Required 'BACKUP_BUCKET' env not set" && exit 1;
-    [[ -z "${BACKUP_PATH}" ]] && echo "Required 'BACKUP_PATH' env not set" && exit 1;
-    [[ -z "${JENKINS_HOME}" ]] && echo "Required 'JENKINS_HOME' env not set" && exit 1;
-
-    backup_number=$1
-    echo "Running restore #${backup_number}"
-
-    BACKUP_TMP_DIR=$(mktemp -d)
-    aws s3 cp s3://${BACKUP_BUCKET}/${BACKUP_PATH}/${backup_number}.tar.gz ${BACKUP_TMP_DIR}/${backup_number}.tar.gz
-
-    tar -C ${JENKINS_HOME} -zxf "${BACKUP_TMP_DIR}/${backup_number}.tar.gz"
-    echo Done
-

In our example we will use S3 bucket lifecycle policy to keep -the number of backups under control, e.g. Cloud Formation fragment:

-
    Type: AWS::S3::Bucket
-    Properties:
-      BucketName: my-example-bucket
-      ...
-      LifecycleConfiguration:
-        Rules:
-          - Id: BackupCleanup
-            Status: Enabled
-            Prefix: my-backup-path
-            ExpirationInDays: 7
-            NoncurrentVersionExpirationInDays: 14
-            AbortIncompleteMultipartUpload:
-              DaysAfterInitiation: 3
- - -
Last modified December 8, 2021 -
-
- - -
-
-
- - - - -
- - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/docs/getting-started/latest/customizing-jenkins/index.html b/docs/docs/getting-started/latest/customizing-jenkins/index.html deleted file mode 100644 index 8ad3d3514..000000000 --- a/docs/docs/getting-started/latest/customizing-jenkins/index.html +++ /dev/null @@ -1,1163 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Customizing Jenkins | Jenkins Operator - - - - - - - - - - - - - - - - - - - - - - - - - - - - Customizing Jenkins | Jenkins Operator - - -
- - - -
-
-
-
-
- - - - - -
- - - - -
- - - - -
- -
- - - -
-

Customizing Jenkins

-
How to customize Jenkins
- - -

How to customize Jenkins

- -

Jenkins can be customized with plugins. -Plugin’s configuration is applied as groovy scripts or the configuration as code plugin. -Any plugin working for Jenkins can be installed by the Jenkins Operator.

- -

Pre-installed plugins:

- -
    -
  • configuration-as-code v1.55
  • -
  • git v4.10.0
  • -
  • job-dsl v1.78.1
  • -
  • kubernetes-credentials-provider v0.20
  • -
  • kubernetes v1.30.11
  • -
  • workflow-aggregator v2.6
  • -
  • workflow-job v2.42
  • -
- -

Rest of the plugins can be found in plugins repository.

- -

Install plugins

- -

Edit Custom Resource under spec.master.plugins:

-
apiVersion: jenkins.io/v1alpha2
-kind: Jenkins
-metadata:
-  name: example
-spec:
-  master:
-   plugins:
-   - name: simple-theme-plugin
-     version: "0.7"
-

Under spec.master.basePlugins you can find plugins for a valid Jenkins Operator:

-
apiVersion: jenkins.io/v1alpha2
-kind: Jenkins
-metadata:
-  name: example
-spec:
-  master:
-    basePlugins:
-    - name: kubernetes
-      version: "1.30.11"
-    - name: workflow-job
-      version: "2.42"
-    - name: workflow-aggregator
-      version: "2.6"
-    - name: git
-      version: "4.10.0"
-    - name: job-dsl
-      version: "1.78.1"
-    - name: configuration-as-code
-      version: "1.55"
-    - name: kubernetes-credentials-provider
-      version: "0.20"
-

You can change their versions.

- -

The Jenkins Operator will then automatically install plugins after the Jenkins master pod restart.

- -

Apply plugin’s config

- -

By using a ConfigMap you can create your own Jenkins customized configuration. -Then you must reference the ConfigMap in the Jenkins pod customization file in spec.groovyScripts or spec.configurationAsCode

- -

Create a ConfigMap with specific name (eg. jenkins-operator-user-configuration). Then, modify the Jenkins manifest:

-
apiVersion: jenkins.io/v1alpha2
-kind: Jenkins
-metadata:
-  name: example
-spec:
-  configurationAsCode:
-    configurations: 
-    - name: jenkins-operator-user-configuration
-  groovyScripts:
-    configurations:
-    - name: jenkins-operator-user-configuration
-

Here is an example of jenkins-operator-user-configuration:

-
apiVersion: v1
-kind: ConfigMap
-metadata:
-  name: jenkins-operator-user-configuration
-data:
-  1-configure-theme.groovy: | 
-    import jenkins.*
-    import jenkins.model.*
-    import hudson.*
-    import hudson.model.*
-    import org.jenkinsci.plugins.simpletheme.ThemeElement
-    import org.jenkinsci.plugins.simpletheme.CssTextThemeElement
-    import org.jenkinsci.plugins.simpletheme.CssUrlThemeElement
-
-    Jenkins jenkins = Jenkins.getInstance()
-
-    def decorator = Jenkins.instance.getDescriptorByType(org.codefirst.SimpleThemeDecorator.class)
-
-    List<ThemeElement> configElements = new ArrayList<>();
-    configElements.add(new CssTextThemeElement("DEFAULT"));
-    configElements.add(new CssUrlThemeElement("https://cdn.rawgit.com/afonsof/jenkins-material-theme/gh-pages/dist/material-light-green.css"));
-    decorator.setElements(configElements);
-    decorator.save();
-
-    jenkins.save()
-  1-system-message.yaml: |
-    jenkins:
-      systemMessage: "Configuration as Code integration works!!!"
-
    -
  • *.groovy is Groovy script configuration
  • -
  • *.yaml is configuration as code
  • -
- -

If you want to correct your configuration you can edit it while the Jenkins Operator is running. -Jenkins will reconcile and apply the new configuration.

- -

How to use secrets from a Groovy scripts

- -

If you configured spec.groovyScripts.secret.name, then this secret is available to use from map Groovy scripts. -The secrets are loaded to secrets map.

- -

Create a secret with for example the name jenkins-conf-secrets.

-
kind: Secret
-apiVersion: v1
-type: Opaque
-metadata:
-  name: jenkins-conf-secrets
-  namespace: default
-data:
-  SYSTEM_MESSAGE: SGVsbG8gd29ybGQ=
-

Then modify the Jenkins pod manifest by changing spec.groovyScripts.secret.name to jenkins-conf-secrets.

-
apiVersion: jenkins.io/v1alpha2
-kind: Jenkins
-metadata:
-  name: example
-spec:
-  configurationAsCode:
-    configurations: 
-    - name: jenkins-operator-user-configuration
-    secret:
-      name: jenkins-conf-secrets
-  groovyScripts:
-    configurations:
-    - name: jenkins-operator-user-configuration
-    secret:
-      name: jenkins-conf-secrets
-

Now you can test that the secret is mounted by applying this ConfigMap for Groovy script:

-
apiVersion: v1
-kind: ConfigMap
-metadata:
-  name: jenkins-operator-user-configuration
-data:
-  1-system-message.groovy: | 
-    import jenkins.*
-    import jenkins.model.*
-    import hudson.*
-    import hudson.model.*
-    Jenkins jenkins = Jenkins.getInstance()
-    
-    jenkins.setSystemMessage(secrets["SYSTEM_MESSAGE"])
-    jenkins.save()
-

Or by applying this configuration as code:

-
apiVersion: v1
-kind: ConfigMap
-metadata:
-  name: jenkins-operator-user-configuration
-data:
-  1-system-message.yaml: |
-    jenkins:
-      systemMessage: ${SYSTEM_MESSAGE}
-

After this, you should see the Hello world system message from the Jenkins homepage.

- - - -
Last modified December 8, 2021 -
-
- - -
-
-
- - - - -
- - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/docs/getting-started/latest/deploying-jenkins/index.html b/docs/docs/getting-started/latest/deploying-jenkins/index.html deleted file mode 100644 index d484f4b19..000000000 --- a/docs/docs/getting-started/latest/deploying-jenkins/index.html +++ /dev/null @@ -1,1066 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Deploying Jenkins | Jenkins Operator - - - - - - - - - - - - - - - - - - - - - - - - - - - - Deploying Jenkins | Jenkins Operator - - -
- - - -
-
-
-
-
- - - - - -
- - - - -
- - - - -
-
- - - - - - - - - - - - - -
-
- - - -
-

Deploying Jenkins

-
Deploy production ready Jenkins manifest
- - - - -
-

This document describes the procedure for deploying Jenkins.

- -
- - -

Prerequisites

- -

The Operator needs to have been deployed beforehand. The procedure for deploying Jenkins described here doesn’t apply to -installation of Operator via Helm chart unless jenkins.enabled was set to false. -That’s because by default, installation via Helm chart also covers deploying Jenkins.

- -

Deploying Jenkins instance

- -

Once Jenkins Operator is up and running let’s deploy actual Jenkins instance. -Create manifest e.g. jenkins_instance.yaml with following data and save it on drive.

-
apiVersion: jenkins.io/v1alpha2
-kind: Jenkins
-metadata:
-  name: example
-  namespace: default
-spec:
-  configurationAsCode:
-    configurations: []
-    secret:
-      name: ""
-  groovyScripts:
-    configurations: []
-    secret:
-      name: ""
-  jenkinsAPISettings:
-    authorizationStrategy: createUser
-  master:
-    disableCSRFProtection: false
-    containers:
-      - name: jenkins-master
-        image: jenkins/jenkins:2.319.1-lts-alpine
-        imagePullPolicy: Always
-        livenessProbe:
-          failureThreshold: 12
-          httpGet:
-            path: /login
-            port: http
-            scheme: HTTP
-          initialDelaySeconds: 100
-          periodSeconds: 10
-          successThreshold: 1
-          timeoutSeconds: 5
-        readinessProbe:
-          failureThreshold: 10
-          httpGet:
-            path: /login
-            port: http
-            scheme: HTTP
-          initialDelaySeconds: 80
-          periodSeconds: 10
-          successThreshold: 1
-          timeoutSeconds: 1
-        resources:
-          limits:
-            cpu: 1500m
-            memory: 3Gi
-          requests:
-            cpu: "1"
-            memory: 500Mi
-  seedJobs:
-    - id: jenkins-operator
-      targets: "cicd/jobs/*.jenkins"
-      description: "Jenkins Operator repository"
-      repositoryBranch: master
-      repositoryUrl: https://github.com/jenkinsci/kubernetes-operator.git
-

Deploy a Jenkins to Kubernetes:

-
kubectl create -f jenkins_instance.yaml
-

Watch the Jenkins instance being created:

-
kubectl get pods -w
-

Get the Jenkins credentials:

-
kubectl get secret jenkins-operator-credentials-<cr_name> -o 'jsonpath={.data.user}' | base64 -d
-kubectl get secret jenkins-operator-credentials-<cr_name> -o 'jsonpath={.data.password}' | base64 -d
-

Connect to the Jenkins instance (minikube):

-
minikube service jenkins-operator-http-<cr_name> --url
-

Connect to the Jenkins instance (actual Kubernetes cluster):

-
kubectl port-forward jenkins-<cr_name> 8080:8080
-

Then open browser with address http://localhost:8080.

- -

jenkins

- - - -
Last modified December 8, 2021 -
-
- - -
-
-
- - - - -
- - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/docs/getting-started/latest/index.html b/docs/docs/getting-started/latest/index.html deleted file mode 100644 index 95610a258..000000000 --- a/docs/docs/getting-started/latest/index.html +++ /dev/null @@ -1,1243 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - -Latest (v0.7.x) | Jenkins Operator - - - - - - - - - - - - - - - - - - - - Latest (v0.7.x) | Jenkins Operator - - -
- - - -
-
-
-
-
- - - - - -
- - - - -
- - - - -
-
- - - - - - - - - - - - - -
-
- - - -
-

Latest (v0.7.x)

-
How to work with the latest, currently supported Jenkins Operator version.
- - - - -
-

This document describes a getting started guide for Jenkins Operator v0.7.x and also additional configuration.

- -
- - -

First Steps

- -

Prepare your Kubernetes cluster and set up your kubectl access.

- -

Once you have a running Kubernetes cluster you can focus on installing Jenkins Operator according to the -Installation guide.

- -
- - - - -
- - -
-
- Installing the Operator -
-

How to install Jenkins Operator -

-
- - - - - - - - - - - - - - - - - - - - - - - - - -
-
- Deploying Jenkins -
-

Deploy production ready Jenkins manifest -

-
- - - - - - - - - - - - - - - - - -
-
- Customizing Jenkins -
-

How to customize Jenkins -

-
- - - - - - - - - - - - - - - - - - - -
-
- Configuring Seed Jobs and Pipelines -
-

How to configure Jenkins with Operator -

-
- - - - - - - - - - - -
-
- Configuring backup and restore -
-

Prevent loss of job history -

-
- - - - - - - -
-
- Separate namespaces for Jenkins and Operator -
-

How to install Jenkins and Jenkins Operator in separate namespaces -

-
- - - - - - - - - -
-
- Custom backup and restore providers -
-

Custom backup and restore provider -

-
- - - - - -
-
- AKS -
-

Additional configuration for Azure Kubernetes Service -

-
- - - - - -
-
- LDAP -
-

Additional configuration for LDAP -

-
- - - - - -
-
- OpenShift -
-

Additional configuration for OpenShift -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- Schema -
-

API Schema definitions for Jenkins CRD -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - -
Last modified December 8, 2021 -
-
- -
-
-
- - - - -
- - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/docs/getting-started/latest/index.xml b/docs/docs/getting-started/latest/index.xml deleted file mode 100644 index 276fef19d..000000000 --- a/docs/docs/getting-started/latest/index.xml +++ /dev/null @@ -1,5266 +0,0 @@ - - - Jenkins Operator – Latest (v0.7.x) - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/ - Recent Hugo news from gohugo.io - Hugo -- gohugo.io - Wed, 08 Dec 2021 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/img/hugo.png - GoHugo.io - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/ - - - - - - - - - - - - Docs: Installing the Operator - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/installing-the-operator/ - Sun, 08 Jan 2023 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/installing-the-operator/ - - - - - - - -<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> Docker Hub repository.</p> - -</div> - - -<h2 id="requirements">Requirements</h2> - -<p>To run <strong>Jenkins Operator</strong>, you will need:</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.</p> - -<h2 id="deploy-jenkins-operator-using-yaml-s">Deploy Jenkins Operator using YAML&rsquo;s</h2> - -<p>First, install Jenkins Custom Resource Definition:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl apply -f https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/config/crd/bases/jenkins.io_jenkins.yaml </code></pre></div> -<p>Then, install the Operator and other required resources:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl apply -f https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/deploy/all-in-one-v1alpha2.yaml</code></pre></div> -<p>Watch <strong>Jenkins Operator</strong> instance being created:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl get pods -w</code></pre></div> -<p>Now <strong>Jenkins Operator</strong> should be up and running in the <code>default</code> namespace. -For deploying Jenkins, refer to <a href="https://jenkinsci.github.io/kubernetes-operator/kubernetes-operator/docs/getting-started/latest/deploying-jenkins/">Deploy Jenkins section</a>.</p> - -<h2 id="deploy-jenkins-operator-using-helm-chart">Deploy Jenkins Operator using Helm Chart</h2> - -<p>Alternatively, you can also use Helm to install the Operator (and optionally, by default, Jenkins). It requires the Helm 3+ for deployment.</p> - -<p>Create a namespace for the operator:</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 namespace &lt;your-namespace&gt;</code></pre></div> -<p>To install, you need only to type these commands:</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">$ helm repo add jenkins https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/chart -$ helm install &lt;name&gt; jenkins/jenkins-operator -n &lt;your-namespace&gt;</code></pre></div> -<p>To add custom labels and annotations, you can use <code>values.yaml</code> file or pass them into <code>helm install</code> command, 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">$ helm install &lt;name&gt; jenkins/jenkins-operator -n &lt;your-namespace&gt; --set jenkins.labels.LabelKey<span style="color:#ce5c00;font-weight:bold">=</span>LabelValue,jenkins.annotations.AnnotationKey<span style="color:#ce5c00;font-weight:bold">=</span>AnnotationValue</code></pre></div> -<p>You can further customize Jenkins using <code>values.yaml</code>: -<h3 id="JenkinsConfiguration">Jenkins instance configuration -</h3></p> - -<table aria-colspan="4"> -<thead aria-colspan="4"> -<tr> -<th></th> -<th>Field</th> -<th>Default value</th> -<th>Description</th> -</tr> -</thead> -<tbody aria-colspan="4"> -<tr></tr> -<tr> -<td colspan="1"> -<code>jenkins</code> -</td> -<td colspan="3"> -<p>operator is section for configuring operator deployment</p> -<table> -<tr> -<td> -<code>enabled</code> -</td> -<td> -true -</td> -<td> -Enabled can enable or disable the Jenkins instance. -Set to false if you have configured CR already and/or you want to deploy an operator only. -</td> -</tr> -<tr> -<td> -<code>apiVersion</code> -</td> -<td>jenkins.io/v1alpha2</td> -<td> -Version of the CR manifest. The recommended and default value is <code>jenkins.io/v1alpha2</code>. -<a href="#github.io/kubernetes-operator/docs/getting-started/v0.1.x/migration-guide-v1alpha1-to-v1alpha2/">More info</a> -</td> -</tr> -<tr> -<td> -<code>name</code> -</td> -<td> -jenkins -</td> -<td> -Name of resource. The pod name will be <code>jenkins-&lt;name&gt;</code> (name will be set as suffix). -</td> -</tr> -<tr> -<td> -<code>namespace</code> -</td> -<td> -default -</td> -<td> -Namespace the resources will be deployed to. It's not recommended to use default namespace. -Create new namespace for jenkins (e.g. <code>kubectl create -n jenkins</code>) -</td> -</tr> -<tr> -<td> -<code>labels</code> -</td> -<td> -{} -</td> -<td> -Labels are injected into metadata labels field. -</td> -</tr> -<tr> -<td> -<code>annotations</code> -</td> -<td> -{} -</td> -<td> -Annotations are injected into metadata annotations field. -</td> -</tr> -<tr> -<td> -<code>image</code> -</td> -<td> -jenkins/jenkins:lts -</td> -<td> -Image is the name (and tag) of the Jenkins instance. -It's recommended to use LTS (tag: "lts") version. -</td> -</tr> -<tr> -<td> -<code>env</code> -</td> -<td> -[] -</td> -<td> -Env contains jenkins container environment variables. -</td> -</tr> -<tr> -<td> -<code>imagePullPolicy</code> -</td> -<td> -Always -</td> -<td> -Defines policy for pulling images -</td> -</tr> -<tr> -<td> -<code>priorityClassName</code> -</td> -<td> -"" -</td> -<td> -PriorityClassName indicates the importance of a Pod relative to other Pods. -<a href="https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/">More info</a> -</td> -</tr> -<tr> -<td> -<code>disableCSRFProtection</code> -</td> -<td> -false -</td> -<td> -disableCSRFProtection can enable or disable operator built-in CSRF protection. -Set it to true if you are using OpenShift Jenkins Plugin. -<a href="https://github.com/jenkinsci/kubernetes-operator/pull/193">More info</a> -</td> -</tr> -<tr> -<td> -<code>imagePullSecrets</code> -</td> -<td> -[] -</td> -<td> -Used if you want to pull images from private repository -<a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configuration/#pulling-docker-images-from-private-repositories">More info</a> -</td> -</tr> -<tr> -<td> -<code>notifications</code> -</td> -<td> -[] -</td> -<td> -Notifications is feature that notify user about Jenkins reconciliation status -<a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/notifications/">More info</a> -</td> -</tr> -<tr> -<td> -<code>basePlugins</code> -</td> -<td> -<pre> -- name: kubernetes - version: "1.25.2" -- name: workflow-job - version: "2.39" -- name: workflow-aggregator - version: "2.6" -- name: git - version: "4.2.2" -- name: job-dsl - version: "1.77" -- name: configuration-as-code - version: "1.38" -- name: kubernetes-credentials - -provider - version: "0.13" -</pre> -</td> -<td> -Plugins installed and required by the operator -shouldn't contain plugins defined by user -You can change their versions here -<a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/customization/#install-plugins">More info</a> -</td> -</tr> -<tr> -<td> -<code>plugins</code> -</td> -<td> -[] -</td> -<td> -Plugins required by the user. You can define plugins here. -<a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/customization/#install-plugins">More info</a> -Example: -<pre> -plugins: - - name: simple-theme-plugin - version: 0.5.1 -</pre> -</td> -</tr> -<tr> -<td> -<code>seedJobs</code> -</td> -<td> -[] -</td> -<td> -Placeholder for jenkins seed jobs -For seed job creation tutorial, check:<br /> <a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configuring-seed-jobs-and-pipelines/#prepare-job-definitions-and-pipelines">Prepare seed jobs</a> -<br /><a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configuring-seed-jobs-and-pipelines/#configure-seed-jobs">Configure seed jobs</a> -<br />Example: -<code> -<pre> -seedJobs: -- id: jenkins-operator - targets: "cicd/jobs/*.jenkins" - description: "Jenkins Operator repository" - repositoryBranch: master - repositoryUrl: - - https://github.com/jenkinsci/kubernetes-operator.git -</pre> -</code> -</td> -</tr> -<tr> -<td> -<code>resources</code> -</td> -<td> -<pre> -limits: - cpu: 1500m - memory: 3Gi -requests: - cpu: 1 - memory: 500M -</pre> -</td> -<td> -Resource limit/request for Jenkins -<a href="https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container">More info</a> -</td> -</tr> -<tr> -<td> -<code>volumes</code> -</td> -<td> -<pre> -- name: backup - persistentVolumeClaim: - claimName: jenkins-backup -</pre> -</td> -<td> -Volumes used by Jenkins -By default, we are only using PVC volume for storing backups. -</td> -</tr> -<tr> -<td> -<code>volumeMounts</code> -</td> -<td> -[] -</td> -<td> -volumeMounts are mounts for Jenkins pod. -</td> -</tr> -<tr> -<td> -<code>securityContext</code> -</td> -<td> -runAsUser: 1000 -fsGroup: 1000 -</td> -<td> -SecurityContext for pod. -</td> -</tr> -<tr> -<td><code>service</code></td> -<td>not implemented</td> -<td>Http Jenkins service. See https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/schema/#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Service for details.</td> -</tr> -<tr> -<td><code>slaveService</code></td> -<td>not implemented</td> -<td>Slave Jenkins service. See https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/schema/#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Service for details.</td> -</tr> -<tr> -<td> -<code>livenessProbe</code> -</td> -<td> -<pre> -livenessProbe: - failureThreshold: 12 - httpGet: - path: /login - port: http - scheme: HTTP - initialDelaySeconds: 80 - periodSeconds: 10 - successThreshold: 1 - timeoutSeconds: 5 -</pre> -</td> -<td> -livenessProbe for Pod -</td> -</tr> -<tr> -<td> -<code>readinessProbe</code> -</td> -<td> -<pre> -readinessProbe: - failureThreshold: 3 - httpGet: - path: /login - port: http - scheme: HTTP - initialDelaySeconds: 30 - periodSeconds: 10 - successThreshold: 1 - timeoutSeconds: 1 -</pre> -</td> -<td> -readinessProbe for Pod -</td> -</tr> -<tr> -<td> -<code> -backup -</code> -<p> -<em> -<a href="#Backup"> -Backup -</a> -</em> -</p> -</td> -<td> -</td> -<td> -Backup is section for configuring operator's backup feature -By default backup feature is enabled and pre-configured -This section simplifies the configuration described here: <a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configuring-backup-and-restore/">Configuring backup and restore</a> -For customization tips see <a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/custom-backup-and-restore">Custom backup and restore</a> -</td> -</tr> -<tr> -<td> -<code>configuration</code> -<p> -<em> -<a href="#Configuration"> -Configuration -</a> -</em> -</p> -</td> -<td></td> -<td> -Section where we can configure Jenkins instance. -See <a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/customizing-jenkins/">Customizing Jenkins</a> for details -</td> -</tr> -</table> -</td> -</tr> -</tbody> -</table> - -<h3 id="configuring-operator-deployment">Configuring operator deployment</h3> - -<table aria-colspan="4"> - <thead aria-colspan="4"> - <tr> - <th></th> - <th>Field</th> - <th>Default value</th> - <th>Description</th> - </tr> - </thead> - <tbody aria-colspan="4"> - <tr></tr> - <tr> - <td colspan="1"> - <code>operator</code> - </td> - <td colspan="3"> - <p>operator is section for configuring operator deployment</p> - <table> - <tr> - <td> - <code>replicaCount</code></br> - </td> - <td> - 1 - </td> - <td> - Number of Replicas. - </td> - </tr> - <tr> - <td> - <code>image</code> - </td> - <td> - virtuslab/jenkins-operator:v0.4.0 - </td> - <td> - Name (and tag) of the Jenkins Operator image. - </td> - </tr> - <tr> - <td> - <code>imagePullPolicy</code> - </td> - <td> - IfNotPresent - </td> - <td> - Defines policy for pulling images. - </td> - </tr> - <tr> - <td> - <code>imagePullSecrets</code> - </td> - <td> - [] - </td> - <td> - Used if you want to pull images from private repository. - </td> - </tr> - <tr> - <td> - <code>nameOverride</code> - </td> - <td> - "" - </td> - <td> - nameOverride overrides the app name. - </td> - </tr> - <tr> - <td> - <code>fullnameOverride</code> - </td> - <td> - "" - </td> - <td> - fullnameOverride overrides the deployment name - </td> - </tr> - <tr> - <td> - <code>resources</code> - </td> - <td> - {} - </td> - <td> - </td> - </tr> - <tr> - <td> - <code>nodeSelector</code> - </td> - <td> - {} - </td> - <td> - </td> - </tr> - <tr> - <td> - <code>tolerations</code> - </td> - <td> - {} - </td> - <td> - </td> - </tr> - <tr> - <td> - <code>affinity</code> - </td> - <td> - {} - </td> - <td> - </td> - </tr> - </table> - </td> - </tr> - </tbody> -</table> - -<p><h3 id="Backup">Backup -</h3> -<p> -(<em>Appears on:</em> -<a href="#JenkinsConfiguration">JenkinsConfiguration</a>) -</p> -<p> -Backup defines configuration of Jenkins backup. -</p></p> - -<table> -<thead> -<tr> -<th>Field</th> -<th>Default value</th> -<th>Description</th> -</tr> -</thead> - <tbody> - <tr> - <td> - <code>enabled</code> - </td> - <td> - true - </td> - <td> - Enabled is enable/disable switch for backup feature. - </td> - </tr> - <tr> - <td> - <code>image</code> - </td> - <td> - virtuslab/jenkins-operator-backup-pvc:v0.1.1 - </td> - <td> - Image used by backup feature. - </td> - </tr> - <tr> - <td> - <code>containerName</code> - </td> - <td> - backup - </td> - <td> - Backup container name. - </td> - </tr> - <tr> - <td> - <code>interval</code> - </td> - <td> - 30 - </td> - <td> - Defines how often make backup in seconds. - </td> - </tr> - <tr> - <td> - <code>makeBackupBeforePodDeletion</code> - </td> - <td> - true - </td> - <td> - When enabled will make backup before pod deletion. - </td> - </tr> - <tr> - <td> - <code>backupCommand</code> - </td> - <td> - /home/user/bin/backup.sh - </td> - <td> - Backup container command. - </td> - </tr> - <tr> - <td> - <code>restoreCommand</code> - </td> - <td> - /home/user/bin/restore.sh - </td> - <td> - Backup restore command. - </td> - </tr> - <tr> - <td> - <code>pvc</code> - </td> - <td colspan="2"> - <p>Persistent Volume Claim Kubernetes resource</p> - <br/> - <table colspan="2" style="width:100%"> - <tbody> - <tr> - <td> - <code>enabled</code> - </td> - <td> - true - </td> - <td> - Enable/disable switch for PVC - </td> - </tr> - <tr> - <td> - <code>enabled</code> - </td> - <td> - true - </td> - <td> - Enable/disable switch for PVC - </td> - </tr> - <tr> - <td> - <code>size</code> - </td> - <td> - 5Gi - </td> - <td> - Size of PVC - </td> - </tr> - <tr> - <td> - <code>className</code> - </td> - <td> - "" - </td> - <td> - StorageClassName for PVC - <a href="https://kubernetes.io/docs/concepts/storage/persistent-volumes/#class-1">More info</a> - </td> - </tr> - </tbody> - </table> - </td> - </tr> - <tr> - <td> - <code>env</code> - </td> - <td> -<pre> -- name: BACKUP_DIR - value: /backup -- name: JENKINS_HOME - value: /jenkins-home -- name: BACKUP_COUNT - value: "3" -</pre> - </td> - <td> - Contains container environment variables. - PVC backup provider handles these variables:<br /> - BACKUP_DIR - path for storing backup files (default: "/backup")<br /> - JENKINS_HOME - path to jenkins home (default: "/jenkins-home")<br /> - BACKUP_COUNT - define how much recent backups will be kept<br /> - </td> - </td> - </tr> - <tr> - <td> - <code>volumeMounts</code> - </td> - <td> -<pre> -- name: jenkins-home - mountPath: /jenkins-home -- mountPath: /backup - name: backup -</pre> - </td> - <td> - Holds the mount points for volumes. - </td> - </tr> - </tbody> -</table> - - -<p><h4 id="Configuration">Configuration - </h3> - <p> - (<em>Appears on:</em> - <a href="#JenkinsConfiguration">Jenkins instance configuration</a>) - </p></p> - -<p><table> - <thead> - <tr> - <th>Field</th> - <th>Default value</th> - <th>Description</th> - </tr> - </thead> - <tbody> - <tr> - <td> - <code>configurationAsCode</code> - </td> - <td> - {} - </td> - <td> - ConfigurationAsCode defines configuration of Jenkins customization via Configuration as Code Jenkins plugin. -Example:<br /> -<pre> -- configMapName: jenkins-casc - content: {} -</pre> - </td> - </tr> - <tr> - <td> - <code>groovyScripts</code> - </td> - <td> - {} - </td> - <td> - GroovyScripts defines configuration of Jenkins customization via groovy scripts. - Example:<br /> -<pre> -- configMapName: jenkins-gs - content: {} -</pre> - </td> - </tr> - <tr> - <td> - <code>secretRefName</code> - </td> - <td> - &ldquo;&rdquo; - </td> - <td> - secretRefName of existing secret (previously created). - </td> - </tr> - <tr> - <td> - <code>secretData</code> - </td> - <td> - {} - </td> - <td> - If secretRefName is empty, secretData creates new secret and fills with data provided in secretData. - </td> - </tr> - </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 <code>{git-hash}</code>, {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> - -<h2 id="validating-webhook">Validating Webhook</h2> - -<p>Validating webhook can be used in order to increase the Operator&rsquo;s capabilities to monitor security issues. It will look for security vulnerabilities in the base and requested plugins. It can be easily installed via Helm charts by setting webhook.enabled in values.yaml.</p> - -<p><strong>Note</strong>: The webhook takes some time to get up and running. It&rsquo;s recommended to first deploy the Operator and later Jenkins Custom Resource by using toggles in <code>values.yaml</code>. -For the installation with yaml manifests (without using Helm chart), first, install cert-manager:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl apply -f https://github.com/jetstack/cert-manager/releases/download/v1.5.1/cert-manager.yaml </code></pre></div> -<p>It takes some time to get cert-manager up and running. -Then, install the webhook and other required resources:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl apply -f https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/deploy/all-in-one-webhook.yaml</code></pre></div> -<p>Now, download the manifests for the operator and other resources from <a href="https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/deploy/all-in-one-v1alpha2.yaml">here</a> and provide these additional fields in the Operator manifest:</p> - -<pre> -<code> -apiVersion: apps/v1 -kind: Deployment -metadata: - name: jenkins-operator - labels: - control-plane: controller-manager -spec: - selector: - matchLabels: - control-plane: controller-manager - replicas: 1 - template: - metadata: - labels: - control-plane: controller-manager - spec: - serviceAccountName: jenkins-operator - securityContext: - runAsUser: 65532 - containers: - - command: - - /manager - args: - - --leader-elect - <b>- --validate-security-warnings</b> - image: virtuslab/jenkins-operator:v0.7.0 - name: jenkins-operator - imagePullPolicy: IfNotPresent - securityContext: - allowPrivilegeEscalation: false - livenessProbe: - httpGet: - path: /healthz - port: 8081 - initialDelaySeconds: 15 - periodSeconds: 20 - readinessProbe: - httpGet: - path: /readyz - port: 8081 - initialDelaySeconds: 5 - periodSeconds: 10 - resources: - limits: - cpu: 200m - memory: 100Mi - requests: - cpu: 100m - memory: 20Mi - env: - - name: WATCH_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - <b>volumeMounts: - - mountPath: /tmp/k8s-webhook-server/serving-certs - name: webhook-certs - readOnly: true - volumes: - - name: webhook-certs - secret: - defaultMode: 420 - secretName: jenkins-webhook-certificate - terminationGracePeriodSeconds: 10</b> -</code> -</pre> - -<p>To enable security validation in the Jenkins Custom Resource, set</p> - -<blockquote> -<p>jenkins.ValidateSecurityWarnings=true</p> -</blockquote> - - - - - - Docs: Deploying Jenkins - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/deploying-jenkins/ - Wed, 08 Dec 2021 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/deploying-jenkins/ - - - - - - - -<div class="pageinfo pageinfo-primary"> -<p>This document describes the procedure for deploying Jenkins.</p> - -</div> - - -<h2 id="prerequisites">Prerequisites</h2> - -<p>The Operator needs to have been deployed beforehand. The procedure for deploying Jenkins described here doesn&rsquo;t apply to -installation of Operator via Helm chart unless <code>jenkins.enabled</code> was set to false. -That’s because by default, installation via Helm chart also covers deploying Jenkins.</p> - -<h2 id="deploying-jenkins-instance">Deploying Jenkins instance</h2> - -<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-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>namespace<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>default<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurationAsCode<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurations<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">]</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>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><span style="color:#4e9a06">&#34;&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>groovyScripts<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurations<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">]</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>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><span style="color:#4e9a06">&#34;&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkinsAPISettings<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>authorizationStrategy<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>createUser<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>disableCSRFProtection<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">false</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>containers<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-master<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>image<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins/jenkins<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">2.319</span><span style="color:#0000cf;font-weight:bold">.1</span>-lts-alpine<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>imagePullPolicy<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Always<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>livenessProbe<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>failureThreshold<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">12</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>httpGet<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>path<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/login<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>port<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>http<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>scheme<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>HTTP<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>initialDelaySeconds<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">100</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>periodSeconds<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">10</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>successThreshold<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>timeoutSeconds<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">5</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>readinessProbe<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>failureThreshold<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">10</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>httpGet<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>path<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/login<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>port<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>http<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>scheme<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>HTTP<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>initialDelaySeconds<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">80</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>periodSeconds<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">10</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>successThreshold<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>timeoutSeconds<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>limits<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>cpu<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>1500m<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>memory<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>3Gi<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>requests<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>cpu<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;1&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>memory<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>500Mi<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>seedJobs<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>id<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>targets<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;cicd/jobs/*.jenkins&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>description<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Jenkins Operator repository&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>repositoryBranch<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>master<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>repositoryUrl<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>https<span style="color:#000;font-weight:bold">:</span>//github.com/jenkinsci/kubernetes-operator.git</code></pre></div> -<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> -<p>Get the Jenkins credentials:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl get secret jenkins-operator-credentials-&lt;cr_name&gt; -o <span style="color:#4e9a06">&#39;jsonpath={.data.user}&#39;</span> <span style="color:#000;font-weight:bold">|</span> base64 -d -kubectl get secret jenkins-operator-credentials-&lt;cr_name&gt; -o <span style="color:#4e9a06">&#39;jsonpath={.data.password}&#39;</span> <span style="color:#000;font-weight:bold">|</span> base64 -d</code></pre></div> -<p>Connect to the Jenkins instance (minikube):</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">minikube service jenkins-operator-http-&lt;cr_name&gt; --url</code></pre></div> -<p>Connect to the Jenkins instance (actual Kubernetes cluster):</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl port-forward jenkins-&lt;cr_name&gt; 8080:8080</code></pre></div> -<p>Then open browser with address <code>http://localhost:8080</code>.</p> - -<p><img src="https://jenkinsci.github.io/kubernetes-operator/kubernetes-operator/img/jenkins.png" alt="jenkins" /></p> - - - - - - Docs: Customizing Jenkins - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/customizing-jenkins/ - Wed, 08 Dec 2021 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/customizing-jenkins/ - - - - - -<h2 id="how-to-customize-jenkins">How to customize Jenkins</h2> - -<p>Jenkins can be customized with plugins. -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:</p> - -<ul> -<li>configuration-as-code v1.55</li> -<li>git v4.10.0</li> -<li>job-dsl v1.78.1</li> -<li>kubernetes-credentials-provider v0.20</li> -<li>kubernetes v1.30.11</li> -<li>workflow-aggregator v2.6</li> -<li>workflow-job v2.42</li> -</ul> - -<p>Rest of the plugins can be found in <a href="https://plugins.jenkins.io/">plugins repository</a>.</p> - -<h4 id="install-plugins">Install plugins</h4> - -<p>Edit Custom Resource under <code>spec.master.plugins</code>:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.io/v1alpha2<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>example<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>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>plugins<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>simple-theme-plugin<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;0.7&#34;</span></code></pre></div> -<p>Under <code>spec.master.basePlugins</code> you can find plugins for a valid <strong>Jenkins Operator</strong>:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.io/v1alpha2<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>example<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>master<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>basePlugins<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>kubernetes<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;1.30.11&#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.42&#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.10.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>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.78.1&#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.55&#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.20&#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> - -<h4 id="apply-plugin-s-config">Apply plugin&rsquo;s config</h4> - -<p>By using a <a href="https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/">ConfigMap</a> you can create your own <strong>Jenkins</strong> customized configuration. -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>Create a <strong><code>ConfigMap</code></strong> with specific name (eg. <code>jenkins-operator-user-configuration</code>). Then, modify the <strong>Jenkins</strong> manifest:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.io/v1alpha2<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>example<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurationAsCode<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurations<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-user-configuration<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>groovyScripts<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurations<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-user-configuration</code></pre></div> -<p>Here is an example of <code>jenkins-operator-user-configuration</code>:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>v1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>ConfigMap<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-user-configuration<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>data<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>-configure-theme.groovy<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">| -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">import jenkins.*</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.model.*<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>hudson.*<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>hudson.model.*<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>org.jenkinsci.plugins.simpletheme.ThemeElement<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>org.jenkinsci.plugins.simpletheme.CssTextThemeElement<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>org.jenkinsci.plugins.simpletheme.CssUrlThemeElement<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins<span style="color:#f8f8f8;text-decoration:underline"> </span>=<span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins.getInstance()<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>def<span style="color:#f8f8f8;text-decoration:underline"> </span>decorator<span style="color:#f8f8f8;text-decoration:underline"> </span>=<span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins.instance.getDescriptorByType(org.codefirst.SimpleThemeDecorator.class)<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>List&lt;ThemeElement&gt;<span style="color:#f8f8f8;text-decoration:underline"> </span>configElements<span style="color:#f8f8f8;text-decoration:underline"> </span>=<span style="color:#f8f8f8;text-decoration:underline"> </span>new<span style="color:#f8f8f8;text-decoration:underline"> </span>ArrayList&lt;&gt;();<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configElements.add(new<span style="color:#f8f8f8;text-decoration:underline"> </span>CssTextThemeElement(<span style="color:#4e9a06">&#34;DEFAULT&#34;</span>));<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configElements.add(new<span style="color:#f8f8f8;text-decoration:underline"> </span>CssUrlThemeElement(<span style="color:#4e9a06">&#34;https://cdn.rawgit.com/afonsof/jenkins-material-theme/gh-pages/dist/material-light-green.css&#34;</span>));<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>decorator.setElements(configElements);<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>decorator.save();<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.save()<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>-system-message.yaml<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">| -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">jenkins:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>systemMessage<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Configuration as Code integration works!!!&#34;</span></code></pre></div> -<ul> -<li><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. -Jenkins will reconcile and apply the new configuration.</p> - -<h2 id="how-to-use-secrets-from-a-groovy-scripts">How to use secrets from a Groovy scripts</h2> - -<p>If you configured <code>spec.groovyScripts.secret.name</code>, then this secret is available to use from map Groovy scripts. -The secrets are loaded to <code>secrets</code> map.</p> - -<p>Create a <a href="https://kubernetes.io/docs/concepts/configuration/secret/">secret</a> with for example the name <code>jenkins-conf-secrets</code>.</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Secret<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>v1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>type<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Opaque<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-conf-secrets<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>namespace<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>default<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>data<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>SYSTEM_MESSAGE<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>SGVsbG8gd29ybGQ=</code></pre></div> -<p>Then modify the <strong>Jenkins</strong> pod manifest by changing <code>spec.groovyScripts.secret.name</code> to <code>jenkins-conf-secrets</code>.</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.io/v1alpha2<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>example<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurationAsCode<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurations<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-user-configuration<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>secret<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-conf-secrets<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>groovyScripts<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurations<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-user-configuration<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>secret<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-conf-secrets</code></pre></div> -<p>Now you can test that the secret is mounted by applying this <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"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-user-configuration<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>data<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>-system-message.groovy<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">| -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">import jenkins.*</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.model.*<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>hudson.*<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>hudson.model.*<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins<span style="color:#f8f8f8;text-decoration:underline"> </span>=<span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins.getInstance()<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.setSystemMessage(secrets<span style="color:#000;font-weight:bold">[</span><span style="color:#4e9a06">&#34;SYSTEM_MESSAGE&#34;</span><span style="color:#000;font-weight:bold">]</span>)<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.save()</code></pre></div> -<p>Or by applying this configuration as code:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>v1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>ConfigMap<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-user-configuration<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>data<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>-system-message.yaml<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">| -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">jenkins:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>systemMessage<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>${SYSTEM_MESSAGE}</code></pre></div> -<p>After this, you should see the <code>Hello world</code> system message from the <strong>Jenkins</strong> homepage.</p> - - - - - - Docs: Configuring Seed Jobs and Pipelines - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configuring-seed-jobs-and-pipelines/ - Wed, 08 Dec 2021 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configuring-seed-jobs-and-pipelines/ - - - - - -<h2 id="configure-seed-jobs-and-pipelines">Configure Seed Jobs and Pipelines</h2> - -<p>Jenkins operator uses <a href="https://github.com/jenkinsci/job-dsl-plugin">job-dsl</a> and <a href="https://jenkinsci.github.io/kubernetes-credentials-provider-plugin/">kubernetes-credentials-provider</a> plugins for configuring jobs -and deploy keys.</p> - -<h2 id="prepare-job-definitions-and-pipelines">Prepare job definitions and pipelines</h2> - -<p>First you have to prepare pipelines and job definition in your GitHub repository using the following structure:</p> -<pre><code>cicd/ -├── jobs -│   └── k8s.jenkins -└── pipelines - └── k8s.jenkins</code></pre> -<p><strong><code>cicd/jobs/k8s.jenkins</code></strong> is a job definition:</p> -<pre><code>#!/usr/bin/env groovy - -pipelineJob('k8s-e2e') { - displayName('Kubernetes Plugin E2E Test') - - logRotator { - numToKeep(10) - daysToKeep(30) - } - - configure { project -> - project / 'properties' / 'org.jenkinsci.plugins.workflow.job.properties.DurabilityHintJobProperty' { - hint('PERFORMANCE_OPTIMIZED') - } - } - - definition { - cpsScm { - scm { - git { - remote { - url('https://github.com/jenkinsci/kubernetes-operator.git') - credentials('jenkins-operator') - } - branches('*/master') - } - } - scriptPath('cicd/pipelines/k8s.jenkins') - } - } -}</code></pre> -<p><strong><code>cicd/pipelines/k8s.jenkins</code></strong> is an actual Jenkins pipeline:</p> -<pre><code>#!/usr/bin/env groovy - -def label = "k8s-${UUID.randomUUID().toString()}" -def home = "/home/jenkins" -def workspace = "${home}/workspace/build-jenkins-operator" -def workdir = "${workspace}/src/github.com/jenkinsci/kubernetes-operator/" - -podTemplate(label: label, - containers: [ - containerTemplate(name: 'alpine', image: 'alpine:3.11', ttyEnabled: true, command: 'cat'), - ], - ) { - node(label) { - stage('Run shell') { - container('alpine') { - sh 'echo "hello world"' - } - } - } -}</code></pre> -<h2 id="configure-seed-jobs">Configure Seed Jobs</h2> - -<p>Jenkins Seed Jobs are configured using <code>Jenkins.spec.seedJobs</code> section from your custom resource manifest:</p> -<pre><code>apiVersion: jenkins.io/v1alpha2 -kind: Jenkins -metadata: - name: example -spec: - seedJobs: - - id: jenkins-operator - targets: "cicd/jobs/*.jenkins" - description: "Jenkins Operator repository" - repositoryBranch: master - repositoryUrl: https://github.com/jenkinsci/kubernetes-operator.git</code></pre> -<p><strong>Jenkins Operator</strong> will automatically discover and configure all the seed jobs.</p> - -<p>You can verify if deploy keys were successfully configured in the Jenkins <strong>Credentials</strong> tab.</p> - -<p><img src="https://jenkinsci.github.io/kubernetes-operator/kubernetes-operator/img/jenkins-credentials.png" alt="jenkins" /></p> - -<p>You can verify if your pipelines were successfully configured in the Jenkins Seed Job console output.</p> - -<p><img src="https://jenkinsci.github.io/kubernetes-operator/kubernetes-operator/img/jenkins-seed.png" alt="jenkins" /></p> - -<p>If your GitHub repository is <strong>private</strong> you have to configure SSH or username/password authentication.</p> - -<h3 id="ssh-authentication">SSH authentication</h3> - -<h4 id="generate-ssh-keys">Generate SSH Keys</h4> - -<p>There are two methods of SSH private key generation:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">$ openssl genrsa -out &lt;filename&gt; <span style="color:#0000cf;font-weight:bold">2048</span></code></pre></div> -<p>or</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">$ ssh-keygen -t rsa -b <span style="color:#0000cf;font-weight:bold">2048</span> -$ ssh-keygen -p -f &lt;filename&gt; -m pem</code></pre></div> -<p>Then copy content from generated file.</p> - -<h4 id="public-key">Public key</h4> - -<p>If you want to upload your public key to your Git server you need to extract it.</p> - -<p>If key was generated by <code>openssl</code> then you need to type this to extract public key:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">$ openssl rsa -in &lt;filename&gt; -pubout &gt; &lt;filename&gt;.pub</code></pre></div> -<p>If key was generated by <code>ssh-keygen</code> the public key content is located in <filename>.pub and there is no need to extract public key</p> - -<h4 id="configure-ssh-authentication">Configure SSH authentication</h4> - -<p>Configure a seed job like this:</p> -<pre><code>apiVersion: jenkins.io/v1alpha2 -kind: Jenkins -metadata: - name: example -spec: - seedJobs: - - id: jenkins-operator-ssh - credentialType: basicSSHUserPrivateKey - credentialID: k8s-ssh - targets: "cicd/jobs/*.jenkins" - description: "Jenkins Operator repository" - repositoryBranch: master - repositoryUrl: git@github.com:jenkinsci/kubernetes-operator.git</code></pre> -<p>and create a Kubernetes Secret (name of secret should be the same from <code>credentialID</code> field):</p> -<pre><code>apiVersion: v1 -kind: Secret -metadata: - name: k8s-ssh - labels: - "jenkins.io/credentials-type": "basicSSHUserPrivateKey" - annotations: - "jenkins.io/credentials-description" : "ssh github.com:jenkinsci/kubernetes-operator" -stringData: - privateKey: | - -----BEGIN RSA PRIVATE KEY----- - MIIJKAIBAAKCAgEAxxDpleJjMCN5nusfW/AtBAZhx8UVVlhhhIKXvQ+dFODQIdzO - oDXybs1zVHWOj31zqbbJnsfsVZ9Uf3p9k6xpJ3WFY9b85WasqTDN1xmSd6swD4N8 - ... - username: github_user_name</code></pre> -<h3 id="username-password-authentication">Username &amp; password authentication</h3> - -<p>Configure the seed job like:</p> -<pre><code>apiVersion: jenkins.io/v1alpha2 -kind: Jenkins -metadata: - name: example -spec: - seedJobs: - - id: jenkins-operator-user-pass - credentialType: usernamePassword - credentialID: k8s-user-pass - targets: "cicd/jobs/*.jenkins" - description: "Jenkins Operator repository" - repositoryBranch: master - repositoryUrl: https://github.com/jenkinsci/kubernetes-operator.git</code></pre> -<p>and create a Kubernetes Secret (name of secret should be the same from <code>credentialID</code> field):</p> -<pre><code>apiVersion: v1 -kind: Secret -metadata: - name: k8s-user-pass -stringData: - username: github_user_name - password: password_or_token</code></pre> -<h3 id="external-authentication">External authentication</h3> - -<p>You can use <code>external</code> credential type if you want to configure authentication using Configuration As Code or Groovy Script.</p> - -<p>Example:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.io/v1alpha2<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>example<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>seedJobs<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>id<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-external<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>credentialType<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>external<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>credentialID<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>k8s-external<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>targets<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;cicd/jobs/*.jenkins&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>description<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Jenkins Operator repository&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>repositoryBranch<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>master<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>repositoryUrl<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>https<span style="color:#000;font-weight:bold">:</span>//github.com/jenkinsci/kubernetes-operator.git</code></pre></div> -<p>Remember that <code>credentialID</code> must match the id of the credentials configured in Jenkins. Consult the -<a href="https://www.jenkins.io/doc/book/using/using-credentials/">Jenkins docs for using credentials</a> for details.</p> - -<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 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"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-master<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>env<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>CURL_OPTIONS<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-L<span style="color:#f8f8f8;text-decoration:underline"> </span>-x<span style="color:#f8f8f8;text-decoration:underline"> </span>&lt;proxy_url&gt;</code></pre></div> -<p>In <code>CURL_OPTIONS</code> var you can set additional arguments to <code>curl</code> command.</p> - -<h2 id="pulling-docker-images-from-private-repositories">Pulling Docker images from private repositories</h2> - -<p>To pull a Docker Image from private repository you can use <code>imagePullSecrets</code>.</p> - -<p>Please follow the instructions on <a href="https://kubernetes.io/docs/concepts/containers/images/?origin_team=T42NTAGHM#creating-a-secret-with-a-docker-config">creating a secret with a docker config</a>.</p> - -<h3 id="docker-hub-configuration">Docker Hub Configuration</h3> - -<p>To use Docker Hub additional steps are required.</p> - -<p>Edit the previously created secret:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl -n &lt;namespace&gt; edit secret &lt;name&gt;</code></pre></div> -<p>The <code>.dockerconfigjson</code> key&rsquo;s value needs to be replaced with a modified version.</p> - -<p>After modifications, it needs to be encoded as a Base64 value before setting the <code>.dockerconfigjson</code> key.</p> - -<p>Example config file to modify and use:</p> -<pre><code>{ - "auths":{ - "https://index.docker.io/v1/":{ - "username":"user", - "password":"password", - "email":"yourdockeremail@gmail.com", - "auth":"base64 of string user:password" - }, - "auth.docker.io":{ - "username":"user", - "password":"password", - "email":"yourdockeremail@gmail.com", - "auth":"base64 of string user:password" - }, - "registry.docker.io":{ - "username":"user", - "password":"password", - "email":"yourdockeremail@gmail.com", - "auth":"base64 of string user:password" - }, - "docker.io":{ - "username":"user", - "password":"password", - "email":"yourdockeremail@gmail.com", - "auth":"base64 of string user:password" - }, - "https://registry-1.docker.io/v2/": { - "username":"user", - "password":"password", - "email":"yourdockeremail@gmail.com", - "auth":"base64 of string user:password" - }, - "registry-1.docker.io/v2/": { - "username":"user", - "password":"password", - "email":"yourdockeremail@gmail.com", - "auth":"base64 of string user:password" - }, - "registry-1.docker.io": { - "username":"user", - "password":"password", - "email":"yourdockeremail@gmail.com", - "auth":"base64 of string user:password" - }, - "https://registry-1.docker.io": { - "username":"user", - "password":"password", - "email":"yourdockeremail@gmail.com", - "auth":"base64 of string user:password" - } - } -}</code></pre> - - - - - Docs: Configuring backup and restore - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configuring-backup-and-restore/ - Sun, 08 Jan 2023 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configuring-backup-and-restore/ - - - - - -<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> - -<h4 id="create-pvc">Create PVC</h4> - -<p>Save to the file named pvc.yaml:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>v1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>PersistentVolumeClaim<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>&lt;pvc_name<span style="color:#8f5902;font-style:italic">&gt; -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">namespace: &lt;namespace&gt;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>accessModes<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>ReadWriteOnce<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>requests<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>storage<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>500Gi</code></pre></div> -<p>Run the following command:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">$ kubectl -n &lt;namespace&gt; create -f pvc.yaml</code></pre></div> -<h4 id="configure-jenkins-cr">Configure Jenkins CR</h4> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.io/v1alpha2<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-cr<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>jenkinsAPISettings<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>authorizationStrategy<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>createUser<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>master<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>securityContext<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>runAsUser<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1000</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>fsGroup<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1000</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>disableCSRFProtection<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">false</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>containers<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-master<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>image<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins/jenkins<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">2.277</span><span style="color:#0000cf;font-weight:bold">.4</span>-lts-alpine<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>imagePullPolicy<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>IfNotPresent<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>limits<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>cpu<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>1500m<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>memory<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>3Gi<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>requests<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>cpu<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;1&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>memory<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>500Mi<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># container responsible for the backup and restore</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>env<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>BACKUP_DIR<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/backup<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>JENKINS_HOME<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/jenkins-home<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>BACKUP_COUNT<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;3&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># keep only the 2 most recent backups</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>image<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>virtuslab/jenkins-operator-backup-pvc<span style="color:#000;font-weight:bold">:</span>v0<span style="color:#0000cf;font-weight:bold">.1</span><span style="color:#0000cf;font-weight:bold">.1</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># look at backup/pvc directory</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>imagePullPolicy<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>IfNotPresent<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>volumeMounts<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>mountPath<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/jenkins-home<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># Jenkins home volume</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-home<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>mountPath<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># backup volume</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>limits<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>cpu<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>1000m<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>memory<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>3Gi<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>requests<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>cpu<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;1&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>memory<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>500Mi<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>volumes<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># PVC volume where backups will be stored</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>persistentVolumeClaim<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>claimName<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>&lt;pvc_name<span style="color:#8f5902;font-style:italic">&gt; -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">backup:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>containerName<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># container name is responsible for backup</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>action<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>command<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>/home/user/bin/backup.sh<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># this command is invoked on &#34;backup&#34; container to make backup, for example /home/user/bin/backup.sh &lt;backup_number&gt;, &lt;backup_number&gt; is passed by operator</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>interval<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">30</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># how often make backup in seconds</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>makeBackupBeforePodDeletion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">true</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># make a backup before pod deletion</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>restore<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>containerName<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># container name is responsible for restore backup</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>action<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>command<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>/home/user/bin/restore.sh<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># this command is invoked on &#34;backup&#34; container to make restore backup, for example /home/user/bin/restore.sh &lt;backup_number&gt;, &lt;backup_number&gt; is passed by operator</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">#recoveryOnce: &lt;backup_number&gt; # if want to restore specific backup configure this field and then Jenkins will be restarted and desired backup will be restored</span><span style="color:#f8f8f8;text-decoration:underline"> -</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; not having it in the CR may cause loss of data</span></code></pre></div> - - - - - Docs: Separate namespaces for Jenkins and Operator - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/separate-namespaces/ - Wed, 08 Dec 2021 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/separate-namespaces/ - - - - - -<h2 id="create-namespaces">Create namespaces</h2> - -<p>You need to create two namespaces, for example we&rsquo;ll call them <strong>jenkins</strong> for Jenkins and <strong>jenkins-operator</strong> for Jenkins Operator.</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 ns jenkins-operator -$ kubectl create ns jenkins</code></pre></div> -<h2 id="create-necessary-resources-in-jenkins-operator-namespace">Create necessary resources in Jenkins Operator namespace</h2> - -<p>Next, you need to install resources necessary for the Operator to work in the <code>jenkins-operator</code> namespace. To do that, -copy the manifest you see below to <code>jenkins-operator-rbac.yaml</code>file.</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">---<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>v1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>ServiceAccount<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>---<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#8f5902;font-style:italic"># permissions to do leader election.</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>rbac.authorization.k8s.io/v1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Role<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>leader-election-role<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>rules<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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:#4e9a06">&#34;&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>coordination.k8s.io<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>configmaps<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>leases<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>get<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>list<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>watch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>create<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>update<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>patch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>delete<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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:#4e9a06">&#34;&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>events<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>create<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>patch<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>apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>rbac.authorization.k8s.io/v1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>RoleBinding<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>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>leader-election-rolebinding<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>roleRef<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroup<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>rbac.authorization.k8s.io<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>Role<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>leader-election-role<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>subjects<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>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>ServiceAccount<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<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>apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>rbac.authorization.k8s.io/v1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Role<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>rules<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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>apps<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>daemonsets<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>deployments<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>replicasets<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>statefulsets<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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:#4e9a06">&#39;*&#39;</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>apiGroups<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>apps<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>deployments/finalizers<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>update<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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>build.openshift.io<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>buildconfigs<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>builds<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>get<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>list<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>watch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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:#4e9a06">&#34;&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>configmaps<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>secrets<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>services<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>create<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>get<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>list<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>update<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>watch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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:#4e9a06">&#34;&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>events<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>create<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>get<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>list<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>patch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>watch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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:#4e9a06">&#34;&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>persistentvolumeclaims<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>get<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>list<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>watch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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:#4e9a06">&#34;&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>pods<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>create<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>delete<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>get<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>list<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>patch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>update<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>watch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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:#4e9a06">&#34;&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>pods<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>pods/exec<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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:#4e9a06">&#39;*&#39;</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>apiGroups<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:#4e9a06">&#34;&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>pods/log<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>get<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>list<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>watch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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:#4e9a06">&#34;&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>pods/portforward<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>create<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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:#4e9a06">&#34;&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>serviceaccounts<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>create<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>get<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>list<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>update<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>watch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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>image.openshift.io<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>imagestreams<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>get<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>list<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>watch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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>jenkins.io<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#39;*&#39;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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:#4e9a06">&#39;*&#39;</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>apiGroups<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>jenkins.io<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<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>verbs<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>create<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>delete<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>get<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>list<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>patch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>update<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>watch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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>jenkins.io<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins/finalizers<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>update<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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>jenkins.io<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins/status<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>get<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>patch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>update<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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>rbac.authorization.k8s.io<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>rolebindings<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>roles<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>create<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>get<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>list<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>update<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>watch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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>route.openshift.io<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>routes<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>create<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>get<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>list<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>update<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>watch<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>apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>rbac.authorization.k8s.io/v1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>RoleBinding<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>subjects<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>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>ServiceAccount<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<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>roleRef<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroup<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>rbac.authorization.k8s.io<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>Role<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</code></pre></div> -<p>Now install the required resources in <code>jenkins-operator</code> namespace with:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl apply -n jenkins-operator -f jenkins-operator-rbac.yaml</code></pre></div> -<p>There&rsquo;s only one thing left to install in <code>jenkins-operator</code> namespace, and that is the Operator itself. The manifest -below contains the Operator as defined in all-in-one manifest found in <a href="https://jenkinsci.github.io/kubernetes-operator/kubernetes-operator/docs/getting-started/latest/installing-the-operator/">Installing the Operator</a> -page, the only difference is that the one here sets <code>WATCH_NAMESPACE</code> to the <code>jenkins</code> namespace we created.</p> - -<p>Copy its content to <code>jenkins-operator.yaml</code> file.</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">apiVersion: apps/v1 -kind: Deployment -metadata: - name: jenkins-operator - labels: - control-plane: controller-manager -spec: - selector: - matchLabels: - control-plane: controller-manager - replicas: <span style="color:#0000cf;font-weight:bold">1</span> - template: - metadata: - labels: - control-plane: controller-manager - spec: - serviceAccountName: jenkins-operator - securityContext: - runAsUser: <span style="color:#0000cf;font-weight:bold">65532</span> - containers: - - command: - - /manager - args: - - --leader-elect - image: virtuslab/jenkins-operator:v0.7.0 - name: jenkins-operator - imagePullPolicy: IfNotPresent - securityContext: - allowPrivilegeEscalation: <span style="color:#204a87">false</span> - livenessProbe: - httpGet: - path: /healthz - port: <span style="color:#0000cf;font-weight:bold">8081</span> - initialDelaySeconds: <span style="color:#0000cf;font-weight:bold">15</span> - periodSeconds: <span style="color:#0000cf;font-weight:bold">20</span> - readinessProbe: - httpGet: - path: /readyz - port: <span style="color:#0000cf;font-weight:bold">8081</span> - initialDelaySeconds: <span style="color:#0000cf;font-weight:bold">5</span> - periodSeconds: <span style="color:#0000cf;font-weight:bold">10</span> - resources: - limits: - cpu: 100m - memory: 30Mi - requests: - cpu: 100m - memory: 20Mi - env: - - name: WATCH_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - terminationGracePeriodSeconds: <span style="color:#0000cf;font-weight:bold">10</span></code></pre></div> -<p>Install the Operator in <code>jenkins-operator</code> namespace with:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl apply -n jenkins-operator -f jenkins-operator.yaml</code></pre></div> -<p>You have installed the Operator in <code>jenkins-operator</code> namespace, watching for Jenkins in <code>jenkins</code> namespace. Now -there are two things left to do: creating necessary Role and RoleBinding for the Operator in <code>jenkins</code> namespace, and -deploying actual Jenkins instance there.</p> - -<h2 id="create-necessary-resources-in-jenkins-namespace">Create necessary resources in Jenkins namespace</h2> - -<p>Below you can find manifest with RBAC that needs to be created in <code>jenkins</code> namespace. Copy its content to <code>jenkins-ns-rbac.yaml</code> file.</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>rbac.authorization.k8s.io/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>Role<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>rules<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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>apps<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>daemonsets<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>deployments<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>replicasets<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>statefulsets<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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:#4e9a06">&#39;*&#39;</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>apiGroups<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>apps<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>deployments/finalizers<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>update<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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>build.openshift.io<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>buildconfigs<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>builds<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>get<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>list<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>watch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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:#4e9a06">&#34;&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>configmaps<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>secrets<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>services<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>create<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>get<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>list<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>update<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>watch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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:#4e9a06">&#34;&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>events<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>create<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>get<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>list<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>patch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>watch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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:#4e9a06">&#34;&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>persistentvolumeclaims<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>get<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>list<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>watch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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:#4e9a06">&#34;&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>pods<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>create<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>delete<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>get<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>list<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>patch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>update<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>watch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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:#4e9a06">&#34;&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>pods<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>pods/exec<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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:#4e9a06">&#39;*&#39;</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>apiGroups<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:#4e9a06">&#34;&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>pods/log<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>get<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>list<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>watch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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:#4e9a06">&#34;&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>pods/portforward<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>create<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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:#4e9a06">&#34;&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>serviceaccounts<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>create<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>get<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>list<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>update<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>watch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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>image.openshift.io<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>imagestreams<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>get<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>list<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>watch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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>jenkins.io<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#39;*&#39;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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:#4e9a06">&#39;*&#39;</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>apiGroups<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>jenkins.io<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<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>verbs<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>create<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>delete<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>get<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>list<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>patch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>update<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>watch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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>jenkins.io<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins/finalizers<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>update<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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>jenkins.io<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins/status<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>get<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>patch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>update<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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>rbac.authorization.k8s.io<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>rolebindings<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>roles<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>create<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>get<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>list<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>update<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>watch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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>route.openshift.io<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>routes<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>create<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>get<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>list<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>update<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>watch<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>apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>rbac.authorization.k8s.io/v1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>RoleBinding<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>subjects<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>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>ServiceAccount<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<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>namespace<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>roleRef<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroup<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>rbac.authorization.k8s.io<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>Role<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</code></pre></div> -<p>Now apply it with:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl apply -n jenkins -f jenkins-ns-rbac.yaml</code></pre></div> -<p>The last thing to do is to deploy Jenkins. Below you can find an example Jenkins resource manifest. -It&rsquo;s the same as one used in <a href="https://jenkinsci.github.io/kubernetes-operator/kubernetes-operator/docs/getting-started/latest/deploying-jenkins/">Deploying Jenkins</a>. -Copy it to <code>jenkins-instance.yaml</code></p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.io/v1alpha2<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>example<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurationAsCode<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurations<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">]</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>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><span style="color:#4e9a06">&#34;&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>groovyScripts<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurations<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">]</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>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><span style="color:#4e9a06">&#34;&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkinsAPISettings<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>authorizationStrategy<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>createUser<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>disableCSRFProtection<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">false</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>containers<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-master<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>image<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins/jenkins<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">2.319</span><span style="color:#0000cf;font-weight:bold">.1</span>-lts-alpine<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>imagePullPolicy<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Always<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>livenessProbe<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>failureThreshold<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">12</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>httpGet<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>path<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/login<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>port<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>http<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>scheme<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>HTTP<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>initialDelaySeconds<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">100</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>periodSeconds<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">10</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>successThreshold<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>timeoutSeconds<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">5</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>readinessProbe<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>failureThreshold<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">10</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>httpGet<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>path<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/login<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>port<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>http<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>scheme<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>HTTP<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>initialDelaySeconds<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">80</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>periodSeconds<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">10</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>successThreshold<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>timeoutSeconds<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>limits<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>cpu<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>1500m<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>memory<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>3Gi<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>requests<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>cpu<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;1&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>memory<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>500Mi<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>seedJobs<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>id<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>targets<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;cicd/jobs/*.jenkins&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>description<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Jenkins Operator repository&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>repositoryBranch<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>master<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>repositoryUrl<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>https<span style="color:#000;font-weight:bold">:</span>//github.com/jenkinsci/kubernetes-operator.git</code></pre></div> -<p>Now you can deploy it with:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl apply -n jenkins -f jenkins-instance.yaml</code></pre></div> -<p>With this, you have just set up Jenkins Operator and Jenkins in separate namespaces. Now the Operator will run in -its own namespace (<code>jenkins-operator</code>), watch for CRs in <code>jenkins</code> namespace, and deploy Jenkins there.</p> - - - - - - Docs: Custom backup and restore providers - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/custom-backup-and-restore/ - Wed, 08 Dec 2021 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/custom-backup-and-restore/ - - - - - -<p>With enough effort one can create a custom backup and restore provider -for the Jenkins Operator.</p> - -<h2 id="requirements">Requirements</h2> - -<p>Two commands (e.g. scripts) are required:</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> - -<p>One of those scripts (or the entry point of the container) needs to be responsible -for backup cleanup or rotation if required, or an external system.</p> - -<h2 id="how-it-works">How it works</h2> - -<p>The mechanism relies on basic Kubernetes and UNIX functionalities.</p> - -<p>The backup (and restore) container runs as a sidecar in the same -Kubernetes pod as the Jenkins master.</p> - -<p>Name of the backup and restore containers can be set as necessary using -<code>spec.backup.containerName</code> and <code>spec.restore.containerName</code>. -In most cases it will be the same container, but we allow for less common use cases.</p> - -<p>The operator will call a backup or restore commands inside a sidecar container when necessary:</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> - -<p>This example shows abbreviated version of a simple AWS S3 backup implementation -using: <code>aws-cli</code>, <code>bash</code> and <code>kube2iam</code>.</p> - -<p>In addition to your normal <code>Jenkins</code> <code>CustomResource</code> some additional settings -for backup and restore are required, e.g.:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.io/v1alpha1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>example<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>namespace<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>master<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>masterAnnotations<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>iam.amazonaws.com/role<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;my-example-backup-role&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># tell kube2iam where the AWS IAM role is</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>containers<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-master<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>...<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># container responsible for backup and restore</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>image<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>quay.io/virtuslab/aws-cli<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.16</span><span style="color:#0000cf;font-weight:bold">.263</span><span style="color:#0000cf;font-weight:bold">-2</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>workingDir<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/home/user/bin/<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>command<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># our container entry point</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>sleep<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>infinity<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>env<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>BACKUP_BUCKET<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>my-example-bucket<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># the S3 bucket name to use</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>BACKUP_PATH<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>my-backup-path<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># the S3 bucket path prefix to use</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>JENKINS_HOME<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/jenkins-home<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># the path to mount jenkins home dir in the backup container</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>volumeMounts<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>mountPath<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/jenkins-home<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># Jenkins home volume</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-home<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>mountPath<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/home/user/bin/backup.sh<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup-scripts<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>subPath<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup.sh<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>readOnly<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">true</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>mountPath<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/home/user/bin/restore.sh<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup-scripts<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>subPath<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>restore.sh<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>readOnly<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">true</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>volumes<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup-scripts<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configMap<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>defaultMode<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">0754</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-backup-s3<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>securityContext<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># make sure both containers use the same UID and GUID</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>runAsUser<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1000</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>fsGroup<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1000</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>...<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>containerName<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># container name responsible for backup</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>interval<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">3600</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># how often make a backup in seconds</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>makeBackupBeforePodDeletion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">true</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># trigger backup just before deleting the pod</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>action<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>command<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># this command is invoked on &#34;backup&#34; container to create a backup,</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># &lt;backup_number&gt; is passed by operator,</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># for example /home/user/bin/backup.sh &lt;backup_number&gt;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>/home/user/bin/backup.sh<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>restore<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>containerName<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># container name is responsible for restore backup</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>action<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>command<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># this command is invoked on &#34;backup&#34; container to restore a backup,</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># &lt;backup_number&gt; is passed by operator</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># for example /home/user/bin/restore.sh &lt;backup_number&gt;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>/home/user/bin/restore.sh<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#8f5902;font-style:italic"># recoveryOnce: &lt;backup_number&gt; # if want to restore specific backup configure this field and then Jenkins will be restarted and desired backup will be restored</span></code></pre></div> -<p>The actual backup and restore scripts will be provided in a <code>ConfigMap</code>:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>ConfigMap<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>v1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-backup-s3<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>namespace<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>labels<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>app<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>data<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup.sh<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>|<span style="color:#8f5902;font-style:italic">- -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">#!/bin/bash -xeu</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">[</span><span style="color:#f8f8f8;text-decoration:underline"> </span>!<span style="color:#f8f8f8;text-decoration:underline"> </span>$<span style="color:#8f5902;font-style:italic"># -eq 1 ]] &amp;&amp; echo &#34;Usage: $0 backup_number&#34; &amp;&amp; exit 1;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">[</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-z<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;${BACKUP_BUCKET}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">]</span><span style="color:#000;font-weight:bold">]</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Required &#39;BACKUP_BUCKET&#39; env not set&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exit<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>;<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">[</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-z<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;${BACKUP_PATH}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">]</span><span style="color:#000;font-weight:bold">]</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Required &#39;BACKUP_PATH&#39; env not set&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exit<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>;<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">[</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-z<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;${JENKINS_HOME}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">]</span><span style="color:#000;font-weight:bold">]</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Required &#39;JENKINS_HOME&#39; env not set&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exit<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>;<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup_number=$<span style="color:#0000cf;font-weight:bold">1</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Running backup #${backup_number}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>BACKUP_TMP_DIR=$(mktemp<span style="color:#f8f8f8;text-decoration:underline"> </span>-d)<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>tar<span style="color:#f8f8f8;text-decoration:underline"> </span>-C<span style="color:#f8f8f8;text-decoration:underline"> </span>${JENKINS_HOME}<span style="color:#f8f8f8;text-decoration:underline"> </span>-czf<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;${BACKUP_TMP_DIR}/${backup_number}.tar.gz&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>--exclude<span style="color:#f8f8f8;text-decoration:underline"> </span>jobs/<span style="color:#8f5902;font-style:italic">*/workspace*</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-c<span style="color:#f8f8f8;text-decoration:underline"> </span>jobs<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>\<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>aws<span style="color:#f8f8f8;text-decoration:underline"> </span>s3<span style="color:#f8f8f8;text-decoration:underline"> </span>cp<span style="color:#f8f8f8;text-decoration:underline"> </span>${BACKUP_TMP_DIR}/${backup_number}.tar.gz<span style="color:#f8f8f8;text-decoration:underline"> </span>s3<span style="color:#000;font-weight:bold">:</span>//${BACKUP_BUCKET}/${BACKUP_PATH}/${backup_number}.tar.gz<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span>Done<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>restore.sh<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>|<span style="color:#8f5902;font-style:italic">- -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">#!/bin/bash -xeu</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">[</span><span style="color:#f8f8f8;text-decoration:underline"> </span>!<span style="color:#f8f8f8;text-decoration:underline"> </span>$<span style="color:#8f5902;font-style:italic"># -eq 1 ]] &amp;&amp; echo &#34;Usage: $0 backup_number&#34; &amp;&amp; exit 1</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">[</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-z<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;${BACKUP_BUCKET}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">]</span><span style="color:#000;font-weight:bold">]</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Required &#39;BACKUP_BUCKET&#39; env not set&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exit<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>;<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">[</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-z<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;${BACKUP_PATH}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">]</span><span style="color:#000;font-weight:bold">]</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Required &#39;BACKUP_PATH&#39; env not set&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exit<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>;<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">[</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-z<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;${JENKINS_HOME}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">]</span><span style="color:#000;font-weight:bold">]</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Required &#39;JENKINS_HOME&#39; env not set&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exit<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>;<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup_number=$<span style="color:#0000cf;font-weight:bold">1</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Running restore #${backup_number}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>BACKUP_TMP_DIR=$(mktemp<span style="color:#f8f8f8;text-decoration:underline"> </span>-d)<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>aws<span style="color:#f8f8f8;text-decoration:underline"> </span>s3<span style="color:#f8f8f8;text-decoration:underline"> </span>cp<span style="color:#f8f8f8;text-decoration:underline"> </span>s3<span style="color:#000;font-weight:bold">:</span>//${BACKUP_BUCKET}/${BACKUP_PATH}/${backup_number}.tar.gz<span style="color:#f8f8f8;text-decoration:underline"> </span>${BACKUP_TMP_DIR}/${backup_number}.tar.gz<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>tar<span style="color:#f8f8f8;text-decoration:underline"> </span>-C<span style="color:#f8f8f8;text-decoration:underline"> </span>${JENKINS_HOME}<span style="color:#f8f8f8;text-decoration:underline"> </span>-zxf<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;${BACKUP_TMP_DIR}/${backup_number}.tar.gz&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span>Done</code></pre></div> -<p>In our example we will use S3 bucket lifecycle policy to keep -the number of backups under control, e.g. Cloud Formation fragment:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#f8f8f8;text-decoration:underline"> </span>Type<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>AWS<span style="color:#000;font-weight:bold">:</span><span style="color:#000;font-weight:bold">:</span>S3<span style="color:#000;font-weight:bold">:</span><span style="color:#000;font-weight:bold">:</span>Bucket<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Properties<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>BucketName<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>my-example-bucket<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>...<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>LifecycleConfiguration<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Rules<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>Id<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>BackupCleanup<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Status<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Enabled<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Prefix<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>my-backup-path<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>ExpirationInDays<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">7</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>NoncurrentVersionExpirationInDays<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">14</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>AbortIncompleteMultipartUpload<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>DaysAfterInitiation<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">3</span></code></pre></div> - - - - - Docs: AKS - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/aks/ - Wed, 08 Dec 2021 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/aks/ - - - - <p>Azure AKS managed Kubernetes service adds to every pod the following environment variables:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>KUBERNETES_PORT_443_TCP_ADDR<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>KUBERNETES_PORT<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>tcp<span style="color:#000;font-weight:bold">:</span>//<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>KUBERNETES_PORT_443_TCP<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>tcp<span style="color:#000;font-weight:bold">:</span>//<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>KUBERNETES_SERVICE_HOST<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span></code></pre></div> -<p>The operator is aware of it and omits these environment variables when checking if a Jenkins pod environment has been changed. It prevents the -restart of a Jenkins pod over and over again.</p> - - - - - - Docs: LDAP - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/ldap/ - Wed, 08 Dec 2021 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/ldap/ - - - - - -<p>Configuring LDAP is not supported out of the box, but can be achieved through -plugins and some well tuned configurations.</p> - -<p>The plugin we will use is: <a href="https://plugins.jenkins.io/ldap/">https://plugins.jenkins.io/ldap/</a></p> - -<blockquote> -<p>Note: This is an example of how LDAP authentication can be achieved. The LDAP -plugin is from a third-party, and there may be other alternatives that suits -your use case better. Use this guide with a grain of salt.</p> -</blockquote> - -<h2 id="requirements">Requirements</h2> - -<ul> -<li><p>LDAP server accessible from the Kubernetes cluster where your Jenkins -instance will live.</p></li> - -<li><p>Credentials to a manager account in your AD. Jenkins Operator will use -this account to authenticate with Jenkins for health checks, seed jobs, etc.</p></li> -</ul> - -<h2 id="steps">Steps</h2> - -<p>In your Jenkins configuration, add the following plugin:</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">plugins<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># Check https://plugins.jenkins.io/ldap/ to find the latest version.</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>ldap<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.7&#34;</span></code></pre></div> -<p>Easiest step is to then start up Jenkins then navigate to your instance&rsquo;s -&ldquo;Configure Global Security&rdquo; page and configure it accordingly.</p> - -<p><code>http://jenkins.example.com/configureSecurity/</code></p> - -<p>Once it&rsquo;s set up and tested, you can navigate to your JCasC page and export -the LDAP settings.</p> - -<p><code>https://jenkins.example.com/configuration-as-code/</code></p> - -<p>Feed the relevant new settings into your Kubernetes ConfigMap for your JCasC -settings.</p> - -<p>Here&rsquo;s a snippet of the LDAP-related configurations:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>v1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>ConfigMap<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-casc<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>data<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>ldap.yaml<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">| -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">jenkins:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>securityRealm<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>ldap<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>displayNameAttributeName<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;name&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>groupSearchBase<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;OU=Groups,OU=MyCompany&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>groupSearchFilter<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;(&amp; (cn={0}) (objectclass=group) )&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>inhibitInferRootDN<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">false</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>managerDN<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;CN=Jenkins Admin,OU=UsersSystem,OU=UsersOther,OU=MyCompany,DC=mycompany,DC=local&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>managerPasswordSecret<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;${LDAP_MANAGER_PASSWORD}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>rootDN<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;DC=mycompany,DC=local&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>server<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;MyCompany.local&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>userSearch<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;SamAccountName={0}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>userSearchBase<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;OU=MyCompany&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>disableMailAddressResolver<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">false</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>disableRolePrefixing<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">true</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>groupIdStrategy<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;caseInsensitive&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>userIdStrategy<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;caseInsensitive&#34;</span></code></pre></div> -<blockquote> -<p>Note the use of <code>${LDAP_MANAGER_PASSWORD}</code> above. You can reference -Kubernetes secrets in your JCasC ConfigMaps by adding the following to your -Jenkins object:</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">&gt;<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>&gt;<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:#8f5902;font-style:italic">&gt; </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">configurationAsCode:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#8f5902;font-style:italic">&gt; </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">configurations:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#8f5902;font-style:italic">&gt; </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">- name: jenkins-casc</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#8f5902;font-style:italic">&gt; </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">secret:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#8f5902;font-style:italic">&gt; </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"># This here</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#8f5902;font-style:italic">&gt; </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">name: jenkins-casc-secrets</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>&gt;<span style="color:#f8f8f8;text-decoration:underline"> </span>```<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>&gt;<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>&gt;<span style="color:#f8f8f8;text-decoration:underline"> </span>```yaml<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>&gt;<span style="color:#f8f8f8;text-decoration:underline"> </span>apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>v1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>&gt;<span style="color:#f8f8f8;text-decoration:underline"> </span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Secret<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>&gt;<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><span style="color:#8f5902;font-style:italic">&gt; </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">name: jenkins-cred-conf-secrets</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>&gt;<span style="color:#f8f8f8;text-decoration:underline"> </span>stringData<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#8f5902;font-style:italic">&gt; </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">LDAP_MANAGER_PASSWORD: &lt;password-for-manager-created-in-ldap&gt;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>&gt;<span style="color:#f8f8f8;text-decoration:underline"> </span>```<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>&gt;<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>&gt;<span style="color:#f8f8f8;text-decoration:underline"> </span>Schema<span style="color:#f8f8f8;text-decoration:underline"> </span>reference<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span>v1alpha2.ConfigurationAsCode<span style="color:#000;font-weight:bold">]</span>(./schema/<span style="color:#8f5902;font-style:italic">#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.ConfigurationAsCode)</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>Finally<span style="color:#f8f8f8;text-decoration:underline"> </span>you<span style="color:#f8f8f8;text-decoration:underline"> </span>must<span style="color:#f8f8f8;text-decoration:underline"> </span>configure<span style="color:#f8f8f8;text-decoration:underline"> </span>the<span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> </span>operator<span style="color:#f8f8f8;text-decoration:underline"> </span>to<span style="color:#f8f8f8;text-decoration:underline"> </span>use<span style="color:#f8f8f8;text-decoration:underline"> </span>the<span style="color:#f8f8f8;text-decoration:underline"> </span>manager<span style="color:#4e9a06">&#39;s -</span><span style="color:#4e9a06">credentials from the AD. -</span><span style="color:#4e9a06"> -</span><span style="color:#4e9a06">This is because this procedure will disable Jenkins&#39;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>own<span style="color:#f8f8f8;text-decoration:underline"> </span>user<span style="color:#f8f8f8;text-decoration:underline"> </span>database<span style="color:#000;font-weight:bold">,</span><span style="color:#f8f8f8;text-decoration:underline"> </span>and<span style="color:#f8f8f8;text-decoration:underline"> </span>the<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> </span>operator<span style="color:#f8f8f8;text-decoration:underline"> </span>still<span style="color:#f8f8f8;text-decoration:underline"> </span>needs<span style="color:#f8f8f8;text-decoration:underline"> </span>to<span style="color:#f8f8f8;text-decoration:underline"> </span>be<span style="color:#f8f8f8;text-decoration:underline"> </span>able<span style="color:#f8f8f8;text-decoration:underline"> </span>to<span style="color:#f8f8f8;text-decoration:underline"> </span>talk<span style="color:#f8f8f8;text-decoration:underline"> </span>to<span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> </span>in<span style="color:#f8f8f8;text-decoration:underline"> </span>an<span style="color:#f8f8f8;text-decoration:underline"> </span>authorized<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>manner.<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>Create<span style="color:#f8f8f8;text-decoration:underline"> </span>the<span style="color:#f8f8f8;text-decoration:underline"> </span>following<span style="color:#f8f8f8;text-decoration:underline"> </span>Kubernetes<span style="color:#f8f8f8;text-decoration:underline"> </span>secret<span style="color:#000;font-weight:bold">:</span></code></pre></div> -<p>yaml -apiVersion: v1 -kind: Secret -metadata: - name: jenkins-operator-credentials-<jenkins-cr-name> - namespace: <jenkins-cr-namespace> -stringData: - user: <username-for-manager-created-in-ldap> - password: <password-for-manager-created-in-ldap> -```</p> - -<p>Note: Values in stringData do not need to be base64 encoded. They are -encoded by Kubernetes when the manifest is applied.</p> -</blockquote> - - - - - - Docs: OpenShift - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/openshift/ - Wed, 08 Dec 2021 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/openshift/ - - - - - -<h2 id="release-0-7-0-is-not-compatible-with-openshift">Release 0.7.0 is not compatible with OpenShift.</h2> - - - - - - Docs: Schema - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/schema/ - Sun, 08 Jan 2023 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/schema/ - - - - - -<div class="pageinfo pageinfo-primary"> -<p>This document contains API scheme for <code>jenkins-operator</code> Custom Resource Definition manifest</p> - -</div> - - -<p>Packages:</p> -<ul> -<li> -<a href="#jenkins.io">jenkins.io</a> -</li> -</ul> -<h2 id="jenkins.io">jenkins.io</h2> -<p> -<p>Package v1alpha2 contains API Schema definitions for the jenkins.io v1alpha2 API group</p> -</p> -Resource Types: -<ul><li> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fapi%2fv1alpha2.Jenkins">Jenkins</a> -</li></ul> -<h3 id="github.com/jenkinsci/kubernetes-operator/api/v1alpha2.Jenkins">Jenkins -</h3> -<p> -<p>Jenkins is the Schema for the jenkins API</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>apiVersion</code></br> -string</td> -<td> -<code> -jenkins.io/v1alpha2 -</code> -</td> -</tr> -<tr> -<td> -<code>kind</code></br> -string -</td> -<td><code>Jenkins</code></td> -</tr> -<tr> -<td> -<code>metadata</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#objectmeta-v1-meta"> -Kubernetes meta/v1.ObjectMeta -</a> -</em> -</td> -<td> -Refer to the Kubernetes API documentation for the fields of the -<code>metadata</code> field. -</td> -</tr> -<tr> -<td> -<code>spec</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/api/v1alpha2.JenkinsSpec"> -JenkinsSpec -</a> -</em> -</td> -<td> -<p>Spec defines the desired state of the Jenkins</p> -<br/> -<br/> -<table> -<tr> -<td> -<code>master</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/api/v1alpha2.JenkinsMaster"> -JenkinsMaster -</a> -</em> -</td> -<td> -<p>Master represents Jenkins master pod properties and Jenkins plugins. -Every single change here requires a pod restart.</p> -</td> -</tr> -<tr> -<td> -<code>seedJobs</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/api/v1alpha2.SeedJob"> -[][]github.com/jenkinsci/kubernetes-operator/api/v1alpha2.SeedJob -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>SeedJobs defines list of Jenkins Seed Job configurations -More info: <a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configuration#configure-seed-jobs-and-pipelines"> - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configuring-seed-jobs-and-pipelines/</a></p> -</td> -</tr> -<tr> -<td> -<code>validateSecurityWarnings</code></br> -<em> -bool -</em> -</td> -<td> -<em>(Optional)</em> -<p>ValidateSecurityWarnings enables or disables validating potential security warnings in Jenkins plugins via admission webhooks.</p> -</td> -</tr> -<tr> -<td> -<code>notifications</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/api/v1alpha2.Notification"> -[][]github.com/jenkinsci/kubernetes-operator/api/v1alpha2.Notification -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Notifications defines list of a services which are used to inform about Jenkins status -Can be used to integrate chat services like Slack, Microsoft Teams or Mailgun</p> -</td> -</tr> -<tr> -<td> -<code>service</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/api/v1alpha2.Service"> -Service -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Service is Kubernetes service of Jenkins master HTTP pod -Defaults to : -port: 8080 -type: ClusterIP</p> -</td> -</tr> -<tr> -<td> -<code>slaveService</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/api/v1alpha2.Service"> -Service -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Service is Kubernetes service of Jenkins slave pods -Defaults to : -port: 50000 -type: ClusterIP</p> -</td> -</tr> -<tr> -<td> -<code>backup</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/api/v1alpha2.Backup"> -Backup -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Backup defines configuration of Jenkins backup -More info: <a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configure-backup-and-restore/">https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configure-backup-and-restore/</a></p> -</td> -</tr> -<tr> -<td> -<code>restore</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/api/v1alpha2.Restore"> -Restore -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Backup defines configuration of Jenkins backup restore -More info: <a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configure-backup-and-restore/">https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configure-backup-and-restore/</a></p> -</td> -</tr> -<tr> -<td> -<code>groovyScripts</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/api/v1alpha2.GroovyScripts"> -GroovyScripts -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>GroovyScripts defines configuration of Jenkins customization via groovy scripts</p> -</td> -</tr> -<tr> -<td> -<code>configurationAsCode</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/api/v1alpha2.ConfigurationAsCode"> -ConfigurationAsCode -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>ConfigurationAsCode defines configuration of Jenkins customization via Configuration as Code Jenkins plugin</p> -</td> -</tr> -<tr> -<td> -<code>roles</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#roleref-v1-rbac"> -[]Kubernetes rbac/v1.RoleRef -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Roles defines list of extra RBAC roles for the Jenkins Master pod service account</p> -</td> -</tr> -<tr> -<td> -<code>serviceAccount</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/api/v1alpha2.ServiceAccount"> -ServiceAccount -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>ServiceAccount defines Jenkins master service account attributes</p> -</td> -</tr> -<tr> -<td> -<code>jenkinsAPISettings</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/api/v1alpha2.JenkinsAPISettings"> -JenkinsAPISettings -</a> -</em> -</td> -<td> -<p>JenkinsAPISettings defines configuration used by the operator to gain admin access to the Jenkins API</p> -</td> -</tr> -</table> -</td> -</tr> -<tr> -<td> -<code>status</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/api/v1alpha2.JenkinsStatus"> -JenkinsStatus -</a> -</em> -</td> -<td> -<p>Status defines the observed state of Jenkins</p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/api/v1alpha2.AppliedGroovyScript">AppliedGroovyScript -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fapi%2fv1alpha2.JenkinsStatus">JenkinsStatus</a>) -</p> -<p> -<p>AppliedGroovyScript is the applied groovy script in Jenkins by the operator.</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>configurationType</code></br> -<em> -string -</em> -</td> -<td> -<p>ConfigurationType is the name of the configuration type(base-groovy, user-groovy, user-casc)</p> -</td> -</tr> -<tr> -<td> -<code>source</code></br> -<em> -string -</em> -</td> -<td> -<p>Source is the name of source where is located groovy script</p> -</td> -</tr> -<tr> -<td> -<code>name</code></br> -<em> -string -</em> -</td> -<td> -<p>Name is the name of the groovy script</p> -</td> -</tr> -<tr> -<td> -<code>hash</code></br> -<em> -string -</em> -</td> -<td> -<p>Hash is the hash of the groovy script and secrets which it uses</p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/api/v1alpha2.AuthorizationStrategy">AuthorizationStrategy -(<code>string</code> alias)</p></h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fapi%2fv1alpha2.JenkinsAPISettings">JenkinsAPISettings</a>) -</p> -<p> -<p>AuthorizationStrategy defines authorization strategy of the operator for the Jenkins API</p> -</p> -<h3 id="github.com/jenkinsci/kubernetes-operator/api/v1alpha2.Backup">Backup -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fapi%2fv1alpha2.JenkinsSpec">JenkinsSpec</a>) -</p> -<p> -<p>Backup defines configuration of Jenkins backup.</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>containerName</code></br> -<em> -string -</em> -</td> -<td> -<p>ContainerName is the container name responsible for backup operation</p> -</td> -</tr> -<tr> -<td> -<code>action</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/api/v1alpha2.Handler"> -Handler -</a> -</em> -</td> -<td> -<p>Action defines action which performs backup in backup container sidecar</p> -</td> -</tr> -<tr> -<td> -<code>interval</code></br> -<em> -uint64 -</em> -</td> -<td> -<p>Interval tells how often make backup in seconds -Defaults to 30.</p> -</td> -</tr> -<tr> -<td> -<code>makeBackupBeforePodDeletion</code></br> -<em> -bool -</em> -</td> -<td> -<p>MakeBackupBeforePodDeletion tells operator to make backup before Jenkins master pod deletion</p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/api/v1alpha2.ConfigMapRef">ConfigMapRef -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fapi%2fv1alpha2.Customization">Customization</a>) -</p> -<p> -<p>ConfigMapRef is reference to Kubernetes ConfigMap.</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>name</code></br> -<em> -string -</em> -</td> -<td> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/api/v1alpha2.ConfigurationAsCode">ConfigurationAsCode -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fapi%2fv1alpha2.JenkinsSpec">JenkinsSpec</a>) -</p> -<p> -<p>ConfigurationAsCode defines configuration of Jenkins customization via Configuration as Code Jenkins plugin.</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>Customization</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/api/v1alpha2.Customization"> -Customization -</a> -</em> -</td> -<td> -<p> -(Members of <code>Customization</code> are embedded into this type.) -</p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/api/v1alpha2.Container">Container -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fapi%2fv1alpha2.JenkinsMaster">JenkinsMaster</a>) -</p> -<p> -<p>Container defines Kubernetes container attributes.</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>name</code></br> -<em> -string -</em> -</td> -<td> -<p>Name of the container specified as a DNS_LABEL. -Each container in a pod must have a unique name (DNS_LABEL).</p> -</td> -</tr> -<tr> -<td> -<code>image</code></br> -<em> -string -</em> -</td> -<td> -<p>Docker image name. -More info: <a href="https://kubernetes.io/docs/concepts/containers/images">https://kubernetes.io/docs/concepts/containers/images</a></p> -</td> -</tr> -<tr> -<td> -<code>imagePullPolicy</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#pullpolicy-v1-core"> -Kubernetes core/v1.PullPolicy -</a> -</em> -</td> -<td> -<p>Image pull policy. -One of Always, Never, IfNotPresent. -Defaults to Always.</p> -</td> -</tr> -<tr> -<td> -<code>resources</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#resourcerequirements-v1-core"> -Kubernetes core/v1.ResourceRequirements -</a> -</em> -</td> -<td> -<p>Compute Resources required by this container. -More info: <a href="https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/">https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/</a></p> -</td> -</tr> -<tr> -<td> -<code>command</code></br> -<em> -[]string -</em> -</td> -<td> -<em>(Optional)</em> -<p>Entrypoint array. Not executed within a shell. -The docker image&rsquo;s ENTRYPOINT is used if this is not provided. -Variable references $(VAR_NAME) are expanded using the container&rsquo;s environment. If a variable -cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax -can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, -regardless of whether the variable exists or not. -More info: <a href="https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell">https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell</a></p> -</td> -</tr> -<tr> -<td> -<code>args</code></br> -<em> -[]string -</em> -</td> -<td> -<em>(Optional)</em> -<p>Arguments to the entrypoint. -The docker image&rsquo;s CMD is used if this is not provided. -Variable references $(VAR_NAME) are expanded using the container&rsquo;s environment. If a variable -cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax -can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, -regardless of whether the variable exists or not. -More info: <a href="https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell">https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell</a></p> -</td> -</tr> -<tr> -<td> -<code>workingDir</code></br> -<em> -string -</em> -</td> -<td> -<em>(Optional)</em> -<p>Container&rsquo;s working directory. -If not specified, the container runtime&rsquo;s default will be used, which -might be configured in the container image.</p> -</td> -</tr> -<tr> -<td> -<code>ports</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#containerport-v1-core"> -[]Kubernetes core/v1.ContainerPort -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>List of ports to expose from the container. Exposing a port here gives -the system additional information about the network connections a -container uses, but is primarily informational. Not specifying a port here -DOES NOT prevent that port from being exposed. Any port which is -listening on the default &ldquo;0.0.0.0&rdquo; address inside a container will be -accessible from the network.</p> -</td> -</tr> -<tr> -<td> -<code>envFrom</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#envfromsource-v1-core"> -[]Kubernetes core/v1.EnvFromSource -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>List of sources to populate environment variables in the container. -The keys defined within a source must be a C_IDENTIFIER. All invalid keys -will be reported as an event when the container is starting. When a key exists in multiple -sources, the value associated with the last source will take precedence. -Values defined by an Env with a duplicate key will take precedence.</p> -</td> -</tr> -<tr> -<td> -<code>env</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#envvar-v1-core"> -[]Kubernetes core/v1.EnvVar -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>List of environment variables to set in the container.</p> -</td> -</tr> -<tr> -<td> -<code>volumeMounts</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#volumemount-v1-core"> -[]Kubernetes core/v1.VolumeMount -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Pod volumes to mount into the container&rsquo;s filesystem.</p> -</td> -</tr> -<tr> -<td> -<code>livenessProbe</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#probe-v1-core"> -Kubernetes core/v1.Probe -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Periodic probe of container liveness. -Container will be restarted if the probe fails.</p> -</td> -</tr> -<tr> -<td> -<code>readinessProbe</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#probe-v1-core"> -Kubernetes core/v1.Probe -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Periodic probe of container service readiness. -Container will be removed from service endpoints if the probe fails.</p> -</td> -</tr> -<tr> -<td> -<code>lifecycle</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#lifecycle-v1-core"> -Kubernetes core/v1.Lifecycle -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Actions that the management system should take in response to container lifecycle events.</p> -</td> -</tr> -<tr> -<td> -<code>securityContext</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#securitycontext-v1-core"> -Kubernetes core/v1.SecurityContext -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Security options the pod should run with. -More info: <a href="https://kubernetes.io/docs/concepts/policy/security-context/">https://kubernetes.io/docs/concepts/policy/security-context/</a> -More info: <a href="https://kubernetes.io/docs/tasks/configure-pod-container/security-context/">https://kubernetes.io/docs/tasks/configure-pod-container/security-context/</a></p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/api/v1alpha2.Customization">Customization -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fapi%2fv1alpha2.ConfigurationAsCode">ConfigurationAsCode</a>, -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fapi%2fv1alpha2.GroovyScripts">GroovyScripts</a>) -</p> -<p> -<p>Customization defines configuration of Jenkins customization.</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>secret</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/api/v1alpha2.SecretRef"> -SecretRef -</a> -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>configurations</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/api/v1alpha2.ConfigMapRef"> -[][]github.com/jenkinsci/kubernetes-operator/api/v1alpha2.ConfigMapRef -</a> -</em> -</td> -<td> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/api/v1alpha2.GroovyScripts">GroovyScripts -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fapi%2fv1alpha2.JenkinsSpec">JenkinsSpec</a>) -</p> -<p> -<p>GroovyScripts defines configuration of Jenkins customization via groovy scripts.</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>Customization</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/api/v1alpha2.Customization"> -Customization -</a> -</em> -</td> -<td> -<p> -(Members of <code>Customization</code> are embedded into this type.) -</p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/api/v1alpha2.Handler">Handler -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fapi%2fv1alpha2.Backup">Backup</a>, -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fapi%2fv1alpha2.Restore">Restore</a>) -</p> -<p> -<p>Handler defines a specific action that should be taken.</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>exec</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#execaction-v1-core"> -Kubernetes core/v1.ExecAction -</a> -</em> -</td> -<td> -<p>Exec specifies the action to take.</p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/api/v1alpha2.JenkinsAPISettings">JenkinsAPISettings -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fapi%2fv1alpha2.JenkinsSpec">JenkinsSpec</a>) -</p> -<p> -<p>JenkinsAPISettings defines configuration used by the operator to gain admin access to the Jenkins API</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>authorizationStrategy</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/api/v1alpha2.AuthorizationStrategy"> -AuthorizationStrategy -</a> -</em> -</td> -<td> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/api/v1alpha2.JenkinsCredentialType">JenkinsCredentialType -(<code>string</code> alias)</p></h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fapi%2fv1alpha2.SeedJob">SeedJob</a>) -</p> -<p> -<p>JenkinsCredentialType defines type of Jenkins credential used to seed job mechanism.</p> -</p> -<h3 id="github.com/jenkinsci/kubernetes-operator/api/v1alpha2.JenkinsMaster">JenkinsMaster -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fapi%2fv1alpha2.JenkinsSpec">JenkinsSpec</a>) -</p> -<p> -<p>JenkinsMaster defines the Jenkins master pod attributes and plugins, -every single change requires a Jenkins master pod restart.</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>annotations</code></br> -<em> -map[string]string -</em> -</td> -<td> -<em>(Optional)</em> -<p>Annotations is an unstructured key value map stored with a resource that may be -set by external tools to store and retrieve arbitrary metadata. They are not -queryable and should be preserved when modifying objects. -More info: <a href="http://kubernetes.io/docs/user-guide/annotations">http://kubernetes.io/docs/user-guide/annotations</a></p> -</td> -</tr> -<tr> -<td> -<code>labels</code></br> -<em> -map[string]string -</em> -</td> -<td> -<em>(Optional)</em> -<p>Map of string keys and values that can be used to organize and categorize -(scope and select) objects. May match selectors of replication controllers -and services. -More info: <a href="http://kubernetes.io/docs/user-guide/labels">http://kubernetes.io/docs/user-guide/labels</a></p> -</td> -</tr> -<tr> -<td> -<code>nodeSelector</code></br> -<em> -map[string]string -</em> -</td> -<td> -<em>(Optional)</em> -<p>NodeSelector is a selector which must be true for the pod to fit on a node. -Selector which must match a node&rsquo;s labels for the pod to be scheduled on that node. -More info: <a href="https://kubernetes.io/docs/concepts/configuration/assign-pod-node/">https://kubernetes.io/docs/concepts/configuration/assign-pod-node/</a></p> -</td> -</tr> -<tr> -<td> -<code>securityContext</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#podsecuritycontext-v1-core"> -Kubernetes core/v1.PodSecurityContext -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>SecurityContext that applies to all the containers of the Jenkins -Master. As per kubernetes specification, it can be overridden -for each container individually. -Defaults to: -runAsUser: 1000 -fsGroup: 1000</p> -</td> -</tr> -<tr> -<td> -<code>containers</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/api/v1alpha2.Container"> -[][]github.com/jenkinsci/kubernetes-operator/api/v1alpha2.Container -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>List of containers belonging to the pod. -Containers cannot currently be added or removed. -There must be at least one container in a Pod. -Defaults to: -- image: jenkins/jenkins:lts -imagePullPolicy: Always -livenessProbe: -failureThreshold: 12 -httpGet: -path: /login -port: http -scheme: HTTP -initialDelaySeconds: 80 -periodSeconds: 10 -successThreshold: 1 -timeoutSeconds: 5 -name: jenkins-master -readinessProbe: -failureThreshold: 3 -httpGet: -path: /login -port: http -scheme: HTTP -initialDelaySeconds: 30 -periodSeconds: 10 -successThreshold: 1 -timeoutSeconds: 1 -resources: -limits: -cpu: 1500m -memory: 3Gi -requests: -cpu: &ldquo;1&rdquo; -memory: 600Mi</p> -</td> -</tr> -<tr> -<td> -<code>imagePullSecrets</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#localobjectreference-v1-core"> -[]Kubernetes core/v1.LocalObjectReference -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. -If specified, these secrets will be passed to individual puller implementations for them to use. For example, -in the case of docker, only DockerConfig type secrets are honored. -More info: <a href="https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod">https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod</a></p> -</td> -</tr> -<tr> -<td> -<code>volumes</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#volume-v1-core"> -[]Kubernetes core/v1.Volume -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>List of volumes that can be mounted by containers belonging to the pod. -More info: <a href="https://kubernetes.io/docs/concepts/storage/volumes">https://kubernetes.io/docs/concepts/storage/volumes</a></p> -</td> -</tr> -<tr> -<td> -<code>tolerations</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#toleration-v1-core"> -[]Kubernetes core/v1.Toleration -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>If specified, the pod&rsquo;s tolerations.</p> -</td> -</tr> -<tr> -<td> -<code>basePlugins</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/api/v1alpha2.Plugin"> -[][]github.com/jenkinsci/kubernetes-operator/api/v1alpha2.Plugin -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>BasePlugins contains plugins required by operator -Defaults to : -- name: kubernetes -version: &ldquo;1.30.11&rdquo; -- name: workflow-job -version: &ldquo;2.42&rdquo; -- name: workflow-aggregator -version: &ldquo;2.6&rdquo; -- name: git -version: &ldquo;4.10.0&rdquo; -- name: job-dsl -version: &ldquo;1.78.1&rdquo; -- name: configuration-as-code -version: &ldquo;1.55&rdquo; -- name: kubernetes-credentials-provider -version: &ldquo;0.20&rdquo;</p> -</td> -</tr> -<tr> -<td> -<code>plugins</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/api/v1alpha2.Plugin"> -[][]github.com/jenkinsci/kubernetes-operator/api/v1alpha2.Plugin -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Plugins contains plugins required by user</p> -</td> -</tr> -<tr> -<td> -<code>disableCSRFProtection</code></br> -<em> -bool -</em> -</td> -<td> -<p>DisableCSRFProtection allows you to toggle CSRF Protection on Jenkins</p> -</td> -</tr> -<tr> -<td> -<code>priorityClassName</code></br> -<em> -string -</em> -</td> -<td> -<em>(Optional)</em> -<p>PriorityClassName for Jenkins master pod</p> -</td> -</tr> -<tr> -<td> -<code>hostAliases</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#hostalias-v1-core"> -[]Kubernetes core/v1.HostAlias -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>HostAliases for Jenkins master pod and SeedJob agent</p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/api/v1alpha2.JenkinsSpec">JenkinsSpec -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fapi%2fv1alpha2.Jenkins">Jenkins</a>) -</p> -<p> -<p>JenkinsSpec defines the desired state of Jenkins</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>master</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/api/v1alpha2.JenkinsMaster"> -JenkinsMaster -</a> -</em> -</td> -<td> -<p>Master represents Jenkins master pod properties and Jenkins plugins. -Every single change here requires a pod restart.</p> -</td> -</tr> -<tr> -<td> -<code>seedJobs</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/api/v1alpha2.SeedJob"> -[][]github.com/jenkinsci/kubernetes-operator/api/v1alpha2.SeedJob -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>SeedJobs defines list of Jenkins Seed Job configurations -More info: <a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configuration#configure-seed-jobs-and-pipelines">https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configuration#configure-seed-jobs-and-pipelines</a></p> -</td> -</tr> -<tr> -<td> -<code>validateSecurityWarnings</code></br> -<em> -bool -</em> -</td> -<td> -<em>(Optional)</em> -<p>ValidateSecurityWarnings enables or disables validating potential security warnings in Jenkins plugins via admission webhooks.</p> -</td> -</tr> -<tr> -<td> -<code>notifications</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/api/v1alpha2.Notification"> -[][]github.com/jenkinsci/kubernetes-operator/api/v1alpha2.Notification -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Notifications defines list of a services which are used to inform about Jenkins status -Can be used to integrate chat services like Slack, Microsoft Teams or Mailgun</p> -</td> -</tr> -<tr> -<td> -<code>service</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/api/v1alpha2.Service"> -Service -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Service is Kubernetes service of Jenkins master HTTP pod -Defaults to : -port: 8080 -type: ClusterIP</p> -</td> -</tr> -<tr> -<td> -<code>slaveService</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/api/v1alpha2.Service"> -Service -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Service is Kubernetes service of Jenkins slave pods -Defaults to : -port: 50000 -type: ClusterIP</p> -</td> -</tr> -<tr> -<td> -<code>backup</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/api/v1alpha2.Backup"> -Backup -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Backup defines configuration of Jenkins backup -More info: <a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configure-backup-and-restore/">https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configure-backup-and-restore/</a></p> -</td> -</tr> -<tr> -<td> -<code>restore</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/api/v1alpha2.Restore"> -Restore -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Backup defines configuration of Jenkins backup restore -More info: <a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configure-backup-and-restore/">https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configure-backup-and-restore/</a></p> -</td> -</tr> -<tr> -<td> -<code>groovyScripts</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/api/v1alpha2.GroovyScripts"> -GroovyScripts -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>GroovyScripts defines configuration of Jenkins customization via groovy scripts</p> -</td> -</tr> -<tr> -<td> -<code>configurationAsCode</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/api/v1alpha2.ConfigurationAsCode"> -ConfigurationAsCode -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>ConfigurationAsCode defines configuration of Jenkins customization via Configuration as Code Jenkins plugin</p> -</td> -</tr> -<tr> -<td> -<code>roles</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#roleref-v1-rbac"> -[]Kubernetes rbac/v1.RoleRef -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Roles defines list of extra RBAC roles for the Jenkins Master pod service account</p> -</td> -</tr> -<tr> -<td> -<code>serviceAccount</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/api/v1alpha2.ServiceAccount"> -ServiceAccount -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>ServiceAccount defines Jenkins master service account attributes</p> -</td> -</tr> -<tr> -<td> -<code>jenkinsAPISettings</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/api/v1alpha2.JenkinsAPISettings"> -JenkinsAPISettings -</a> -</em> -</td> -<td> -<p>JenkinsAPISettings defines configuration used by the operator to gain admin access to the Jenkins API</p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/api/v1alpha2.JenkinsStatus">JenkinsStatus -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fapi%2fv1alpha2.Jenkins">Jenkins</a>) -</p> -<p> -<p>JenkinsStatus defines the observed state of Jenkins</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>operatorVersion</code></br> -<em> -string -</em> -</td> -<td> -<em>(Optional)</em> -<p>OperatorVersion is the operator version which manages this CR</p> -</td> -</tr> -<tr> -<td> -<code>provisionStartTime</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#time-v1-meta"> -Kubernetes meta/v1.Time -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>ProvisionStartTime is a time when Jenkins master pod has been created</p> -</td> -</tr> -<tr> -<td> -<code>baseConfigurationCompletedTime</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#time-v1-meta"> -Kubernetes meta/v1.Time -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>BaseConfigurationCompletedTime is a time when Jenkins base configuration phase has been completed</p> -</td> -</tr> -<tr> -<td> -<code>userConfigurationCompletedTime</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#time-v1-meta"> -Kubernetes meta/v1.Time -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>UserConfigurationCompletedTime is a time when Jenkins user configuration phase has been completed</p> -</td> -</tr> -<tr> -<td> -<code>restoredBackup</code></br> -<em> -uint64 -</em> -</td> -<td> -<em>(Optional)</em> -<p>RestoredBackup is the restored backup number after Jenkins master pod restart</p> -</td> -</tr> -<tr> -<td> -<code>lastBackup</code></br> -<em> -uint64 -</em> -</td> -<td> -<em>(Optional)</em> -<p>LastBackup is the latest backup number</p> -</td> -</tr> -<tr> -<td> -<code>pendingBackup</code></br> -<em> -uint64 -</em> -</td> -<td> -<em>(Optional)</em> -<p>PendingBackup is the pending backup number</p> -</td> -</tr> -<tr> -<td> -<code>backupDoneBeforePodDeletion</code></br> -<em> -bool -</em> -</td> -<td> -<em>(Optional)</em> -<p>BackupDoneBeforePodDeletion tells if backup before pod deletion has been made</p> -</td> -</tr> -<tr> -<td> -<code>userAndPasswordHash</code></br> -<em> -string -</em> -</td> -<td> -<em>(Optional)</em> -<p>UserAndPasswordHash is a SHA256 hash made from user and password</p> -</td> -</tr> -<tr> -<td> -<code>createdSeedJobs</code></br> -<em> -[]string -</em> -</td> -<td> -<em>(Optional)</em> -<p>CreatedSeedJobs contains list of seed job id already created in Jenkins</p> -</td> -</tr> -<tr> -<td> -<code>appliedGroovyScripts</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/api/v1alpha2.AppliedGroovyScript"> -[][]github.com/jenkinsci/kubernetes-operator/api/v1alpha2.AppliedGroovyScript -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>AppliedGroovyScripts is a list with all applied groovy scripts in Jenkins by the operator</p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/api/v1alpha2.Mailgun">Mailgun -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fapi%2fv1alpha2.Notification">Notification</a>) -</p> -<p> -<p>Mailgun is handler for Mailgun email service notification channel.</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>domain</code></br> -<em> -string -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>apiKeySecretKeySelector</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/api/v1alpha2.SecretKeySelector"> -SecretKeySelector -</a> -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>recipient</code></br> -<em> -string -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>from</code></br> -<em> -string -</em> -</td> -<td> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/api/v1alpha2.MicrosoftTeams">MicrosoftTeams -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fapi%2fv1alpha2.Notification">Notification</a>) -</p> -<p> -<p>MicrosoftTeams is handler for Microsoft MicrosoftTeams notification channel.</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>webHookURLSecretKeySelector</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/api/v1alpha2.SecretKeySelector"> -SecretKeySelector -</a> -</em> -</td> -<td> -<p>The web hook URL to MicrosoftTeams App</p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/api/v1alpha2.Notification">Notification -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fapi%2fv1alpha2.JenkinsSpec">JenkinsSpec</a>) -</p> -<p> -<p>Notification is a service configuration used to send notifications about Jenkins status.</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>level</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/api/v1alpha2.NotificationLevel"> -NotificationLevel -</a> -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>verbose</code></br> -<em> -bool -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>name</code></br> -<em> -string -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>slack</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/api/v1alpha2.Slack"> -github.com/jenkinsci/kubernetes-operator/api/v1alpha2.Slack -</a> -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>teams</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/api/v1alpha2.MicrosoftTeams"> -github.com/jenkinsci/kubernetes-operator/api/v1alpha2.MicrosoftTeams -</a> -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>mailgun</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/api/v1alpha2.Mailgun"> -github.com/jenkinsci/kubernetes-operator/api/v1alpha2.Mailgun -</a> -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>smtp</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/api/v1alpha2.SMTP"> -github.com/jenkinsci/kubernetes-operator/api/v1alpha2.SMTP -</a> -</em> -</td> -<td> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/api/v1alpha2.NotificationLevel">NotificationLevel -(<code>string</code> alias)</p></h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fapi%2fv1alpha2.Notification">Notification</a>) -</p> -<p> -<p>NotificationLevel defines the level of a Notification.</p> -</p> -<h3 id="github.com/jenkinsci/kubernetes-operator/api/v1alpha2.Plugin">Plugin -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fapi%2fv1alpha2.JenkinsMaster">JenkinsMaster</a>) -</p> -<p> -<p>Plugin defines Jenkins plugin.</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>name</code></br> -<em> -string -</em> -</td> -<td> -<p>Name is the name of Jenkins plugin</p> -</td> -</tr> -<tr> -<td> -<code>version</code></br> -<em> -string -</em> -</td> -<td> -<p>Version is the version of Jenkins plugin</p> -</td> -</tr> -<tr> -<td> -<code>downloadURL</code></br> -<em> -string -</em> -</td> -<td> -<p>DownloadURL is the custom url from where plugin has to be downloaded.</p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/api/v1alpha2.PluginData">PluginData -</h3> -<p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>Version</code></br> -<em> -string -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>Kind</code></br> -<em> -string -</em> -</td> -<td> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/api/v1alpha2.PluginInfo">PluginInfo -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fapi%2fv1alpha2.PluginsInfo">PluginsInfo</a>) -</p> -<p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>name</code></br> -<em> -string -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>securityWarnings</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/api/v1alpha2.Warning"> -[][]github.com/jenkinsci/kubernetes-operator/api/v1alpha2.Warning -</a> -</em> -</td> -<td> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/api/v1alpha2.PluginsInfo">PluginsInfo -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fapi%2fv1alpha2.SecurityValidator">SecurityValidator</a>) -</p> -<p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>plugins</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/api/v1alpha2.PluginInfo"> -[][]github.com/jenkinsci/kubernetes-operator/api/v1alpha2.PluginInfo -</a> -</em> -</td> -<td> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/api/v1alpha2.Restore">Restore -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fapi%2fv1alpha2.JenkinsSpec">JenkinsSpec</a>) -</p> -<p> -<p>Restore defines configuration of Jenkins backup restore operation.</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>containerName</code></br> -<em> -string -</em> -</td> -<td> -<p>ContainerName is the container name responsible for restore backup operation</p> -</td> -</tr> -<tr> -<td> -<code>action</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/api/v1alpha2.Handler"> -Handler -</a> -</em> -</td> -<td> -<p>Action defines action which performs restore backup in restore container sidecar</p> -</td> -</tr> -<tr> -<td> -<code>getLatestAction</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/api/v1alpha2.Handler"> -Handler -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>GetLatestAction defines action which returns the latest backup number. If there is no backup &ldquo;-1&rdquo; should be -returned.</p> -</td> -</tr> -<tr> -<td> -<code>recoveryOnce</code></br> -<em> -uint64 -</em> -</td> -<td> -<em>(Optional)</em> -<p>RecoveryOnce if want to restore specific backup set this field and then Jenkins will be restarted and desired backup will be restored</p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/api/v1alpha2.SMTP">SMTP -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fapi%2fv1alpha2.Notification">Notification</a>) -</p> -<p> -<p>SMTP is handler for sending emails via this protocol.</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>usernameSecretKeySelector</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/api/v1alpha2.SecretKeySelector"> -SecretKeySelector -</a> -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>passwordSecretKeySelector</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/api/v1alpha2.SecretKeySelector"> -SecretKeySelector -</a> -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>port</code></br> -<em> -int -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>server</code></br> -<em> -string -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>tlsInsecureSkipVerify</code></br> -<em> -bool -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>from</code></br> -<em> -string -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>to</code></br> -<em> -string -</em> -</td> -<td> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/api/v1alpha2.SecretKeySelector">SecretKeySelector -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fapi%2fv1alpha2.Mailgun">Mailgun</a>, -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fapi%2fv1alpha2.MicrosoftTeams">MicrosoftTeams</a>, -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fapi%2fv1alpha2.SMTP">SMTP</a>, -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fapi%2fv1alpha2.Slack">Slack</a>) -</p> -<p> -<p>SecretKeySelector selects a key of a Secret.</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>secret</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#localobjectreference-v1-core"> -Kubernetes core/v1.LocalObjectReference -</a> -</em> -</td> -<td> -<p>The name of the secret in the pod&rsquo;s namespace to select from.</p> -</td> -</tr> -<tr> -<td> -<code>key</code></br> -<em> -string -</em> -</td> -<td> -<p>The key of the secret to select from. Must be a valid secret key.</p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/api/v1alpha2.SecretRef">SecretRef -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fapi%2fv1alpha2.Customization">Customization</a>) -</p> -<p> -<p>SecretRef is reference to Kubernetes secret.</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>name</code></br> -<em> -string -</em> -</td> -<td> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/api/v1alpha2.SecurityValidator">SecurityValidator -</h3> -<p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>PluginDataCache</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/api/v1alpha2.PluginsInfo"> -PluginsInfo -</a> -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>isCached</code></br> -<em> -bool -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>Attempts</code></br> -<em> -int -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>checkingPeriod</code></br> -<em> -time.Duration -</em> -</td> -<td> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/api/v1alpha2.SeedJob">SeedJob -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fapi%2fv1alpha2.JenkinsSpec">JenkinsSpec</a>) -</p> -<p> -<p>SeedJob defines configuration for seed job -More info: <a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configuration/#configure-seed-jobs-and-pipelines">https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configuration/#configure-seed-jobs-and-pipelines</a>.</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>id</code></br> -<em> -string -</em> -</td> -<td> -<p>ID is the unique seed job name</p> -</td> -</tr> -<tr> -<td> -<code>credentialID</code></br> -<em> -string -</em> -</td> -<td> -<p>CredentialID is the Kubernetes secret name which stores repository access credentials</p> -</td> -</tr> -<tr> -<td> -<code>description</code></br> -<em> -string -</em> -</td> -<td> -<em>(Optional)</em> -<p>Description is the description of the seed job</p> -</td> -</tr> -<tr> -<td> -<code>targets</code></br> -<em> -string -</em> -</td> -<td> -<p>Targets is the repository path where are seed job definitions</p> -</td> -</tr> -<tr> -<td> -<code>repositoryBranch</code></br> -<em> -string -</em> -</td> -<td> -<p>RepositoryBranch is the repository branch where are seed job definitions</p> -</td> -</tr> -<tr> -<td> -<code>repositoryUrl</code></br> -<em> -string -</em> -</td> -<td> -<p>RepositoryURL is the repository access URL. Can be SSH or HTTPS.</p> -</td> -</tr> -<tr> -<td> -<code>credentialType</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/api/v1alpha2.JenkinsCredentialType"> -JenkinsCredentialType -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>JenkinsCredentialType is the <a href="https://jenkinsci.github.io/kubernetes-credentials-provider-plugin/">https://jenkinsci.github.io/kubernetes-credentials-provider-plugin/</a> credential type</p> -</td> -</tr> -<tr> -<td> -<code>bitbucketPushTrigger</code></br> -<em> -bool -</em> -</td> -<td> -<em>(Optional)</em> -<p>BitbucketPushTrigger is used for Bitbucket web hooks</p> -</td> -</tr> -<tr> -<td> -<code>githubPushTrigger</code></br> -<em> -bool -</em> -</td> -<td> -<em>(Optional)</em> -<p>GitHubPushTrigger is used for GitHub web hooks</p> -</td> -</tr> -<tr> -<td> -<code>buildPeriodically</code></br> -<em> -string -</em> -</td> -<td> -<em>(Optional)</em> -<p>BuildPeriodically is setting for scheduled trigger</p> -</td> -</tr> -<tr> -<td> -<code>pollSCM</code></br> -<em> -string -</em> -</td> -<td> -<em>(Optional)</em> -<p>PollSCM is setting for polling changes in SCM</p> -</td> -</tr> -<tr> -<td> -<code>ignoreMissingFiles</code></br> -<em> -bool -</em> -</td> -<td> -<em>(Optional)</em> -<p>IgnoreMissingFiles is setting for Job DSL API plugin to ignore files that miss</p> -</td> -</tr> -<tr> -<td> -<code>additionalClasspath</code></br> -<em> -string -</em> -</td> -<td> -<em>(Optional)</em> -<p>AdditionalClasspath is setting for Job DSL API plugin to set Additional Classpath</p> -</td> -</tr> -<tr> -<td> -<code>failOnMissingPlugin</code></br> -<em> -bool -</em> -</td> -<td> -<em>(Optional)</em> -<p>FailOnMissingPlugin is setting for Job DSL API plugin that fails job if required plugin is missing</p> -</td> -</tr> -<tr> -<td> -<code>unstableOnDeprecation</code></br> -<em> -bool -</em> -</td> -<td> -<em>(Optional)</em> -<p>UnstableOnDeprecation is setting for Job DSL API plugin that sets build status as unstable if build using deprecated features</p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/api/v1alpha2.Service">Service -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fapi%2fv1alpha2.JenkinsSpec">JenkinsSpec</a>) -</p> -<p> -<p>Service defines Kubernetes service attributes</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>annotations</code></br> -<em> -map[string]string -</em> -</td> -<td> -<em>(Optional)</em> -<p>Annotations is an unstructured key value map stored with a resource that may be -set by external tools to store and retrieve arbitrary metadata. They are not -queryable and should be preserved when modifying objects. -More info: <a href="http://kubernetes.io/docs/user-guide/annotations">http://kubernetes.io/docs/user-guide/annotations</a></p> -</td> -</tr> -<tr> -<td> -<code>labels</code></br> -<em> -map[string]string -</em> -</td> -<td> -<em>(Optional)</em> -<p>Route service traffic to pods with label keys and values matching this -selector. If empty or not present, the service is assumed to have an -external process managing its endpoints, which Kubernetes will not -modify. Only applies to types ClusterIP, NodePort, and LoadBalancer. -Ignored if type is ExternalName. -More info: <a href="https://kubernetes.io/docs/concepts/services-networking/service/">https://kubernetes.io/docs/concepts/services-networking/service/</a></p> -</td> -</tr> -<tr> -<td> -<code>type</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#servicetype-v1-core"> -Kubernetes core/v1.ServiceType -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Type determines how the Service is exposed. Defaults to ClusterIP. Valid -options are ExternalName, ClusterIP, NodePort, and LoadBalancer. -&ldquo;ExternalName&rdquo; maps to the specified externalName. -&ldquo;ClusterIP&rdquo; allocates a cluster-internal IP address for load-balancing to -endpoints. Endpoints are determined by the selector or if that is not -specified, by manual construction of an Endpoints object. If clusterIP is -&ldquo;None&rdquo;, no virtual IP is allocated and the endpoints are published as a -set of endpoints rather than a stable IP. -&ldquo;NodePort&rdquo; builds on ClusterIP and allocates a port on every node which -routes to the clusterIP. -&ldquo;LoadBalancer&rdquo; builds on NodePort and creates an -external load-balancer (if supported in the current cloud) which routes -to the clusterIP. -More info: <a href="https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services---service-types">https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services&mdash;service-types</a></p> -</td> -</tr> -<tr> -<td> -<code>port</code></br> -<em> -int32 -</em> -</td> -<td> -<p>The port that are exposed by this service. -More info: <a href="https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies">https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies</a></p> -</td> -</tr> -<tr> -<td> -<code>nodePort</code></br> -<em> -int32 -</em> -</td> -<td> -<em>(Optional)</em> -<p>The port on each node on which this service is exposed when type=NodePort or LoadBalancer. -Usually assigned by the system. If specified, it will be allocated to the service -if unused or else creation of the service will fail. -Default is to auto-allocate a port if the ServiceType of this Service requires one. -More info: <a href="https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport">https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport</a></p> -</td> -</tr> -<tr> -<td> -<code>loadBalancerSourceRanges</code></br> -<em> -[]string -</em> -</td> -<td> -<em>(Optional)</em> -<p>If specified and supported by the platform, this will restrict traffic through the cloud-provider -load-balancer will be restricted to the specified client IPs. This field will be ignored if the -cloud-provider does not support the feature.&rdquo; -More info: <a href="https://kubernetes.io/docs/tasks/administer-cluster/securing-a-cluster/#restricting-cloud-metadata-api-access">https://kubernetes.io/docs/tasks/administer-cluster/securing-a-cluster/#restricting-cloud-metadata-api-access</a></p> -</td> -</tr> -<tr> -<td> -<code>loadBalancerIP</code></br> -<em> -string -</em> -</td> -<td> -<em>(Optional)</em> -<p>Only applies to Service Type: LoadBalancer -LoadBalancer will get created with the IP specified in this field. -This feature depends on whether the underlying cloud-provider supports specifying -the loadBalancerIP when a load balancer is created. -This field will be ignored if the cloud-provider does not support the feature.</p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/api/v1alpha2.ServiceAccount">ServiceAccount -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fapi%2fv1alpha2.JenkinsSpec">JenkinsSpec</a>) -</p> -<p> -<p>ServiceAccount defines Kubernetes service account attributes</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>annotations</code></br> -<em> -map[string]string -</em> -</td> -<td> -<em>(Optional)</em> -<p>Annotations is an unstructured key value map stored with a resource that may be -set by external tools to store and retrieve arbitrary metadata. They are not -queryable and should be preserved when modifying objects. -More info: <a href="http://kubernetes.io/docs/user-guide/annotations">http://kubernetes.io/docs/user-guide/annotations</a></p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/api/v1alpha2.Slack">Slack -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fapi%2fv1alpha2.Notification">Notification</a>) -</p> -<p> -<p>Slack is handler for Slack notification channel.</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>webHookURLSecretKeySelector</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/api/v1alpha2.SecretKeySelector"> -SecretKeySelector -</a> -</em> -</td> -<td> -<p>The web hook URL to Slack App</p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/api/v1alpha2.Version">Version -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fapi%2fv1alpha2.Warning">Warning</a>) -</p> -<p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>firstVersion</code></br> -<em> -string -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>lastVersion</code></br> -<em> -string -</em> -</td> -<td> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/api/v1alpha2.Warning">Warning -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fapi%2fv1alpha2.PluginInfo">PluginInfo</a>) -</p> -<p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>versions</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/api/v1alpha2.Version"> -[][]github.com/jenkinsci/kubernetes-operator/api/v1alpha2.Version -</a> -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>id</code></br> -<em> -string -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>message</code></br> -<em> -string -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>url</code></br> -<em> -string -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>active</code></br> -<em> -bool -</em> -</td> -<td> -</td> -</tr> -</tbody> -</table> -<hr/> -<p><em> -Generated with <code>gen-crd-api-reference-docs</code> -on git commit <code>76078d5f</code>. -</em></p> - - - - - - diff --git a/docs/docs/getting-started/latest/installing-the-operator/index.html b/docs/docs/getting-started/latest/installing-the-operator/index.html deleted file mode 100644 index f7c33e2bd..000000000 --- a/docs/docs/getting-started/latest/installing-the-operator/index.html +++ /dev/null @@ -1,1954 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Installing the Operator | Jenkins Operator - - - - - - - - - - - - - - - - - - - - - - - - - - - - Installing the Operator | Jenkins Operator - - -
- - - -
-
-
-
-
- - - - - -
- - - - -
- - - - -
- -
- - - -
-

Installing the Operator

-
How to install Jenkins Operator
- - - - -
-

This document describes installation procedure for Jenkins Operator. -All container images can be found at virtuslab/jenkins-operator Docker Hub repository.

- -
- - -

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.

- -

Deploy Jenkins Operator using YAML’s

- -

First, install Jenkins Custom Resource Definition:

-
kubectl apply -f https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/config/crd/bases/jenkins.io_jenkins.yaml 
-

Then, install the Operator and other required resources:

-
kubectl apply -f https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/deploy/all-in-one-v1alpha2.yaml
-

Watch Jenkins Operator instance being created:

-
kubectl get pods -w
-

Now Jenkins Operator should be up and running in the default namespace. -For deploying Jenkins, refer to Deploy Jenkins section.

- -

Deploy Jenkins Operator using Helm Chart

- -

Alternatively, you can also use Helm to install the Operator (and optionally, by default, Jenkins). It requires the Helm 3+ for deployment.

- -

Create a namespace for the operator:

-
$ kubectl create namespace <your-namespace>
-

To install, you need only to type these commands:

-
$ helm repo add jenkins https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/chart
-$ helm install <name> jenkins/jenkins-operator -n <your-namespace>
-

To add custom labels and annotations, you can use values.yaml file or pass them into helm install command, e.g.:

-
$ helm install <name> jenkins/jenkins-operator -n <your-namespace> --set jenkins.labels.LabelKey=LabelValue,jenkins.annotations.AnnotationKey=AnnotationValue
-

You can further customize Jenkins using values.yaml: -

Jenkins instance configuration -

- - - - - - - - - - - - - - - - - -
FieldDefault valueDescription
-jenkins - -

operator is section for configuring operator deployment

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-enabled - -true - -Enabled can enable or disable the Jenkins instance. -Set to false if you have configured CR already and/or you want to deploy an operator only. -
-apiVersion -jenkins.io/v1alpha2 -Version of the CR manifest. The recommended and default value is jenkins.io/v1alpha2. -More info -
-name - -jenkins - -Name of resource. The pod name will be jenkins-<name> (name will be set as suffix). -
-namespace - -default - -Namespace the resources will be deployed to. It's not recommended to use default namespace. -Create new namespace for jenkins (e.g. kubectl create -n jenkins) -
-labels - -{} - -Labels are injected into metadata labels field. -
-annotations - -{} - -Annotations are injected into metadata annotations field. -
-image - -jenkins/jenkins:lts - -Image is the name (and tag) of the Jenkins instance. -It's recommended to use LTS (tag: "lts") version. -
-env - -[] - -Env contains jenkins container environment variables. -
-imagePullPolicy - -Always - -Defines policy for pulling images -
-priorityClassName - -"" - -PriorityClassName indicates the importance of a Pod relative to other Pods. -More info -
-disableCSRFProtection - -false - -disableCSRFProtection can enable or disable operator built-in CSRF protection. -Set it to true if you are using OpenShift Jenkins Plugin. -More info -
-imagePullSecrets - -[] - -Used if you want to pull images from private repository -More info -
-notifications - -[] - -Notifications is feature that notify user about Jenkins reconciliation status -More info -
-basePlugins - -
-- name: kubernetes
-  version: "1.25.2"
-- name: workflow-job
-  version: "2.39"
-- name: workflow-aggregator
-  version: "2.6"
-- name: git
-  version: "4.2.2"
-- name: job-dsl
-  version: "1.77"
-- name: configuration-as-code
-  version: "1.38"
-- name: kubernetes-credentials
-        -provider
-  version: "0.13"
-
-
-Plugins installed and required by the operator -shouldn't contain plugins defined by user -You can change their versions here -More info -
-plugins - -[] - -Plugins required by the user. You can define plugins here. -More info -Example: -
-plugins:
- - name: simple-theme-plugin
-   version: 0.5.1
-
-
-seedJobs - -[] - -Placeholder for jenkins seed jobs -For seed job creation tutorial, check:
Prepare seed jobs -
Configure seed jobs -
Example: - -
-seedJobs:
-- id: jenkins-operator
-  targets: "cicd/jobs/*.jenkins"
-  description: "Jenkins Operator repository"
-  repositoryBranch: master
-  repositoryUrl:
-  - https://github.com/jenkinsci/kubernetes-operator.git
-
-
-
-resources - -
-limits:
-  cpu: 1500m
-  memory: 3Gi
-requests:
-  cpu: 1
-  memory: 500M
-
-
-Resource limit/request for Jenkins -More info -
-volumes - -
-- name: backup
-  persistentVolumeClaim:
-    claimName: jenkins-backup
-
-
-Volumes used by Jenkins -By default, we are only using PVC volume for storing backups. -
-volumeMounts - -[] - -volumeMounts are mounts for Jenkins pod. -
-securityContext - -runAsUser: 1000 -fsGroup: 1000 - -SecurityContext for pod. -
servicenot implementedHttp Jenkins service. See https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/schema/#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Service for details.
slaveServicenot implementedSlave Jenkins service. See https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/schema/#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Service for details.
-livenessProbe - -
-livenessProbe:
-  failureThreshold: 12
-  httpGet:
-    path: /login
-    port: http
-    scheme: HTTP
-  initialDelaySeconds: 80
-  periodSeconds: 10
-  successThreshold: 1
-  timeoutSeconds: 5
-
-
-livenessProbe for Pod -
-readinessProbe - -
-readinessProbe:
-  failureThreshold: 3
-  httpGet:
-    path: /login
-    port: http
-    scheme: HTTP
-  initialDelaySeconds: 30
-  periodSeconds: 10
-  successThreshold: 1
-  timeoutSeconds: 1
-
-
-readinessProbe for Pod -
- -backup - -

- - -Backup - - -

-
- -Backup is section for configuring operator's backup feature -By default backup feature is enabled and pre-configured -This section simplifies the configuration described here: Configuring backup and restore -For customization tips see Custom backup and restore -
-configuration -

- - -Configuration - - -

-
-Section where we can configure Jenkins instance. -See Customizing Jenkins for details -
-
- -

Configuring operator deployment

- - - - - - - - - - - - - - - - - -
FieldDefault valueDescription
- operator - -

operator is section for configuring operator deployment

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- replicaCount
-
- 1 - - Number of Replicas. -
- image - - virtuslab/jenkins-operator:v0.4.0 - - Name (and tag) of the Jenkins Operator image. -
- imagePullPolicy - - IfNotPresent - - Defines policy for pulling images. -
- imagePullSecrets - - [] - - Used if you want to pull images from private repository. -
- nameOverride - - "" - - nameOverride overrides the app name. -
- fullnameOverride - - "" - - fullnameOverride overrides the deployment name -
- resources - - {} - -
- nodeSelector - - {} - -
- tolerations - - {} - -
- affinity - - {} - -
-
- -

Backup -

-

-(Appears on: -JenkinsConfiguration) -

-

-Backup defines configuration of Jenkins backup. -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldDefault valueDescription
- enabled - - true - - Enabled is enable/disable switch for backup feature. -
- image - - virtuslab/jenkins-operator-backup-pvc:v0.1.1 - - Image used by backup feature. -
- containerName - - backup - - Backup container name. -
- interval - - 30 - - Defines how often make backup in seconds. -
- makeBackupBeforePodDeletion - - true - - When enabled will make backup before pod deletion. -
- backupCommand - - /home/user/bin/backup.sh - - Backup container command. -
- restoreCommand - - /home/user/bin/restore.sh - - Backup restore command. -
- pvc - -

Persistent Volume Claim Kubernetes resource

-
- - - - - - - - - - - - - - - - - - - - - - - -
- enabled - - true - - Enable/disable switch for PVC -
- enabled - - true - - Enable/disable switch for PVC -
- size - - 5Gi - - Size of PVC -
- className - - "" - - StorageClassName for PVC - More info -
-
- env - -
-- name: BACKUP_DIR
-  value: /backup
-- name: JENKINS_HOME
-  value: /jenkins-home
-- name: BACKUP_COUNT
-  value: "3"
-
-
- Contains container environment variables. - PVC backup provider handles these variables:
- BACKUP_DIR - path for storing backup files (default: "/backup")
- JENKINS_HOME - path to jenkins home (default: "/jenkins-home")
- BACKUP_COUNT - define how much recent backups will be kept
-
- volumeMounts - -
-- name: jenkins-home
-  mountPath: /jenkins-home
-- mountPath: /backup
-  name: backup
-
-
- Holds the mount points for volumes. -
- - -

Configuration -

-

- (Appears on: - Jenkins instance configuration) -

- -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldDefault valueDescription
- configurationAsCode - - {} - - ConfigurationAsCode defines configuration of Jenkins customization via Configuration as Code Jenkins plugin. -Example:
-
-- configMapName: jenkins-casc
-  content: {}
-
-
- groovyScripts - - {} - - GroovyScripts defines configuration of Jenkins customization via groovy scripts. - Example:
-
-- configMapName: jenkins-gs
-  content: {}
-
-
- secretRefName - - “” - - secretRefName of existing secret (previously created). -
- secretData - - {} - - If secretRefName is empty, secretData creates new secret and fills with data provided in secretData. -

- -

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 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
  • -
- -

Validating Webhook

- -

Validating webhook can be used in order to increase the Operator’s capabilities to monitor security issues. It will look for security vulnerabilities in the base and requested plugins. It can be easily installed via Helm charts by setting webhook.enabled in values.yaml.

- -

Note: The webhook takes some time to get up and running. It’s recommended to first deploy the Operator and later Jenkins Custom Resource by using toggles in values.yaml. -For the installation with yaml manifests (without using Helm chart), first, install cert-manager:

-
kubectl apply -f https://github.com/jetstack/cert-manager/releases/download/v1.5.1/cert-manager.yaml 
-

It takes some time to get cert-manager up and running. -Then, install the webhook and other required resources:

-
kubectl apply -f https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/deploy/all-in-one-webhook.yaml
-

Now, download the manifests for the operator and other resources from here and provide these additional fields in the Operator manifest:

- -
-
-apiVersion: apps/v1
-kind: Deployment
-metadata:
-  name: jenkins-operator
-  labels:
-    control-plane: controller-manager
-spec:
-  selector:
-    matchLabels:
-      control-plane: controller-manager
-  replicas: 1
-  template:
-    metadata:
-      labels:
-        control-plane: controller-manager
-    spec:
-      serviceAccountName: jenkins-operator
-      securityContext:
-        runAsUser: 65532
-      containers:
-      - command:
-        - /manager
-        args:
-        - --leader-elect
-        - --validate-security-warnings
-        image: virtuslab/jenkins-operator:v0.7.0
-        name: jenkins-operator
-        imagePullPolicy: IfNotPresent
-        securityContext:
-          allowPrivilegeEscalation: false
-        livenessProbe:
-          httpGet:
-            path: /healthz
-            port: 8081
-          initialDelaySeconds: 15
-          periodSeconds: 20
-        readinessProbe:
-          httpGet:
-            path: /readyz
-            port: 8081
-          initialDelaySeconds: 5
-          periodSeconds: 10
-        resources:
-          limits:
-            cpu: 200m
-            memory: 100Mi
-          requests:
-            cpu: 100m
-            memory: 20Mi
-        env:
-          - name: WATCH_NAMESPACE
-            valueFrom:
-              fieldRef:
-                fieldPath: metadata.namespace
-        volumeMounts:
-          - mountPath: /tmp/k8s-webhook-server/serving-certs
-            name: webhook-certs
-            readOnly: true
-      volumes:
-      - name: webhook-certs
-        secret:
-          defaultMode: 420
-          secretName: jenkins-webhook-certificate
-      terminationGracePeriodSeconds: 10
-
-
- -

To enable security validation in the Jenkins Custom Resource, set

- -
-

jenkins.ValidateSecurityWarnings=true

-
- - - -
Last modified January 8, 2023 -
-
- - -
-
-
- - - - -
- - - - - - - - - - - - - - diff --git a/docs/docs/getting-started/latest/ldap/index.html b/docs/docs/getting-started/latest/ldap/index.html deleted file mode 100644 index 27ebe63ae..000000000 --- a/docs/docs/getting-started/latest/ldap/index.html +++ /dev/null @@ -1,1092 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -LDAP | Jenkins Operator - - - - - - - - - - - - - - - - - - - - - - - - - - - - LDAP | Jenkins Operator - - -
- - - -
-
-
-
-
- - - - - -
- - - - -
- - - - -
-
- - - - - - - - - - - - - -
-
- - - -
-

LDAP

-
Additional configuration for LDAP
- - -

Configuring LDAP is not supported out of the box, but can be achieved through -plugins and some well tuned configurations.

- -

The plugin we will use is: https://plugins.jenkins.io/ldap/

- -
-

Note: This is an example of how LDAP authentication can be achieved. The LDAP -plugin is from a third-party, and there may be other alternatives that suits -your use case better. Use this guide with a grain of salt.

-
- -

Requirements

- -
    -
  • LDAP server accessible from the Kubernetes cluster where your Jenkins -instance will live.

  • - -
  • Credentials to a manager account in your AD. Jenkins Operator will use -this account to authenticate with Jenkins for health checks, seed jobs, etc.

  • -
- -

Steps

- -

In your Jenkins configuration, add the following plugin:

-
plugins:
-    # Check https://plugins.jenkins.io/ldap/ to find the latest version.
-  - name: ldap
-    version: "2.7"
-

Easiest step is to then start up Jenkins then navigate to your instance’s -“Configure Global Security” page and configure it accordingly.

- -

http://jenkins.example.com/configureSecurity/

- -

Once it’s set up and tested, you can navigate to your JCasC page and export -the LDAP settings.

- -

https://jenkins.example.com/configuration-as-code/

- -

Feed the relevant new settings into your Kubernetes ConfigMap for your JCasC -settings.

- -

Here’s a snippet of the LDAP-related configurations:

-
apiVersion: v1
-kind: ConfigMap
-metadata:
-  name: jenkins-casc
-data:
-  ldap.yaml: |
-    jenkins:
-      securityRealm:
-        ldap:
-          configurations:
-            - displayNameAttributeName: "name"
-              groupSearchBase: "OU=Groups,OU=MyCompany"
-              groupSearchFilter: "(& (cn={0}) (objectclass=group) )"
-              inhibitInferRootDN: false
-              managerDN: "CN=Jenkins Admin,OU=UsersSystem,OU=UsersOther,OU=MyCompany,DC=mycompany,DC=local"
-              managerPasswordSecret: "${LDAP_MANAGER_PASSWORD}"
-              rootDN: "DC=mycompany,DC=local"
-              server: "MyCompany.local"
-              userSearch: "SamAccountName={0}"
-              userSearchBase: "OU=MyCompany"
-          disableMailAddressResolver: false
-          disableRolePrefixing: true
-          groupIdStrategy: "caseInsensitive"
-          userIdStrategy: "caseInsensitive"
-
-

Note the use of ${LDAP_MANAGER_PASSWORD} above. You can reference -Kubernetes secrets in your JCasC ConfigMaps by adding the following to your -Jenkins object:

-
> kind: Jenkins
-> spec:
->   configurationAsCode:
->     configurations:
->       - name: jenkins-casc
->     secret:
->       # This here
->       name: jenkins-casc-secrets
-> ```
->
-> ```yaml
-> apiVersion: v1
-> kind: Secret
-> metadata:
->   name: jenkins-cred-conf-secrets
-> stringData:
->   LDAP_MANAGER_PASSWORD: <password-for-manager-created-in-ldap>
-> ```
->
-> Schema reference: [v1alpha2.ConfigurationAsCode](./schema/#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.ConfigurationAsCode)
-
-Finally you must configure the Jenkins operator to use the manager's
-credentials from the AD.
-
-This is because this procedure will disable Jenkins' own user database, and the
-Jenkins operator still needs to be able to talk to Jenkins in an authorized
-manner.
-
-Create the following Kubernetes secret:
-

yaml -apiVersion: v1 -kind: Secret -metadata: - name: jenkins-operator-credentials- - namespace: -stringData: - user: - password: -```

- -

Note: Values in stringData do not need to be base64 encoded. They are -encoded by Kubernetes when the manifest is applied.

-
- - - -
Last modified December 8, 2021 -
-
- - -
-
-
- - - - -
- - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/docs/getting-started/latest/openshift/index.html b/docs/docs/getting-started/latest/openshift/index.html deleted file mode 100644 index 48cf309e0..000000000 --- a/docs/docs/getting-started/latest/openshift/index.html +++ /dev/null @@ -1,980 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -OpenShift | Jenkins Operator - - - - - - - - - - - - - - - - - - - - - - - - - - - - OpenShift | Jenkins Operator - - -
- - - -
-
-
-
-
- - - - - -
- - - - -
- - - - -
-
- - - - - - - - - - - - - -
-
- - - -
-

OpenShift

-
Additional configuration for OpenShift
- - -

Release 0.7.0 is not compatible with OpenShift.

- - - -
Last modified December 8, 2021 -
-
- - -
-
-
- - - - -
- - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/docs/getting-started/latest/schema/index.html b/docs/docs/getting-started/latest/schema/index.html deleted file mode 100644 index accf7b4d6..000000000 --- a/docs/docs/getting-started/latest/schema/index.html +++ /dev/null @@ -1,3649 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Schema | Jenkins Operator - - - - - - - - - - - - - - - - - - - - - - - - - - - - Schema | Jenkins Operator - - -
- - - -
-
-
-
-
- - - - - -
- - - - -
- - - - -
-
- - - - - - - - - - - -
-
- - - -
-

Schema

-
API Schema definitions for Jenkins CRD
- - -
-

This document contains API scheme for jenkins-operator Custom Resource Definition manifest

- -
- - -

Packages:

- -

jenkins.io

-

-

Package v1alpha2 contains API Schema definitions for the jenkins.io v1alpha2 API group

-

-Resource Types: - -

Jenkins -

-

-

Jenkins is the Schema for the jenkins API

-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldDescription
-apiVersion
-string
- -jenkins.io/v1alpha2 - -
-kind
-string -
Jenkins
-metadata
- - -Kubernetes meta/v1.ObjectMeta - - -
-Refer to the Kubernetes API documentation for the fields of the -metadata field. -
-spec
- - -JenkinsSpec - - -
-

Spec defines the desired state of the Jenkins

-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-master
- - -JenkinsMaster - - -
-

Master represents Jenkins master pod properties and Jenkins plugins. -Every single change here requires a pod restart.

-
-seedJobs
- - -[][]github.com/jenkinsci/kubernetes-operator/api/v1alpha2.SeedJob - - -
-(Optional) -

SeedJobs defines list of Jenkins Seed Job configurations -More info: - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configuring-seed-jobs-and-pipelines/

-
-validateSecurityWarnings
- -bool - -
-(Optional) -

ValidateSecurityWarnings enables or disables validating potential security warnings in Jenkins plugins via admission webhooks.

-
-notifications
- - -[][]github.com/jenkinsci/kubernetes-operator/api/v1alpha2.Notification - - -
-(Optional) -

Notifications defines list of a services which are used to inform about Jenkins status -Can be used to integrate chat services like Slack, Microsoft Teams or Mailgun

-
-service
- - -Service - - -
-(Optional) -

Service is Kubernetes service of Jenkins master HTTP pod -Defaults to : -port: 8080 -type: ClusterIP

-
-slaveService
- - -Service - - -
-(Optional) -

Service is Kubernetes service of Jenkins slave pods -Defaults to : -port: 50000 -type: ClusterIP

-
-backup
- - -Backup - - -
-(Optional) -

Backup defines configuration of Jenkins backup -More info: https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configure-backup-and-restore/

-
-restore
- - -Restore - - -
-(Optional) -

Backup defines configuration of Jenkins backup restore -More info: https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configure-backup-and-restore/

-
-groovyScripts
- - -GroovyScripts - - -
-(Optional) -

GroovyScripts defines configuration of Jenkins customization via groovy scripts

-
-configurationAsCode
- - -ConfigurationAsCode - - -
-(Optional) -

ConfigurationAsCode defines configuration of Jenkins customization via Configuration as Code Jenkins plugin

-
-roles
- - -[]Kubernetes rbac/v1.RoleRef - - -
-(Optional) -

Roles defines list of extra RBAC roles for the Jenkins Master pod service account

-
-serviceAccount
- - -ServiceAccount - - -
-(Optional) -

ServiceAccount defines Jenkins master service account attributes

-
-jenkinsAPISettings
- - -JenkinsAPISettings - - -
-

JenkinsAPISettings defines configuration used by the operator to gain admin access to the Jenkins API

-
-
-status
- - -JenkinsStatus - - -
-

Status defines the observed state of Jenkins

-
-

AppliedGroovyScript -

-

-(Appears on: -JenkinsStatus) -

-

-

AppliedGroovyScript is the applied groovy script in Jenkins by the operator.

-

- - - - - - - - - - - - - - - - - - - - - - - - - -
FieldDescription
-configurationType
- -string - -
-

ConfigurationType is the name of the configuration type(base-groovy, user-groovy, user-casc)

-
-source
- -string - -
-

Source is the name of source where is located groovy script

-
-name
- -string - -
-

Name is the name of the groovy script

-
-hash
- -string - -
-

Hash is the hash of the groovy script and secrets which it uses

-
-

AuthorizationStrategy -(string alias)

-

-(Appears on: -JenkinsAPISettings) -

-

-

AuthorizationStrategy defines authorization strategy of the operator for the Jenkins API

-

-

Backup -

-

-(Appears on: -JenkinsSpec) -

-

-

Backup defines configuration of Jenkins backup.

-

- - - - - - - - - - - - - - - - - - - - - - - - - -
FieldDescription
-containerName
- -string - -
-

ContainerName is the container name responsible for backup operation

-
-action
- - -Handler - - -
-

Action defines action which performs backup in backup container sidecar

-
-interval
- -uint64 - -
-

Interval tells how often make backup in seconds -Defaults to 30.

-
-makeBackupBeforePodDeletion
- -bool - -
-

MakeBackupBeforePodDeletion tells operator to make backup before Jenkins master pod deletion

-
-

ConfigMapRef -

-

-(Appears on: -Customization) -

-

-

ConfigMapRef is reference to Kubernetes ConfigMap.

-

- - - - - - - - - - - - - -
FieldDescription
-name
- -string - -
-
-

ConfigurationAsCode -

-

-(Appears on: -JenkinsSpec) -

-

-

ConfigurationAsCode defines configuration of Jenkins customization via Configuration as Code Jenkins plugin.

-

- - - - - - - - - - - - - -
FieldDescription
-Customization
- - -Customization - - -
-

-(Members of Customization are embedded into this type.) -

-
-

Container -

-

-(Appears on: -JenkinsMaster) -

-

-

Container defines Kubernetes container attributes.

-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldDescription
-name
- -string - -
-

Name of the container specified as a DNS_LABEL. -Each container in a pod must have a unique name (DNS_LABEL).

-
-image
- -string - -
-

Docker image name. -More info: https://kubernetes.io/docs/concepts/containers/images

-
-imagePullPolicy
- - -Kubernetes core/v1.PullPolicy - - -
-

Image pull policy. -One of Always, Never, IfNotPresent. -Defaults to Always.

-
-resources
- - -Kubernetes core/v1.ResourceRequirements - - -
-

Compute Resources required by this container. -More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/

-
-command
- -[]string - -
-(Optional) -

Entrypoint array. Not executed within a shell. -The docker image’s ENTRYPOINT is used if this is not provided. -Variable references $(VAR_NAME) are expanded using the container’s environment. If a variable -cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax -can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, -regardless of whether the variable exists or not. -More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell

-
-args
- -[]string - -
-(Optional) -

Arguments to the entrypoint. -The docker image’s CMD is used if this is not provided. -Variable references $(VAR_NAME) are expanded using the container’s environment. If a variable -cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax -can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, -regardless of whether the variable exists or not. -More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell

-
-workingDir
- -string - -
-(Optional) -

Container’s working directory. -If not specified, the container runtime’s default will be used, which -might be configured in the container image.

-
-ports
- - -[]Kubernetes core/v1.ContainerPort - - -
-(Optional) -

List of ports to expose from the container. Exposing a port here gives -the system additional information about the network connections a -container uses, but is primarily informational. Not specifying a port here -DOES NOT prevent that port from being exposed. Any port which is -listening on the default “0.0.0.0” address inside a container will be -accessible from the network.

-
-envFrom
- - -[]Kubernetes core/v1.EnvFromSource - - -
-(Optional) -

List of sources to populate environment variables in the container. -The keys defined within a source must be a C_IDENTIFIER. All invalid keys -will be reported as an event when the container is starting. When a key exists in multiple -sources, the value associated with the last source will take precedence. -Values defined by an Env with a duplicate key will take precedence.

-
-env
- - -[]Kubernetes core/v1.EnvVar - - -
-(Optional) -

List of environment variables to set in the container.

-
-volumeMounts
- - -[]Kubernetes core/v1.VolumeMount - - -
-(Optional) -

Pod volumes to mount into the container’s filesystem.

-
-livenessProbe
- - -Kubernetes core/v1.Probe - - -
-(Optional) -

Periodic probe of container liveness. -Container will be restarted if the probe fails.

-
-readinessProbe
- - -Kubernetes core/v1.Probe - - -
-(Optional) -

Periodic probe of container service readiness. -Container will be removed from service endpoints if the probe fails.

-
-lifecycle
- - -Kubernetes core/v1.Lifecycle - - -
-(Optional) -

Actions that the management system should take in response to container lifecycle events.

-
-securityContext
- - -Kubernetes core/v1.SecurityContext - - -
-(Optional) -

Security options the pod should run with. -More info: https://kubernetes.io/docs/concepts/policy/security-context/ -More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/

-
-

Customization -

-

-(Appears on: -ConfigurationAsCode, -GroovyScripts) -

-

-

Customization defines configuration of Jenkins customization.

-

- - - - - - - - - - - - - - - - - -
FieldDescription
-secret
- - -SecretRef - - -
-
-configurations
- - -[][]github.com/jenkinsci/kubernetes-operator/api/v1alpha2.ConfigMapRef - - -
-
-

GroovyScripts -

-

-(Appears on: -JenkinsSpec) -

-

-

GroovyScripts defines configuration of Jenkins customization via groovy scripts.

-

- - - - - - - - - - - - - -
FieldDescription
-Customization
- - -Customization - - -
-

-(Members of Customization are embedded into this type.) -

-
-

Handler -

-

-(Appears on: -Backup, -Restore) -

-

-

Handler defines a specific action that should be taken.

-

- - - - - - - - - - - - - -
FieldDescription
-exec
- - -Kubernetes core/v1.ExecAction - - -
-

Exec specifies the action to take.

-
-

JenkinsAPISettings -

-

-(Appears on: -JenkinsSpec) -

-

-

JenkinsAPISettings defines configuration used by the operator to gain admin access to the Jenkins API

-

- - - - - - - - - - - - - -
FieldDescription
-authorizationStrategy
- - -AuthorizationStrategy - - -
-
-

JenkinsCredentialType -(string alias)

-

-(Appears on: -SeedJob) -

-

-

JenkinsCredentialType defines type of Jenkins credential used to seed job mechanism.

-

-

JenkinsMaster -

-

-(Appears on: -JenkinsSpec) -

-

-

JenkinsMaster defines the Jenkins master pod attributes and plugins, -every single change requires a Jenkins master pod restart.

-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldDescription
-annotations
- -map[string]string - -
-(Optional) -

Annotations is an unstructured key value map stored with a resource that may be -set by external tools to store and retrieve arbitrary metadata. They are not -queryable and should be preserved when modifying objects. -More info: http://kubernetes.io/docs/user-guide/annotations

-
-labels
- -map[string]string - -
-(Optional) -

Map of string keys and values that can be used to organize and categorize -(scope and select) objects. May match selectors of replication controllers -and services. -More info: http://kubernetes.io/docs/user-guide/labels

-
-nodeSelector
- -map[string]string - -
-(Optional) -

NodeSelector is a selector which must be true for the pod to fit on a node. -Selector which must match a node’s labels for the pod to be scheduled on that node. -More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/

-
-securityContext
- - -Kubernetes core/v1.PodSecurityContext - - -
-(Optional) -

SecurityContext that applies to all the containers of the Jenkins -Master. As per kubernetes specification, it can be overridden -for each container individually. -Defaults to: -runAsUser: 1000 -fsGroup: 1000

-
-containers
- - -[][]github.com/jenkinsci/kubernetes-operator/api/v1alpha2.Container - - -
-(Optional) -

List of containers belonging to the pod. -Containers cannot currently be added or removed. -There must be at least one container in a Pod. -Defaults to: -- image: jenkins/jenkins:lts -imagePullPolicy: Always -livenessProbe: -failureThreshold: 12 -httpGet: -path: /login -port: http -scheme: HTTP -initialDelaySeconds: 80 -periodSeconds: 10 -successThreshold: 1 -timeoutSeconds: 5 -name: jenkins-master -readinessProbe: -failureThreshold: 3 -httpGet: -path: /login -port: http -scheme: HTTP -initialDelaySeconds: 30 -periodSeconds: 10 -successThreshold: 1 -timeoutSeconds: 1 -resources: -limits: -cpu: 1500m -memory: 3Gi -requests: -cpu: “1” -memory: 600Mi

-
-imagePullSecrets
- - -[]Kubernetes core/v1.LocalObjectReference - - -
-(Optional) -

ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. -If specified, these secrets will be passed to individual puller implementations for them to use. For example, -in the case of docker, only DockerConfig type secrets are honored. -More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod

-
-volumes
- - -[]Kubernetes core/v1.Volume - - -
-(Optional) -

List of volumes that can be mounted by containers belonging to the pod. -More info: https://kubernetes.io/docs/concepts/storage/volumes

-
-tolerations
- - -[]Kubernetes core/v1.Toleration - - -
-(Optional) -

If specified, the pod’s tolerations.

-
-basePlugins
- - -[][]github.com/jenkinsci/kubernetes-operator/api/v1alpha2.Plugin - - -
-(Optional) -

BasePlugins contains plugins required by operator -Defaults to : -- name: kubernetes -version: “1.30.11” -- name: workflow-job -version: “2.42” -- name: workflow-aggregator -version: “2.6” -- name: git -version: “4.10.0” -- name: job-dsl -version: “1.78.1” -- name: configuration-as-code -version: “1.55” -- name: kubernetes-credentials-provider -version: “0.20”

-
-plugins
- - -[][]github.com/jenkinsci/kubernetes-operator/api/v1alpha2.Plugin - - -
-(Optional) -

Plugins contains plugins required by user

-
-disableCSRFProtection
- -bool - -
-

DisableCSRFProtection allows you to toggle CSRF Protection on Jenkins

-
-priorityClassName
- -string - -
-(Optional) -

PriorityClassName for Jenkins master pod

-
-hostAliases
- - -[]Kubernetes core/v1.HostAlias - - -
-(Optional) -

HostAliases for Jenkins master pod and SeedJob agent

-
-

JenkinsSpec -

-

-(Appears on: -Jenkins) -

-

-

JenkinsSpec defines the desired state of Jenkins

-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldDescription
-master
- - -JenkinsMaster - - -
-

Master represents Jenkins master pod properties and Jenkins plugins. -Every single change here requires a pod restart.

-
-seedJobs
- - -[][]github.com/jenkinsci/kubernetes-operator/api/v1alpha2.SeedJob - - -
-(Optional) -

SeedJobs defines list of Jenkins Seed Job configurations -More info: https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configuration#configure-seed-jobs-and-pipelines

-
-validateSecurityWarnings
- -bool - -
-(Optional) -

ValidateSecurityWarnings enables or disables validating potential security warnings in Jenkins plugins via admission webhooks.

-
-notifications
- - -[][]github.com/jenkinsci/kubernetes-operator/api/v1alpha2.Notification - - -
-(Optional) -

Notifications defines list of a services which are used to inform about Jenkins status -Can be used to integrate chat services like Slack, Microsoft Teams or Mailgun

-
-service
- - -Service - - -
-(Optional) -

Service is Kubernetes service of Jenkins master HTTP pod -Defaults to : -port: 8080 -type: ClusterIP

-
-slaveService
- - -Service - - -
-(Optional) -

Service is Kubernetes service of Jenkins slave pods -Defaults to : -port: 50000 -type: ClusterIP

-
-backup
- - -Backup - - -
-(Optional) -

Backup defines configuration of Jenkins backup -More info: https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configure-backup-and-restore/

-
-restore
- - -Restore - - -
-(Optional) -

Backup defines configuration of Jenkins backup restore -More info: https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configure-backup-and-restore/

-
-groovyScripts
- - -GroovyScripts - - -
-(Optional) -

GroovyScripts defines configuration of Jenkins customization via groovy scripts

-
-configurationAsCode
- - -ConfigurationAsCode - - -
-(Optional) -

ConfigurationAsCode defines configuration of Jenkins customization via Configuration as Code Jenkins plugin

-
-roles
- - -[]Kubernetes rbac/v1.RoleRef - - -
-(Optional) -

Roles defines list of extra RBAC roles for the Jenkins Master pod service account

-
-serviceAccount
- - -ServiceAccount - - -
-(Optional) -

ServiceAccount defines Jenkins master service account attributes

-
-jenkinsAPISettings
- - -JenkinsAPISettings - - -
-

JenkinsAPISettings defines configuration used by the operator to gain admin access to the Jenkins API

-
-

JenkinsStatus -

-

-(Appears on: -Jenkins) -

-

-

JenkinsStatus defines the observed state of Jenkins

-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldDescription
-operatorVersion
- -string - -
-(Optional) -

OperatorVersion is the operator version which manages this CR

-
-provisionStartTime
- - -Kubernetes meta/v1.Time - - -
-(Optional) -

ProvisionStartTime is a time when Jenkins master pod has been created

-
-baseConfigurationCompletedTime
- - -Kubernetes meta/v1.Time - - -
-(Optional) -

BaseConfigurationCompletedTime is a time when Jenkins base configuration phase has been completed

-
-userConfigurationCompletedTime
- - -Kubernetes meta/v1.Time - - -
-(Optional) -

UserConfigurationCompletedTime is a time when Jenkins user configuration phase has been completed

-
-restoredBackup
- -uint64 - -
-(Optional) -

RestoredBackup is the restored backup number after Jenkins master pod restart

-
-lastBackup
- -uint64 - -
-(Optional) -

LastBackup is the latest backup number

-
-pendingBackup
- -uint64 - -
-(Optional) -

PendingBackup is the pending backup number

-
-backupDoneBeforePodDeletion
- -bool - -
-(Optional) -

BackupDoneBeforePodDeletion tells if backup before pod deletion has been made

-
-userAndPasswordHash
- -string - -
-(Optional) -

UserAndPasswordHash is a SHA256 hash made from user and password

-
-createdSeedJobs
- -[]string - -
-(Optional) -

CreatedSeedJobs contains list of seed job id already created in Jenkins

-
-appliedGroovyScripts
- - -[][]github.com/jenkinsci/kubernetes-operator/api/v1alpha2.AppliedGroovyScript - - -
-(Optional) -

AppliedGroovyScripts is a list with all applied groovy scripts in Jenkins by the operator

-
-

Mailgun -

-

-(Appears on: -Notification) -

-

-

Mailgun is handler for Mailgun email service notification channel.

-

- - - - - - - - - - - - - - - - - - - - - - - - - -
FieldDescription
-domain
- -string - -
-
-apiKeySecretKeySelector
- - -SecretKeySelector - - -
-
-recipient
- -string - -
-
-from
- -string - -
-
-

MicrosoftTeams -

-

-(Appears on: -Notification) -

-

-

MicrosoftTeams is handler for Microsoft MicrosoftTeams notification channel.

-

- - - - - - - - - - - - - -
FieldDescription
-webHookURLSecretKeySelector
- - -SecretKeySelector - - -
-

The web hook URL to MicrosoftTeams App

-
-

Notification -

-

-(Appears on: -JenkinsSpec) -

-

-

Notification is a service configuration used to send notifications about Jenkins status.

-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldDescription
-level
- - -NotificationLevel - - -
-
-verbose
- -bool - -
-
-name
- -string - -
-
-slack
- - -github.com/jenkinsci/kubernetes-operator/api/v1alpha2.Slack - - -
-
-teams
- - -github.com/jenkinsci/kubernetes-operator/api/v1alpha2.MicrosoftTeams - - -
-
-mailgun
- - -github.com/jenkinsci/kubernetes-operator/api/v1alpha2.Mailgun - - -
-
-smtp
- - -github.com/jenkinsci/kubernetes-operator/api/v1alpha2.SMTP - - -
-
-

NotificationLevel -(string alias)

-

-(Appears on: -Notification) -

-

-

NotificationLevel defines the level of a Notification.

-

-

Plugin -

-

-(Appears on: -JenkinsMaster) -

-

-

Plugin defines Jenkins plugin.

-

- - - - - - - - - - - - - - - - - - - - - -
FieldDescription
-name
- -string - -
-

Name is the name of Jenkins plugin

-
-version
- -string - -
-

Version is the version of Jenkins plugin

-
-downloadURL
- -string - -
-

DownloadURL is the custom url from where plugin has to be downloaded.

-
-

PluginData -

-

-

- - - - - - - - - - - - - - - - - -
FieldDescription
-Version
- -string - -
-
-Kind
- -string - -
-
-

PluginInfo -

-

-(Appears on: -PluginsInfo) -

-

-

- - - - - - - - - - - - - - - - - -
FieldDescription
-name
- -string - -
-
-securityWarnings
- - -[][]github.com/jenkinsci/kubernetes-operator/api/v1alpha2.Warning - - -
-
-

PluginsInfo -

-

-(Appears on: -SecurityValidator) -

-

-

- - - - - - - - - - - - - -
FieldDescription
-plugins
- - -[][]github.com/jenkinsci/kubernetes-operator/api/v1alpha2.PluginInfo - - -
-
-

Restore -

-

-(Appears on: -JenkinsSpec) -

-

-

Restore defines configuration of Jenkins backup restore operation.

-

- - - - - - - - - - - - - - - - - - - - - - - - - -
FieldDescription
-containerName
- -string - -
-

ContainerName is the container name responsible for restore backup operation

-
-action
- - -Handler - - -
-

Action defines action which performs restore backup in restore container sidecar

-
-getLatestAction
- - -Handler - - -
-(Optional) -

GetLatestAction defines action which returns the latest backup number. If there is no backup “-1” should be -returned.

-
-recoveryOnce
- -uint64 - -
-(Optional) -

RecoveryOnce if want to restore specific backup set this field and then Jenkins will be restarted and desired backup will be restored

-
-

SMTP -

-

-(Appears on: -Notification) -

-

-

SMTP is handler for sending emails via this protocol.

-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldDescription
-usernameSecretKeySelector
- - -SecretKeySelector - - -
-
-passwordSecretKeySelector
- - -SecretKeySelector - - -
-
-port
- -int - -
-
-server
- -string - -
-
-tlsInsecureSkipVerify
- -bool - -
-
-from
- -string - -
-
-to
- -string - -
-
-

SecretKeySelector -

-

-(Appears on: -Mailgun, -MicrosoftTeams, -SMTP, -Slack) -

-

-

SecretKeySelector selects a key of a Secret.

-

- - - - - - - - - - - - - - - - - -
FieldDescription
-secret
- - -Kubernetes core/v1.LocalObjectReference - - -
-

The name of the secret in the pod’s namespace to select from.

-
-key
- -string - -
-

The key of the secret to select from. Must be a valid secret key.

-
-

SecretRef -

-

-(Appears on: -Customization) -

-

-

SecretRef is reference to Kubernetes secret.

-

- - - - - - - - - - - - - -
FieldDescription
-name
- -string - -
-
-

SecurityValidator -

-

-

- - - - - - - - - - - - - - - - - - - - - - - - - -
FieldDescription
-PluginDataCache
- - -PluginsInfo - - -
-
-isCached
- -bool - -
-
-Attempts
- -int - -
-
-checkingPeriod
- -time.Duration - -
-
-

SeedJob -

-

-(Appears on: -JenkinsSpec) -

-

-

SeedJob defines configuration for seed job -More info: https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configuration/#configure-seed-jobs-and-pipelines.

-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldDescription
-id
- -string - -
-

ID is the unique seed job name

-
-credentialID
- -string - -
-

CredentialID is the Kubernetes secret name which stores repository access credentials

-
-description
- -string - -
-(Optional) -

Description is the description of the seed job

-
-targets
- -string - -
-

Targets is the repository path where are seed job definitions

-
-repositoryBranch
- -string - -
-

RepositoryBranch is the repository branch where are seed job definitions

-
-repositoryUrl
- -string - -
-

RepositoryURL is the repository access URL. Can be SSH or HTTPS.

-
-credentialType
- - -JenkinsCredentialType - - -
-(Optional) -

JenkinsCredentialType is the https://jenkinsci.github.io/kubernetes-credentials-provider-plugin/ credential type

-
-bitbucketPushTrigger
- -bool - -
-(Optional) -

BitbucketPushTrigger is used for Bitbucket web hooks

-
-githubPushTrigger
- -bool - -
-(Optional) -

GitHubPushTrigger is used for GitHub web hooks

-
-buildPeriodically
- -string - -
-(Optional) -

BuildPeriodically is setting for scheduled trigger

-
-pollSCM
- -string - -
-(Optional) -

PollSCM is setting for polling changes in SCM

-
-ignoreMissingFiles
- -bool - -
-(Optional) -

IgnoreMissingFiles is setting for Job DSL API plugin to ignore files that miss

-
-additionalClasspath
- -string - -
-(Optional) -

AdditionalClasspath is setting for Job DSL API plugin to set Additional Classpath

-
-failOnMissingPlugin
- -bool - -
-(Optional) -

FailOnMissingPlugin is setting for Job DSL API plugin that fails job if required plugin is missing

-
-unstableOnDeprecation
- -bool - -
-(Optional) -

UnstableOnDeprecation is setting for Job DSL API plugin that sets build status as unstable if build using deprecated features

-
-

Service -

-

-(Appears on: -JenkinsSpec) -

-

-

Service defines Kubernetes service attributes

-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldDescription
-annotations
- -map[string]string - -
-(Optional) -

Annotations is an unstructured key value map stored with a resource that may be -set by external tools to store and retrieve arbitrary metadata. They are not -queryable and should be preserved when modifying objects. -More info: http://kubernetes.io/docs/user-guide/annotations

-
-labels
- -map[string]string - -
-(Optional) -

Route service traffic to pods with label keys and values matching this -selector. If empty or not present, the service is assumed to have an -external process managing its endpoints, which Kubernetes will not -modify. Only applies to types ClusterIP, NodePort, and LoadBalancer. -Ignored if type is ExternalName. -More info: https://kubernetes.io/docs/concepts/services-networking/service/

-
-type
- - -Kubernetes core/v1.ServiceType - - -
-(Optional) -

Type determines how the Service is exposed. Defaults to ClusterIP. Valid -options are ExternalName, ClusterIP, NodePort, and LoadBalancer. -“ExternalName” maps to the specified externalName. -“ClusterIP” allocates a cluster-internal IP address for load-balancing to -endpoints. Endpoints are determined by the selector or if that is not -specified, by manual construction of an Endpoints object. If clusterIP is -“None”, no virtual IP is allocated and the endpoints are published as a -set of endpoints rather than a stable IP. -“NodePort” builds on ClusterIP and allocates a port on every node which -routes to the clusterIP. -“LoadBalancer” builds on NodePort and creates an -external load-balancer (if supported in the current cloud) which routes -to the clusterIP. -More info: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services—service-types

-
-port
- -int32 - -
-

The port that are exposed by this service. -More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies

-
-nodePort
- -int32 - -
-(Optional) -

The port on each node on which this service is exposed when type=NodePort or LoadBalancer. -Usually assigned by the system. If specified, it will be allocated to the service -if unused or else creation of the service will fail. -Default is to auto-allocate a port if the ServiceType of this Service requires one. -More info: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport

-
-loadBalancerSourceRanges
- -[]string - -
-(Optional) -

If specified and supported by the platform, this will restrict traffic through the cloud-provider -load-balancer will be restricted to the specified client IPs. This field will be ignored if the -cloud-provider does not support the feature.” -More info: https://kubernetes.io/docs/tasks/administer-cluster/securing-a-cluster/#restricting-cloud-metadata-api-access

-
-loadBalancerIP
- -string - -
-(Optional) -

Only applies to Service Type: LoadBalancer -LoadBalancer will get created with the IP specified in this field. -This feature depends on whether the underlying cloud-provider supports specifying -the loadBalancerIP when a load balancer is created. -This field will be ignored if the cloud-provider does not support the feature.

-
-

ServiceAccount -

-

-(Appears on: -JenkinsSpec) -

-

-

ServiceAccount defines Kubernetes service account attributes

-

- - - - - - - - - - - - - -
FieldDescription
-annotations
- -map[string]string - -
-(Optional) -

Annotations is an unstructured key value map stored with a resource that may be -set by external tools to store and retrieve arbitrary metadata. They are not -queryable and should be preserved when modifying objects. -More info: http://kubernetes.io/docs/user-guide/annotations

-
-

Slack -

-

-(Appears on: -Notification) -

-

-

Slack is handler for Slack notification channel.

-

- - - - - - - - - - - - - -
FieldDescription
-webHookURLSecretKeySelector
- - -SecretKeySelector - - -
-

The web hook URL to Slack App

-
-

Version -

-

-(Appears on: -Warning) -

-

-

- - - - - - - - - - - - - - - - - -
FieldDescription
-firstVersion
- -string - -
-
-lastVersion
- -string - -
-
-

Warning -

-

-(Appears on: -PluginInfo) -

-

-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldDescription
-versions
- - -[][]github.com/jenkinsci/kubernetes-operator/api/v1alpha2.Version - - -
-
-id
- -string - -
-
-message
- -string - -
-
-url
- -string - -
-
-active
- -bool - -
-
-
-

-Generated with gen-crd-api-reference-docs -on git commit 76078d5f. -

- - - -
Last modified January 8, 2023 -
-
- - -
-
-
- - - - -
- - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/docs/getting-started/latest/separate-namespaces/index.html b/docs/docs/getting-started/latest/separate-namespaces/index.html deleted file mode 100644 index 975137032..000000000 --- a/docs/docs/getting-started/latest/separate-namespaces/index.html +++ /dev/null @@ -1,1531 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Separate namespaces for Jenkins and Operator | Jenkins Operator - - - - - - - - - - - - - - - - - - - - - - - - - - - - Separate namespaces for Jenkins and Operator | Jenkins Operator - - -
- - - -
-
-
-
-
- - - - - -
- - - - -
- - - - -
- -
- - - -
-

Separate namespaces for Jenkins and Operator

-
How to install Jenkins and Jenkins Operator in separate namespaces
- - -

Create namespaces

- -

You need to create two namespaces, for example we’ll call them jenkins for Jenkins and jenkins-operator for Jenkins Operator.

-
$ kubectl create ns jenkins-operator
-$ kubectl create ns jenkins
-

Create necessary resources in Jenkins Operator namespace

- -

Next, you need to install resources necessary for the Operator to work in the jenkins-operator namespace. To do that, -copy the manifest you see below to jenkins-operator-rbac.yamlfile.

-
---
-apiVersion: v1
-kind: ServiceAccount
-metadata:
-  name: jenkins-operator
----
-# permissions to do leader election.
-apiVersion: rbac.authorization.k8s.io/v1
-kind: Role
-metadata:
-  name: leader-election-role
-rules:
-- apiGroups:
-  - ""
-  - coordination.k8s.io
-  resources:
-  - configmaps
-  - leases
-  verbs:
-  - get
-  - list
-  - watch
-  - create
-  - update
-  - patch
-  - delete
-- apiGroups:
-  - ""
-  resources:
-  - events
-  verbs:
-  - create
-  - patch
----
-apiVersion: rbac.authorization.k8s.io/v1
-kind: RoleBinding
-metadata:
-  name: leader-election-rolebinding
-roleRef:
-  apiGroup: rbac.authorization.k8s.io
-  kind: Role
-  name: leader-election-role
-subjects:
-- kind: ServiceAccount
-  name: jenkins-operator
----
-apiVersion: rbac.authorization.k8s.io/v1
-kind: Role
-metadata:
-  name: jenkins-operator
-rules:
-- apiGroups:
-  - apps
-  resources:
-  - daemonsets
-  - deployments
-  - replicasets
-  - statefulsets
-  verbs:
-  - '*'
-- apiGroups:
-  - apps
-  - jenkins-operator
-  resources:
-  - deployments/finalizers
-  verbs:
-  - update
-- apiGroups:
-  - build.openshift.io
-  resources:
-  - buildconfigs
-  - builds
-  verbs:
-  - get
-  - list
-  - watch
-- apiGroups:
-  - ""
-  resources:
-  - configmaps
-  - secrets
-  - services
-  verbs:
-  - create
-  - get
-  - list
-  - update
-  - watch
-- apiGroups:
-  - ""
-  resources:
-  - events
-  verbs:
-  - create
-  - get
-  - list
-  - patch
-  - watch
-- apiGroups:
-  - ""
-  resources:
-  - persistentvolumeclaims
-  verbs:
-  - get
-  - list
-  - watch
-- apiGroups:
-  - ""
-  resources:
-  - pods
-  verbs:
-  - create
-  - delete
-  - get
-  - list
-  - patch
-  - update
-  - watch
-- apiGroups:
-  - ""
-  resources:
-  - pods
-  - pods/exec
-  verbs:
-  - '*'
-- apiGroups:
-  - ""
-  resources:
-  - pods/log
-  verbs:
-  - get
-  - list
-  - watch
-- apiGroups:
-  - ""
-  resources:
-  - pods/portforward
-  verbs:
-  - create
-- apiGroups:
-  - ""
-  resources:
-  - serviceaccounts
-  verbs:
-  - create
-  - get
-  - list
-  - update
-  - watch
-- apiGroups:
-  - image.openshift.io
-  resources:
-  - imagestreams
-  verbs:
-  - get
-  - list
-  - watch
-- apiGroups:
-  - jenkins.io
-  resources:
-  - '*'
-  verbs:
-  - '*'
-- apiGroups:
-  - jenkins.io
-  resources:
-  - jenkins
-  verbs:
-  - create
-  - delete
-  - get
-  - list
-  - patch
-  - update
-  - watch
-- apiGroups:
-  - jenkins.io
-  resources:
-  - jenkins/finalizers
-  verbs:
-  - update
-- apiGroups:
-  - jenkins.io
-  resources:
-  - jenkins/status
-  verbs:
-  - get
-  - patch
-  - update
-- apiGroups:
-  - rbac.authorization.k8s.io
-  resources:
-  - rolebindings
-  - roles
-  verbs:
-  - create
-  - get
-  - list
-  - update
-  - watch
-- apiGroups:
-  - route.openshift.io
-  resources:
-  - routes
-  verbs:
-  - create
-  - get
-  - list
-  - update
-  - watch
----
-apiVersion: rbac.authorization.k8s.io/v1
-kind: RoleBinding
-metadata:
-  name: jenkins-operator
-subjects:
-  - kind: ServiceAccount
-    name: jenkins-operator
-roleRef:
-  apiGroup: rbac.authorization.k8s.io
-  kind: Role
-  name: jenkins-operator
-

Now install the required resources in jenkins-operator namespace with:

-
kubectl apply -n jenkins-operator -f jenkins-operator-rbac.yaml
-

There’s only one thing left to install in jenkins-operator namespace, and that is the Operator itself. The manifest -below contains the Operator as defined in all-in-one manifest found in Installing the Operator -page, the only difference is that the one here sets WATCH_NAMESPACE to the jenkins namespace we created.

- -

Copy its content to jenkins-operator.yaml file.

-
apiVersion: apps/v1
-kind: Deployment
-metadata:
-  name: jenkins-operator
-  labels:
-    control-plane: controller-manager
-spec:
-  selector:
-    matchLabels:
-      control-plane: controller-manager
-  replicas: 1
-  template:
-    metadata:
-      labels:
-        control-plane: controller-manager
-    spec:
-      serviceAccountName: jenkins-operator
-      securityContext:
-        runAsUser: 65532
-      containers:
-      - command:
-        - /manager
-        args:
-        - --leader-elect
-        image: virtuslab/jenkins-operator:v0.7.0
-        name: jenkins-operator
-        imagePullPolicy: IfNotPresent
-        securityContext:
-          allowPrivilegeEscalation: false
-        livenessProbe:
-          httpGet:
-            path: /healthz
-            port: 8081
-          initialDelaySeconds: 15
-          periodSeconds: 20
-        readinessProbe:
-          httpGet:
-            path: /readyz
-            port: 8081
-          initialDelaySeconds: 5
-          periodSeconds: 10
-        resources:
-          limits:
-            cpu: 100m
-            memory: 30Mi
-          requests:
-            cpu: 100m
-            memory: 20Mi
-        env:
-          - name: WATCH_NAMESPACE
-            valueFrom:
-              fieldRef:
-                fieldPath: metadata.namespace
-      terminationGracePeriodSeconds: 10
-

Install the Operator in jenkins-operator namespace with:

-
kubectl apply -n jenkins-operator -f jenkins-operator.yaml
-

You have installed the Operator in jenkins-operator namespace, watching for Jenkins in jenkins namespace. Now -there are two things left to do: creating necessary Role and RoleBinding for the Operator in jenkins namespace, and -deploying actual Jenkins instance there.

- -

Create necessary resources in Jenkins namespace

- -

Below you can find manifest with RBAC that needs to be created in jenkins namespace. Copy its content to jenkins-ns-rbac.yaml file.

-
apiVersion: rbac.authorization.k8s.io/v1
-kind: Role
-metadata:
-  name: jenkins-operator
-rules:
-  - apiGroups:
-      - apps
-    resources:
-      - daemonsets
-      - deployments
-      - replicasets
-      - statefulsets
-    verbs:
-      - '*'
-  - apiGroups:
-      - apps
-      - jenkins-operator
-    resources:
-      - deployments/finalizers
-    verbs:
-      - update
-  - apiGroups:
-      - build.openshift.io
-    resources:
-      - buildconfigs
-      - builds
-    verbs:
-      - get
-      - list
-      - watch
-  - apiGroups:
-      - ""
-    resources:
-      - configmaps
-      - secrets
-      - services
-    verbs:
-      - create
-      - get
-      - list
-      - update
-      - watch
-  - apiGroups:
-      - ""
-    resources:
-      - events
-    verbs:
-      - create
-      - get
-      - list
-      - patch
-      - watch
-  - apiGroups:
-      - ""
-    resources:
-      - persistentvolumeclaims
-    verbs:
-      - get
-      - list
-      - watch
-  - apiGroups:
-      - ""
-    resources:
-      - pods
-    verbs:
-      - create
-      - delete
-      - get
-      - list
-      - patch
-      - update
-      - watch
-  - apiGroups:
-      - ""
-    resources:
-      - pods
-      - pods/exec
-    verbs:
-      - '*'
-  - apiGroups:
-      - ""
-    resources:
-      - pods/log
-    verbs:
-      - get
-      - list
-      - watch
-  - apiGroups:
-      - ""
-    resources:
-      - pods/portforward
-    verbs:
-      - create
-  - apiGroups:
-      - ""
-    resources:
-      - serviceaccounts
-    verbs:
-      - create
-      - get
-      - list
-      - update
-      - watch
-  - apiGroups:
-      - image.openshift.io
-    resources:
-      - imagestreams
-    verbs:
-      - get
-      - list
-      - watch
-  - apiGroups:
-      - jenkins.io
-    resources:
-      - '*'
-    verbs:
-      - '*'
-  - apiGroups:
-      - jenkins.io
-    resources:
-      - jenkins
-    verbs:
-      - create
-      - delete
-      - get
-      - list
-      - patch
-      - update
-      - watch
-  - apiGroups:
-      - jenkins.io
-    resources:
-      - jenkins/finalizers
-    verbs:
-      - update
-  - apiGroups:
-      - jenkins.io
-    resources:
-      - jenkins/status
-    verbs:
-      - get
-      - patch
-      - update
-  - apiGroups:
-      - rbac.authorization.k8s.io
-    resources:
-      - rolebindings
-      - roles
-    verbs:
-      - create
-      - get
-      - list
-      - update
-      - watch
-  - apiGroups:
-      - route.openshift.io
-    resources:
-      - routes
-    verbs:
-      - create
-      - get
-      - list
-      - update
-      - watch
----
-apiVersion: rbac.authorization.k8s.io/v1
-kind: RoleBinding
-metadata:
-  name: jenkins-operator
-subjects:
-  - kind: ServiceAccount
-    name: jenkins-operator
-    namespace: jenkins-operator
-roleRef:
-  apiGroup: rbac.authorization.k8s.io
-  kind: Role
-  name: jenkins-operator
-

Now apply it with:

-
kubectl apply -n jenkins -f jenkins-ns-rbac.yaml
-

The last thing to do is to deploy Jenkins. Below you can find an example Jenkins resource manifest. -It’s the same as one used in Deploying Jenkins. -Copy it to jenkins-instance.yaml

-
apiVersion: jenkins.io/v1alpha2
-kind: Jenkins
-metadata:
-  name: example
-spec:
-  configurationAsCode:
-    configurations: []
-    secret:
-      name: ""
-  groovyScripts:
-    configurations: []
-    secret:
-      name: ""
-  jenkinsAPISettings:
-    authorizationStrategy: createUser
-  master:
-    disableCSRFProtection: false
-    containers:
-      - name: jenkins-master
-        image: jenkins/jenkins:2.319.1-lts-alpine
-        imagePullPolicy: Always
-        livenessProbe:
-          failureThreshold: 12
-          httpGet:
-            path: /login
-            port: http
-            scheme: HTTP
-          initialDelaySeconds: 100
-          periodSeconds: 10
-          successThreshold: 1
-          timeoutSeconds: 5
-        readinessProbe:
-          failureThreshold: 10
-          httpGet:
-            path: /login
-            port: http
-            scheme: HTTP
-          initialDelaySeconds: 80
-          periodSeconds: 10
-          successThreshold: 1
-          timeoutSeconds: 1
-        resources:
-          limits:
-            cpu: 1500m
-            memory: 3Gi
-          requests:
-            cpu: "1"
-            memory: 500Mi
-  seedJobs:
-    - id: jenkins-operator
-      targets: "cicd/jobs/*.jenkins"
-      description: "Jenkins Operator repository"
-      repositoryBranch: master
-      repositoryUrl: https://github.com/jenkinsci/kubernetes-operator.git
-

Now you can deploy it with:

-
kubectl apply -n jenkins -f jenkins-instance.yaml
-

With this, you have just set up Jenkins Operator and Jenkins in separate namespaces. Now the Operator will run in -its own namespace (jenkins-operator), watch for CRs in jenkins namespace, and deploy Jenkins there.

- - - -
Last modified December 8, 2021 -
-
- - -
-
-
- - - - -
- - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/docs/getting-started/v0.1.x/aks/index.html b/docs/docs/getting-started/v0.1.x/aks/index.html deleted file mode 100644 index 0319c7fcb..000000000 --- a/docs/docs/getting-started/v0.1.x/aks/index.html +++ /dev/null @@ -1,986 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -AKS | Jenkins Operator - - - - - - - - - - - - - - - - - - - - - - - - - - - - AKS | Jenkins Operator - - -
- - - -
-
-
-
-
- - - - - -
- - - - -
- - - - -
-
- - - - - - - - - - - -
-
- - - -
-

AKS

-
Additional configuration for Azure Kubernetes Service
-

Azure AKS managed Kubernetes service adds to every pod the following environment variables:

-
- name: KUBERNETES_PORT_443_TCP_ADDR
-  value:
-- name: KUBERNETES_PORT
-  value: tcp://
-- name: KUBERNETES_PORT_443_TCP
-  value: tcp://
-- name: KUBERNETES_SERVICE_HOST
-  value:
-

The operator is aware of it and omits these environment variables when checking if a Jenkins pod environment has been changed. It prevents -the restart of a Jenkins pod over and over again.

- - - -
Last modified August 5, 2019 -
-
- - -
-
-
- - - - -
- - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/docs/getting-started/v0.1.x/configuration/index.html b/docs/docs/getting-started/v0.1.x/configuration/index.html deleted file mode 100644 index c5140ac7e..000000000 --- a/docs/docs/getting-started/v0.1.x/configuration/index.html +++ /dev/null @@ -1,1223 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Configuration | Jenkins Operator - - - - - - - - - - - - - - - - - - - - - - - - - - - - Configuration | Jenkins Operator - - -
- - - -
-
-
-
-
- - - - - -
- - - - -
- - - - -
- -
- - - -
-

Configuration

-
How to configure Jenkins with Operator
- - -

Jenkins operator uses job-dsl and kubernetes-credentials-provider plugins for configuring jobs -and deploy keys.

- -

Prepare job definitions and pipelines

- -

First you have to prepare pipelines and job definition in your GitHub repository using the following structure:

-
cicd/
-├── jobs
-│   └── build.jenkins
-└── pipelines
-    └── build.jenkins
-

cicd/jobs/build.jenkins it’s a job definition:

-
#!/usr/bin/env groovy
-
-pipelineJob('build-jenkins-operator') {
-    displayName('Build jenkins-operator')
-
-    definition {
-        cpsScm {
-            scm {
-                git {
-                    remote {
-                        url('https://github.com/jenkinsci/kubernetes-operator.git')
-                        credentials('jenkins-operator')
-                    }
-                    branches('*/master')
-                }
-            }
-            scriptPath('cicd/pipelines/build.jenkins')
-        }
-    }
-}
-

cicd/pipelines/build.jenkins is an actual Jenkins pipeline:

-
#!/usr/bin/env groovy
-
-def label = "build-jenkins-operator-${UUID.randomUUID().toString()}"
-def home = "/home/jenkins"
-def workspace = "${home}/workspace/build-jenkins-operator"
-def workdir = "${workspace}/src/github.com/jenkinsci/kubernetes-operator/"
-
-podTemplate(label: label,
-        containers: [
-                containerTemplate(name: 'jnlp', image: 'jenkins/inbound-agent:alpine'),
-                containerTemplate(name: 'go', image: 'golang:1-alpine', command: 'cat', ttyEnabled: true),
-        ],
-        envVars: [
-                envVar(key: 'GOPATH', value: workspace),
-        ],
-        ) {
-
-    node(label) {
-        dir(workdir) {
-            stage('Init') {
-                timeout(time: 3, unit: 'MINUTES') {
-                    checkout scm
-                }
-                container('go') {
-                    sh 'apk --no-cache --update add make git gcc libc-dev'
-                }
-            }
-
-            stage('Dep') {
-                container('go') {
-                    sh 'make dep'
-                }
-            }
-
-            stage('Test') {
-                container('go') {
-                    sh 'make test'
-                }
-            }
-
-            stage('Build') {
-                container('go') {
-                    sh 'make build'
-                }
-            }
-        }
-    }
-}
-

Configure Seed Jobs

- -

Jenkins Seed Jobs are configured using Jenkins.spec.seedJobs section from your custom resource manifest:

-
apiVersion: jenkins.io/v1alpha2
-kind: Jenkins
-metadata:
-  name: example
-spec:
-  seedJobs:
-  - id: jenkins-operator
-    targets: "cicd/jobs/*.jenkins"
-    description: "Jenkins Operator repository"
-    repositoryBranch: master
-    repositoryUrl: https://github.com/jenkinsci/kubernetes-operator.git
-

Jenkins Operator will automatically discover and configure all the seed jobs.

- -

You can verify if deploy keys were successfully configured in the Jenkins Credentials tab.

- -

jenkins

- -

You can verify if your pipelines were successfully configured in the Jenkins Seed Job console output.

- -

jenkins

- -

If your GitHub repository is private you have to configure SSH or username/password authentication.

- -

SSH authentication

- -

Generate SSH Keys

- -

There are two methods of SSH private key generation:

-
$ openssl genrsa -out <filename> 2048
-

or

-
$ ssh-keygen -t rsa -b 2048
-$ ssh-keygen -p -f <filename> -m pem
-

Then copy content from generated file.

- -

Public key

- -

If you want to upload your public key to your Git server you need to extract it.

- -

If key was generated by openssl then you need to type this to extract public key:

-
$ openssl rsa -in <filename> -pubout > <filename>.pub
-

If key was generated by ssh-keygen the public key content is located in .pub and there is no need to extract public key

- -

Configure SSH authentication

- -

Configure a seed job like this:

-
apiVersion: jenkins.io/v1alpha2
-kind: Jenkins
-metadata:
-  name: example
-spec:
-  seedJobs:
-  - id: jenkins-operator-ssh
-    credentialType: basicSSHUserPrivateKey
-    credentialID: k8s-ssh
-    targets: "cicd/jobs/*.jenkins"
-    description: "Jenkins Operator repository"
-    repositoryBranch: master
-    repositoryUrl: git@github.com:jenkinsci/kubernetes-operator.git
-

and create a Kubernetes Secret (name of secret should be the same from credentialID field):

-
apiVersion: v1
-kind: Secret
-metadata:
-  name: k8s-ssh
-stringData:
-  privateKey: |
-    -----BEGIN RSA PRIVATE KEY-----
-    MIIJKAIBAAKCAgEAxxDpleJjMCN5nusfW/AtBAZhx8UVVlhhhIKXvQ+dFODQIdzO
-    oDXybs1zVHWOj31zqbbJnsfsVZ9Uf3p9k6xpJ3WFY9b85WasqTDN1xmSd6swD4N8
-    ...
-  username: github_user_name
-

Username & password authentication

- -

Configure a seed job like this:

-
apiVersion: jenkins.io/v1alpha2
-kind: Jenkins
-metadata:
-  name: example
-spec:
-  seedJobs:
-  - id: jenkins-operator-user-pass
-    credentialType: usernamePassword
-    credentialID: k8s-user-pass
-    targets: "cicd/jobs/*.jenkins"
-    description: "Jenkins Operator repository"
-    repositoryBranch: master
-    repositoryUrl: https://github.com/jenkinsci/kubernetes-operator.git
-

and create a Kubernetes Secret (name of secret should be the same from credentialID field):

-
apiVersion: v1
-kind: Secret
-metadata:
-  name: k8s-user-pass
-stringData:
-  username: github_user_name
-  password: password_or_token
-

HTTP Proxy for downloading plugins

- -

To use forwarding proxy with an operator to download plugins you need to add the following environment variable to Jenkins CR, for e.g.:

-
spec:
-  master:
-    containers:
-      - name: jenkins-master
-        env:
-          - name: CURL_OPTIONS
-            value: -L -x <proxy_url>
-

In CURL_OPTIONS var you can set additional arguments to curl command.

- -

Jenkins login credentials

- -

The operator automatically generates a Jenkins username and password and stores it in Kubernetes secret named -jenkins-operator-credentials-<cr_name> in the namespace where Jenkins CR has been deployed.

- -

If you want change it you can override the secret:

-
apiVersion: v1
-kind: Secret
-metadata:
-  name: jenkins-operator-credentials-<cr-name>
-  namespace: <namespace>
-data:
-  user: <base64-encoded-new-username>
-  password: <base64-encoded-new-password>
-

If needed Jenkins Operator will restart the Jenkins master pod and then you can login with the new username and password -credentials.

- -

Override default Jenkins container command

- -

The default command for the Jenkins master container jenkins/jenkins:lts looks like:

-
command:
-- bash
-- -c
-- /var/jenkins/scripts/init.sh && /usr/bin/tini -s -- /usr/local/bin/jenkins.sh
-

The script/var/jenkins/scripts/init.sh is provided by the operator and configures init.groovy.d (creates the Jenkins user) -and installs plugins. -The /usr/bin/tini -s -- /usr/local/bin/jenkins.sh command runs the Jenkins master main process.

- -

You can overwrite it in the following pattern:

-
command:
-- bash
-- -c
-- /var/jenkins/scripts/init.sh && <custom-code-here> && /usr/bin/tini -s -- /usr/local/bin/jenkins.sh
- - -
Last modified January 16, 2023 -
-
- - -
-
-
- - - - -
- - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/docs/getting-started/v0.1.x/configure-backup-and-restore/index.html b/docs/docs/getting-started/v0.1.x/configure-backup-and-restore/index.html deleted file mode 100644 index 7b6463c16..000000000 --- a/docs/docs/getting-started/v0.1.x/configure-backup-and-restore/index.html +++ /dev/null @@ -1,1060 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Configure backup and restore | Jenkins Operator - - - - - - - - - - - - - - - - - - - - - - - - - - - - Configure backup and restore | Jenkins Operator - - -
- - - -
-
-
-
-
- - - - - -
- - - - -
- - - - -
-
- - - - - - - - - - - - - - - -
-
- - - -
-

Configure backup and restore

-
Prevent loss of job history
- - -

Backup and restore is done by a container sidecar.

- -

Create PVC

- -

Save to the file named pvc.yaml:

-
apiVersion: v1
-kind: PersistentVolumeClaim
-metadata:
-  name: <pvc_name>
-  namespace: <namespace>
-spec:
-  accessModes:
-  - ReadWriteOnce
-  resources:
-    requests:
-      storage: 500Gi
-

Run the following command:

-
$ kubectl -n <namespace> create -f pvc.yaml
-

Configure Jenkins CR

-
apiVersion: jenkins.io/v1alpha2
-kind: Jenkins
-metadata:
-  name: <cr_name>
-  namespace: <namespace>
-spec:
-  master:
-    securityContext:
-      runAsUser: 1000
-      fsGroup: 1000
-    containers:
-    - name: jenkins-master
-      image: jenkins/jenkins:lts
-    - name: backup # container responsible for the backup and restore
-      env:
-      - name: BACKUP_DIR
-        value: /backup
-      - name: JENKINS_HOME
-        value: /jenkins-home
-      - name: BACKUP_COUNT
-        value: "3" # keep only the 2 most recent backups
-      image: virtuslab/jenkins-operator-backup-pvc:v0.0.8 # look at backup/pvc directory
-      imagePullPolicy: IfNotPresent
-      volumeMounts:
-      - mountPath: /jenkins-home # Jenkins home volume
-        name: jenkins-home
-      - mountPath: /backup # backup volume
-        name: backup
-    volumes:
-    - name: backup # PVC volume where backups will be stored
-      persistentVolumeClaim:
-        claimName: <pvc_name>
-  backup:
-    containerName: backup # container name is responsible for backup
-    action:
-      exec:
-        command:
-        - /home/user/bin/backup.sh # this command is invoked on "backup" container to make backup, for example /home/user/bin/backup.sh <backup_number>, <backup_number> is passed by operator
-    interval: 30 # how often to make a backup, in seconds
-    makeBackupBeforePodDeletion: true # make a backup before pod deletion
-  restore:
-    containerName: backup # container name is responsible to restore the backup
-    action:
-      exec:
-        command:
-        - /home/user/bin/restore.sh # this command is invoked on "backup" container to restore the backup, for example /home/user/bin/restore.sh <backup_number>, <backup_number> is passed by operator
-    #recoveryOnce: <backup_number> # if want to restore specific backup configure this field and then Jenkins will be restarted and desired backup will be restored
- - -
Last modified August 5, 2019 -
-
- - -
-
-
- - - - -
- - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/docs/getting-started/v0.1.x/customization/index.html b/docs/docs/getting-started/v0.1.x/customization/index.html deleted file mode 100644 index c62904092..000000000 --- a/docs/docs/getting-started/v0.1.x/customization/index.html +++ /dev/null @@ -1,1067 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Customization | Jenkins Operator - - - - - - - - - - - - - - - - - - - - - - - - - - - - Customization | Jenkins Operator - - -
- - - -
-
-
-
-
- - - - - -
- - - - -
- - - - -
-
- - - - - - - - - - - - - -
-
- - - -
-

Customization

-
How to customize Jenkins
- - -

Jenkins can be customized by using groovy scripts or the Jenkins Configuration as a Code Plugin. All custom configuration is stored in -the jenkins-operator-user-configuration- ConfigMap, which is automatically created by the Jenkins Operator.

- -

The Jenkins Operator creates a jenkins-operator-user-configuration- secret where the user can store sensitive -information used for custom configuration. If you have an entry in the secret named PASSWORD then you can use it in the -Jenkins Configuration as a Code Plugin as adminAddress: "${PASSWORD}".

-
kubectl get secret jenkins-operator-user-configuration- -o yaml
-
-kind: Secret
-apiVersion: v1
-type: Opaque
-metadata:
-  name: jenkins-operator-user-configuration-
-  namespace: default
-data:
-  SECRET_JENKINS_ADMIN_ADDRESS: YXNkZgo=
kubectl get configmap jenkins-operator-user-configuration- -o yaml
-
-apiVersion: v1
-data:
-  1-configure-theme.groovy: |2
-    import jenkins.*
-    import jenkins.model.*
-    import hudson.*
-    import hudson.model.*
-    import org.jenkinsci.plugins.simpletheme.ThemeElement
-    import org.jenkinsci.plugins.simpletheme.CssTextThemeElement
-    import org.jenkinsci.plugins.simpletheme.CssUrlThemeElement
-
-    Jenkins jenkins = Jenkins.getInstance()
-
-    def decorator = Jenkins.instance.getDescriptorByType(org.codefirst.SimpleThemeDecorator.class)
-
-    List configElements = new ArrayList<>();
-    configElements.add(new CssTextThemeElement("DEFAULT"));
-    configElements.add(new CssUrlThemeElement("https://cdn.rawgit.com/afonsof/jenkins-material-theme/gh-pages/dist/material-light-green.css"));
-    decorator.setElements(configElements);
-    decorator.save();
-
-    jenkins.save()
-  1-system-message.yaml: |2
-    jenkins:
-      systemMessage: "Configuration as Code integration works!!!"
-      adminAddress: "${SECRET_JENKINS_ADMIN_ADDRESS}"
-kind: ConfigMap
-metadata:
-  name: jenkins-operator-user-configuration-
-  namespace: default
-

When the jenkins-operator-user-configuration- ConfigMap is updated, Jenkins automatically -runs the jenkins-operator-user-configuration Jenkins Job which executes all scripts, and then -runs the jenkins-operator-user-configuration-casc Jenkins Job which applies the Configuration as Code configuration.

- -

Install Plugins

- -

Edit CR under spec.master.plugins:

-
apiVersion: jenkins.io/v1alpha2
-kind: Jenkins
-metadata:
-  name: example
-spec:
-  master:
-   plugins:
-   - name: simple-theme-plugin
-     version: 0.5.1
-

Under spec.master.basePlugins you can find plugins for a valid Jenkins Operator:

-
apiVersion: jenkins.io/v1alpha2
-kind: Jenkins
-metadata:
-  name: example
-spec:
-  master:
-    basePlugins:
-    - name: kubernetes
-      version: 1.18.3
-    - name: workflow-job
-      version: "2.34"
-    - name: workflow-aggregator
-      version: "2.6"
-    - name: git
-      version: 3.12.0
-    - name: job-dsl
-      version: "1.76"
-    - name: configuration-as-code
-      version: "1.31"
-    - name: kubernetes-credentials-provider
-      version: 0.12.1
-

You can change their versions.

- -

The Jenkins Operator will then automatically install those plugins after the Jenkins master pod restart.

- - - -
Last modified August 5, 2019 -
-
- - -
-
-
- - - - -
- - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/docs/getting-started/v0.1.x/deploy-jenkins/index.html b/docs/docs/getting-started/v0.1.x/deploy-jenkins/index.html deleted file mode 100644 index b241a33c1..000000000 --- a/docs/docs/getting-started/v0.1.x/deploy-jenkins/index.html +++ /dev/null @@ -1,1039 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Deploy Jenkins | Jenkins Operator - - - - - - - - - - - - - - - - - - - - - - - - - - - - Deploy Jenkins | Jenkins Operator - - -
- - - -
-
-
-
-
- - - - - -
- - - - -
- - - - -
-
- - - - - - - - - - - - - -
-
- - - -
-

Deploy Jenkins

-
Deploy production ready Jenkins Operator manifest
- - -

Deploy Jenkins

- -

Once the Jenkins Operator is up and running let’s deploy an actual Jenkins instance. -Create a manifest ie. jenkins_instance.yaml with following data and save it on drive.

-
apiVersion: jenkins.io/v1alpha2
-kind: Jenkins
-metadata:
-  name: example
-spec:
-  master:
-    containers:
-    - name: jenkins-master
-      image: jenkins/jenkins:lts
-      imagePullPolicy: Always
-      livenessProbe:
-        failureThreshold: 12
-        httpGet:
-          path: /login
-          port: http
-          scheme: HTTP
-        initialDelaySeconds: 80
-        periodSeconds: 10
-        successThreshold: 1
-        timeoutSeconds: 5
-      readinessProbe:
-        failureThreshold: 3
-        httpGet:
-          path: /login
-          port: http
-          scheme: HTTP
-        initialDelaySeconds: 30
-        periodSeconds: 10
-        successThreshold: 1
-        timeoutSeconds: 1
-      resources:
-        limits:
-          cpu: 1500m
-          memory: 3Gi
-        requests:
-          cpu: "1"
-          memory: 500Mi
-  seedJobs:
-  - id: jenkins-operator
-    targets: "cicd/jobs/*.jenkins"
-    description: "Jenkins Operator repository"
-    repositoryBranch: master
-    repositoryUrl: https://github.com/jenkinsci/kubernetes-operator.git
-

Deploy a Jenkins to K8s:

-
kubectl create -f jenkins_instance.yaml
-

Watch the Jenkins instance being created:

-
kubectl get pods -w
-

Get the Jenkins credentials:

-
kubectl get secret jenkins-operator-credentials-<cr_name> -o 'jsonpath={.data.user}' | base64 -d
-kubectl get secret jenkins-operator-credentials-<cr_name> -o 'jsonpath={.data.password}' | base64 -d
-

Connect to the Jenkins Operator (minikube):

-
minikube service jenkins-operator-http-<cr_name> --url
-

Connect to the Jenkins instance (actual Kubernetes cluster):

-
kubectl port-forward jenkins-<cr_name> 8080:8080
-

Then open browser with address http://localhost:8080. -jenkins

- - - -
Last modified August 5, 2019 -
-
- - -
-
-
- - - - -
- - - - - - - - - - - - - - diff --git a/docs/docs/getting-started/v0.1.x/diagnostics/index.html b/docs/docs/getting-started/v0.1.x/diagnostics/index.html deleted file mode 100644 index b71542e34..000000000 --- a/docs/docs/getting-started/v0.1.x/diagnostics/index.html +++ /dev/null @@ -1,991 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Diagnostics | Jenkins Operator - - - - - - - - - - - - - - - - - - - - - - - - - - - - Diagnostics | Jenkins Operator - - -
- - - -
-
-
-
-
- - - - - -
- - - - -
- - - - -
-
- - - - - - - - - - - - - -
-
- - - -
-

Diagnostics

-
How to deal with jenkins-operator problems
- - -

Turn on debug in Jenkins Operator deployment:

-
sed -i 's|\(args:\).*|\1\ ["--debug"\]|' deploy/operator.yaml
-kubectl apply -f deploy/operator.yaml
-

Watch Kubernetes events:

-
kubectl get events --sort-by='{.lastTimestamp}'
-

Verify Jenkins master logs:

-
kubectl logs -f jenkins-<cr_name>
-

Verify jenkins-operator logs:

-
kubectl logs deployment/jenkins-operator
-

Troubleshooting

- -

Delete the Jenkins master pod and wait for the new one to come up:

-
kubectl delete pod jenkins-<cr_name>
- - -
Last modified August 5, 2019 -
-
- - -
-
-
- - - - -
- - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/docs/getting-started/v0.1.x/index.html b/docs/docs/getting-started/v0.1.x/index.html deleted file mode 100644 index cd30e0157..000000000 --- a/docs/docs/getting-started/v0.1.x/index.html +++ /dev/null @@ -1,1218 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - -v0.1.x | Jenkins Operator - - - - - - - - - - - - - - - - - - - - v0.1.x | Jenkins Operator - - -
- - - -
-
-
-
-
- - - - - -
- - - - -
- - - - -
-
- - - - - - - - - - - - - -
-
- - - -
-

v0.1.x

-
How to work with Jenkins Operator 0.1.x version. We recommend migrating to a newer version.
- - - - -
-

This document describes a getting started guide for Jenkins Operator v0.1.x and also additional configuration.

- -
- - -

First Steps

- -

Prepare your Kubernetes cluster and set up your kubectl access.

- -

Once you have running Kubernetes cluster you can focus on installing Jenkins Operator according to the Installation guide.

- -
- - - - -
- - - - - - - - - - - - - - - - - - - - -
-
- Deploy Jenkins -
-

Deploy production ready Jenkins Operator manifest -

-
- - - - - -
-
- Configuration -
-

How to configure Jenkins with Operator -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- Customization -
-

How to customize Jenkins -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- AKS -
-

Additional configuration for Azure Kubernetes Service -

-
- - - - - -
-
- Configure backup and restore -
-

Prevent loss of job history -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- Diagnostics -
-

How to deal with jenkins-operator problems -

-
- - - - - - - -
-
- Scheme -
-

API Schema definitions for Jenkins CR -

-
- - - -
-
- Migration guide from v1alpha1 to v1alpha2 -
-

How to migrate to new CRD manifest -

-
- - - -
- - - -
Last modified August 19, 2021 -
-
- -
-
-
- - - - -
- - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/docs/getting-started/v0.1.x/index.xml b/docs/docs/getting-started/v0.1.x/index.xml deleted file mode 100644 index 4f4ed5285..000000000 --- a/docs/docs/getting-started/v0.1.x/index.xml +++ /dev/null @@ -1,2322 +0,0 @@ - - - Jenkins Operator – v0.1.x - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.1.x/ - Recent Hugo news from gohugo.io - Hugo -- gohugo.io - Thu, 19 Aug 2021 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/img/hugo.png - GoHugo.io - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.1.x/ - - - - - - - - - - - - Docs: Deploy Jenkins - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.1.x/deploy-jenkins/ - Mon, 05 Aug 2019 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.1.x/deploy-jenkins/ - - - - - -<h2 id="deploy-jenkins">Deploy Jenkins</h2> - -<p>Once the <strong>Jenkins Operator</strong> is up and running let&rsquo;s deploy an actual Jenkins instance. -Create a manifest ie. <strong>jenkins_instance.yaml</strong> with following data and save it on drive.</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">apiVersion: jenkins.io/v1alpha2 -kind: Jenkins -metadata: - name: example -spec: - master: - containers: - - name: jenkins-master - image: jenkins/jenkins:lts - imagePullPolicy: Always - livenessProbe: - failureThreshold: <span style="color:#0000cf;font-weight:bold">12</span> - httpGet: - path: /login - port: http - scheme: HTTP - initialDelaySeconds: <span style="color:#0000cf;font-weight:bold">80</span> - periodSeconds: <span style="color:#0000cf;font-weight:bold">10</span> - successThreshold: <span style="color:#0000cf;font-weight:bold">1</span> - timeoutSeconds: <span style="color:#0000cf;font-weight:bold">5</span> - readinessProbe: - failureThreshold: <span style="color:#0000cf;font-weight:bold">3</span> - httpGet: - path: /login - port: http - scheme: HTTP - initialDelaySeconds: <span style="color:#0000cf;font-weight:bold">30</span> - periodSeconds: <span style="color:#0000cf;font-weight:bold">10</span> - successThreshold: <span style="color:#0000cf;font-weight:bold">1</span> - timeoutSeconds: <span style="color:#0000cf;font-weight:bold">1</span> - resources: - limits: - cpu: 1500m - memory: 3Gi - requests: - cpu: <span style="color:#4e9a06">&#34;1&#34;</span> - memory: 500Mi - seedJobs: - - id: jenkins-operator - targets: <span style="color:#4e9a06">&#34;cicd/jobs/*.jenkins&#34;</span> - description: <span style="color:#4e9a06">&#34;Jenkins Operator repository&#34;</span> - repositoryBranch: master - repositoryUrl: https://github.com/jenkinsci/kubernetes-operator.git</code></pre></div> -<p>Deploy a Jenkins to K8s:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl create -f jenkins_instance.yaml</code></pre></div> -<p>Watch the Jenkins instance being created:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl get pods -w</code></pre></div> -<p>Get the Jenkins credentials:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl get secret jenkins-operator-credentials-&lt;cr_name&gt; -o <span style="color:#4e9a06">&#39;jsonpath={.data.user}&#39;</span> <span style="color:#000;font-weight:bold">|</span> base64 -d -kubectl get secret jenkins-operator-credentials-&lt;cr_name&gt; -o <span style="color:#4e9a06">&#39;jsonpath={.data.password}&#39;</span> <span style="color:#000;font-weight:bold">|</span> base64 -d</code></pre></div> -<p>Connect to the Jenkins Operator (minikube):</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">minikube service jenkins-operator-http-&lt;cr_name&gt; --url</code></pre></div> -<p>Connect to the Jenkins instance (actual Kubernetes cluster):</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl port-forward jenkins-&lt;cr_name&gt; 8080:8080</code></pre></div> -<p>Then open browser with address <code>http://localhost:8080</code>. -<img src="https://jenkinsci.github.io/kubernetes-operator/kubernetes-operator/img/jenkins.png" alt="jenkins" /></p> - - - - - - Docs: Configuration - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.1.x/configuration/ - Mon, 16 Jan 2023 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.1.x/configuration/ - - - - - -<p>Jenkins operator uses <a href="https://github.com/jenkinsci/job-dsl-plugin">job-dsl</a> and <a href="https://jenkinsci.github.io/kubernetes-credentials-provider-plugin/">kubernetes-credentials-provider</a> plugins for configuring jobs -and deploy keys.</p> - -<h2 id="prepare-job-definitions-and-pipelines">Prepare job definitions and pipelines</h2> - -<p>First you have to prepare pipelines and job definition in your GitHub repository using the following structure:</p> -<pre><code>cicd/ -├── jobs -│   └── build.jenkins -└── pipelines - └── build.jenkins</code></pre> -<p><strong>cicd/jobs/build.jenkins</strong> it&rsquo;s a job definition:</p> -<pre><code>#!/usr/bin/env groovy - -pipelineJob('build-jenkins-operator') { - displayName('Build jenkins-operator') - - definition { - cpsScm { - scm { - git { - remote { - url('https://github.com/jenkinsci/kubernetes-operator.git') - credentials('jenkins-operator') - } - branches('*/master') - } - } - scriptPath('cicd/pipelines/build.jenkins') - } - } -}</code></pre> -<p><strong>cicd/pipelines/build.jenkins</strong> is an actual Jenkins pipeline:</p> -<pre><code>#!/usr/bin/env groovy - -def label = "build-jenkins-operator-${UUID.randomUUID().toString()}" -def home = "/home/jenkins" -def workspace = "${home}/workspace/build-jenkins-operator" -def workdir = "${workspace}/src/github.com/jenkinsci/kubernetes-operator/" - -podTemplate(label: label, - containers: [ - containerTemplate(name: 'jnlp', image: 'jenkins/inbound-agent:alpine'), - containerTemplate(name: 'go', image: 'golang:1-alpine', command: 'cat', ttyEnabled: true), - ], - envVars: [ - envVar(key: 'GOPATH', value: workspace), - ], - ) { - - node(label) { - dir(workdir) { - stage('Init') { - timeout(time: 3, unit: 'MINUTES') { - checkout scm - } - container('go') { - sh 'apk --no-cache --update add make git gcc libc-dev' - } - } - - stage('Dep') { - container('go') { - sh 'make dep' - } - } - - stage('Test') { - container('go') { - sh 'make test' - } - } - - stage('Build') { - container('go') { - sh 'make build' - } - } - } - } -}</code></pre> -<h2 id="configure-seed-jobs">Configure Seed Jobs</h2> - -<p>Jenkins Seed Jobs are configured using <code>Jenkins.spec.seedJobs</code> section from your custom resource manifest:</p> -<pre><code>apiVersion: jenkins.io/v1alpha2 -kind: Jenkins -metadata: - name: example -spec: - seedJobs: - - id: jenkins-operator - targets: "cicd/jobs/*.jenkins" - description: "Jenkins Operator repository" - repositoryBranch: master - repositoryUrl: https://github.com/jenkinsci/kubernetes-operator.git</code></pre> -<p><strong>Jenkins Operator</strong> will automatically discover and configure all the seed jobs.</p> - -<p>You can verify if deploy keys were successfully configured in the Jenkins <strong>Credentials</strong> tab.</p> - -<p><img src="https://jenkinsci.github.io/kubernetes-operator/kubernetes-operator/img/jenkins-credentials.png" alt="jenkins" /></p> - -<p>You can verify if your pipelines were successfully configured in the Jenkins Seed Job console output.</p> - -<p><img src="https://jenkinsci.github.io/kubernetes-operator/kubernetes-operator/img/jenkins-seed.png" alt="jenkins" /></p> - -<p>If your GitHub repository is <strong>private</strong> you have to configure SSH or username/password authentication.</p> - -<h3 id="ssh-authentication">SSH authentication</h3> - -<h4 id="generate-ssh-keys">Generate SSH Keys</h4> - -<p>There are two methods of SSH private key generation:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">$ openssl genrsa -out &lt;filename&gt; <span style="color:#0000cf;font-weight:bold">2048</span></code></pre></div> -<p>or</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">$ ssh-keygen -t rsa -b <span style="color:#0000cf;font-weight:bold">2048</span> -$ ssh-keygen -p -f &lt;filename&gt; -m pem</code></pre></div> -<p>Then copy content from generated file.</p> - -<h4 id="public-key">Public key</h4> - -<p>If you want to upload your public key to your Git server you need to extract it.</p> - -<p>If key was generated by <code>openssl</code> then you need to type this to extract public key:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">$ openssl rsa -in &lt;filename&gt; -pubout &gt; &lt;filename&gt;.pub</code></pre></div> -<p>If key was generated by <code>ssh-keygen</code> the public key content is located in <filename>.pub and there is no need to extract public key</p> - -<h4 id="configure-ssh-authentication">Configure SSH authentication</h4> - -<p>Configure a seed job like this:</p> -<pre><code>apiVersion: jenkins.io/v1alpha2 -kind: Jenkins -metadata: - name: example -spec: - seedJobs: - - id: jenkins-operator-ssh - credentialType: basicSSHUserPrivateKey - credentialID: k8s-ssh - targets: "cicd/jobs/*.jenkins" - description: "Jenkins Operator repository" - repositoryBranch: master - repositoryUrl: git@github.com:jenkinsci/kubernetes-operator.git</code></pre> -<p>and create a Kubernetes Secret (name of secret should be the same from <code>credentialID</code> field):</p> -<pre><code>apiVersion: v1 -kind: Secret -metadata: - name: k8s-ssh -stringData: - privateKey: | - -----BEGIN RSA PRIVATE KEY----- - MIIJKAIBAAKCAgEAxxDpleJjMCN5nusfW/AtBAZhx8UVVlhhhIKXvQ+dFODQIdzO - oDXybs1zVHWOj31zqbbJnsfsVZ9Uf3p9k6xpJ3WFY9b85WasqTDN1xmSd6swD4N8 - ... - username: github_user_name</code></pre> -<h3 id="username-password-authentication">Username &amp; password authentication</h3> - -<p>Configure a seed job like this:</p> -<pre><code>apiVersion: jenkins.io/v1alpha2 -kind: Jenkins -metadata: - name: example -spec: - seedJobs: - - id: jenkins-operator-user-pass - credentialType: usernamePassword - credentialID: k8s-user-pass - targets: "cicd/jobs/*.jenkins" - description: "Jenkins Operator repository" - repositoryBranch: master - repositoryUrl: https://github.com/jenkinsci/kubernetes-operator.git</code></pre> -<p>and create a Kubernetes Secret (name of secret should be the same from <code>credentialID</code> field):</p> -<pre><code>apiVersion: v1 -kind: Secret -metadata: - name: k8s-user-pass -stringData: - username: github_user_name - password: password_or_token</code></pre> -<h2 id="http-proxy-for-downloading-plugins">HTTP Proxy for downloading plugins</h2> - -<p>To use forwarding proxy with an operator to download plugins you need to add the following environment variable to Jenkins CR, for e.g.:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>master<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>containers<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-master<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>env<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>CURL_OPTIONS<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-L<span style="color:#f8f8f8;text-decoration:underline"> </span>-x<span style="color:#f8f8f8;text-decoration:underline"> </span>&lt;proxy_url&gt;</code></pre></div> -<p>In <code>CURL_OPTIONS</code> var you can set additional arguments to curl command.</p> - -<h2 id="jenkins-login-credentials">Jenkins login credentials</h2> - -<p>The operator automatically generates a Jenkins username and password and stores it in Kubernetes secret named -<code>jenkins-operator-credentials-&lt;cr_name&gt;</code> in the namespace where Jenkins CR has been deployed.</p> - -<p>If you want change it you can override the secret:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>v1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Secret<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-credentials-&lt;cr-name<span style="color:#8f5902;font-style:italic">&gt; -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">namespace: &lt;namespace&gt;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>data<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>user<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>&lt;base64-encoded-new-username<span style="color:#8f5902;font-style:italic">&gt; -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">password: &lt;base64-encoded-new-password&gt;</span></code></pre></div> -<p>If needed <strong>Jenkins Operator</strong> will restart the Jenkins master pod and then you can login with the new username and password -credentials.</p> - -<h2 id="override-default-jenkins-container-command">Override default Jenkins container command</h2> - -<p>The default command for the Jenkins master container <code>jenkins/jenkins:lts</code> looks like:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">command<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>bash<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>-c<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>/var/jenkins/scripts/init.sh<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/usr/bin/tini<span style="color:#f8f8f8;text-decoration:underline"> </span>-s<span style="color:#f8f8f8;text-decoration:underline"> </span>--<span style="color:#f8f8f8;text-decoration:underline"> </span>/usr/local/bin/jenkins.sh</code></pre></div> -<p>The script<code>/var/jenkins/scripts/init.sh</code> is provided by the operator and configures init.groovy.d (creates the Jenkins user) -and installs plugins. -The <code>/usr/bin/tini -s -- /usr/local/bin/jenkins.sh</code> command runs the Jenkins master main process.</p> - -<p>You can overwrite it in the following pattern:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">command<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>bash<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>-c<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>/var/jenkins/scripts/init.sh<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>&lt;custom-code-here&gt;<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/usr/bin/tini<span style="color:#f8f8f8;text-decoration:underline"> </span>-s<span style="color:#f8f8f8;text-decoration:underline"> </span>--<span style="color:#f8f8f8;text-decoration:underline"> </span>/usr/local/bin/jenkins.sh</code></pre></div> - - - - - Docs: Customization - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.1.x/customization/ - Mon, 05 Aug 2019 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.1.x/customization/ - - - - - -<p>Jenkins can be customized by using groovy scripts or the Jenkins Configuration as a Code Plugin. All custom configuration is stored in -the <strong>jenkins-operator-user-configuration-<cr_name></strong> ConfigMap, which is automatically created by the <strong>Jenkins Operator</strong>.</p> - -<p>The <strong>Jenkins Operator</strong> creates a <strong>jenkins-operator-user-configuration-<cr_name></strong> secret where the user can store sensitive -information used for custom configuration. If you have an entry in the secret named <code>PASSWORD</code> then you can use it in the -Jenkins Configuration as a Code Plugin as <code>adminAddress: &quot;${PASSWORD}&quot;</code>.</p> -<pre><code>kubectl get secret jenkins-operator-user-configuration-<cr_name> -o yaml - -kind: Secret -apiVersion: v1 -type: Opaque -metadata: - name: jenkins-operator-user-configuration-<cr_name> - namespace: default -data: - SECRET_JENKINS_ADMIN_ADDRESS: YXNkZgo=</code></pre><pre><code>kubectl get configmap jenkins-operator-user-configuration-<cr_name> -o yaml - -apiVersion: v1 -data: - 1-configure-theme.groovy: |2 - import jenkins.* - import jenkins.model.* - import hudson.* - import hudson.model.* - import org.jenkinsci.plugins.simpletheme.ThemeElement - import org.jenkinsci.plugins.simpletheme.CssTextThemeElement - import org.jenkinsci.plugins.simpletheme.CssUrlThemeElement - - Jenkins jenkins = Jenkins.getInstance() - - def decorator = Jenkins.instance.getDescriptorByType(org.codefirst.SimpleThemeDecorator.class) - - List<ThemeElement> configElements = new ArrayList<>(); - configElements.add(new CssTextThemeElement("DEFAULT")); - configElements.add(new CssUrlThemeElement("https://cdn.rawgit.com/afonsof/jenkins-material-theme/gh-pages/dist/material-light-green.css")); - decorator.setElements(configElements); - decorator.save(); - - jenkins.save() - 1-system-message.yaml: |2 - jenkins: - systemMessage: "Configuration as Code integration works!!!" - adminAddress: "${SECRET_JENKINS_ADMIN_ADDRESS}" -kind: ConfigMap -metadata: - name: jenkins-operator-user-configuration-<cr_name> - namespace: default</code></pre> -<p>When the <strong>jenkins-operator-user-configuration-<cr_name></strong> ConfigMap is updated, Jenkins automatically -runs the <strong>jenkins-operator-user-configuration</strong> Jenkins Job which executes all scripts, and then -runs the <strong>jenkins-operator-user-configuration-casc</strong> Jenkins Job which applies the Configuration as Code configuration.</p> - -<h2 id="install-plugins">Install Plugins</h2> - -<p>Edit CR under <code>spec.master.plugins</code>:</p> -<pre><code>apiVersion: jenkins.io/v1alpha2 -kind: Jenkins -metadata: - name: example -spec: - master: - plugins: - - name: simple-theme-plugin - version: 0.5.1</code></pre> -<p>Under <code>spec.master.basePlugins</code> you can find plugins for a valid <strong>Jenkins Operator</strong>:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.io/v1alpha2<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>example<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>master<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>basePlugins<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>kubernetes<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1.18</span><span style="color:#0000cf;font-weight:bold">.3</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>workflow-job<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;2.34&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>workflow-aggregator<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;2.6&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>git<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">3.12</span><span style="color:#0000cf;font-weight:bold">.0</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>job-dsl<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;1.76&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configuration-as-code<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;1.31&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>kubernetes-credentials-provider<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">0.12</span><span style="color:#0000cf;font-weight:bold">.1</span></code></pre></div> -<p>You can change their versions.</p> - -<p>The <strong>Jenkins Operator</strong> will then automatically install those plugins after the Jenkins master pod restart.</p> - - - - - - Docs: AKS - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.1.x/aks/ - Mon, 05 Aug 2019 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.1.x/aks/ - - - - <p>Azure AKS managed Kubernetes service adds to every pod the following environment variables:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>KUBERNETES_PORT_443_TCP_ADDR<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>KUBERNETES_PORT<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>tcp<span style="color:#000;font-weight:bold">:</span>//<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>KUBERNETES_PORT_443_TCP<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>tcp<span style="color:#000;font-weight:bold">:</span>//<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>KUBERNETES_SERVICE_HOST<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span></code></pre></div> -<p>The operator is aware of it and omits these environment variables when checking if a Jenkins pod environment has been changed. It prevents -the restart of a Jenkins pod over and over again.</p> - - - - - - Docs: Configure backup and restore - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.1.x/configure-backup-and-restore/ - Mon, 05 Aug 2019 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.1.x/configure-backup-and-restore/ - - - - - -<p>Backup and restore is done by a container sidecar.</p> - -<h4 id="create-pvc">Create PVC</h4> - -<p>Save to the file named pvc.yaml:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>v1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>PersistentVolumeClaim<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>&lt;pvc_name<span style="color:#8f5902;font-style:italic">&gt; -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">namespace: &lt;namespace&gt;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>accessModes<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>ReadWriteOnce<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>requests<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>storage<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>500Gi</code></pre></div> -<p>Run the following command:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">$ kubectl -n &lt;namespace&gt; create -f pvc.yaml</code></pre></div> -<h4 id="configure-jenkins-cr">Configure Jenkins CR</h4> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.io/v1alpha2<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>&lt;cr_name<span style="color:#8f5902;font-style:italic">&gt; -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">namespace: &lt;namespace&gt;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>master<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>securityContext<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>runAsUser<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1000</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>fsGroup<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1000</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>containers<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-master<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>image<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins/jenkins<span style="color:#000;font-weight:bold">:</span>lts<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># container responsible for the backup and restore</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>env<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>BACKUP_DIR<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/backup<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>JENKINS_HOME<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/jenkins-home<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>BACKUP_COUNT<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;3&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># keep only the 2 most recent backups</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>image<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>virtuslab/jenkins-operator-backup-pvc<span style="color:#000;font-weight:bold">:</span>v0<span style="color:#0000cf;font-weight:bold">.0</span><span style="color:#0000cf;font-weight:bold">.8</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># look at backup/pvc directory</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>imagePullPolicy<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>IfNotPresent<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>volumeMounts<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>mountPath<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/jenkins-home<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># Jenkins home volume</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-home<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>mountPath<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># backup volume</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>volumes<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># PVC volume where backups will be stored</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>persistentVolumeClaim<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>claimName<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>&lt;pvc_name<span style="color:#8f5902;font-style:italic">&gt; -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">backup:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>containerName<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># container name is responsible for backup</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>action<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>command<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>/home/user/bin/backup.sh<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># this command is invoked on &#34;backup&#34; container to make backup, for example /home/user/bin/backup.sh &lt;backup_number&gt;, &lt;backup_number&gt; is passed by operator</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>interval<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">30</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># how often to make a backup, in seconds</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>makeBackupBeforePodDeletion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">true</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># make a backup before pod deletion</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>restore<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>containerName<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># container name is responsible to restore the backup</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>action<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>command<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>/home/user/bin/restore.sh<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># this command is invoked on &#34;backup&#34; container to restore the backup, for example /home/user/bin/restore.sh &lt;backup_number&gt;, &lt;backup_number&gt; is passed by operator</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">#recoveryOnce: &lt;backup_number&gt; # if want to restore specific backup configure this field and then Jenkins will be restarted and desired backup will be restored</span></code></pre></div> - - - - - Docs: Diagnostics - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.1.x/diagnostics/ - Mon, 05 Aug 2019 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.1.x/diagnostics/ - - - - - -<p>Turn on debug in <strong>Jenkins Operator</strong> deployment:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">sed -i <span style="color:#4e9a06">&#39;s|\(args:\).*|\1\ [&#34;--debug&#34;\]|&#39;</span> deploy/operator.yaml -kubectl apply -f deploy/operator.yaml</code></pre></div> -<p>Watch Kubernetes events:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl get events --sort-by<span style="color:#ce5c00;font-weight:bold">=</span><span style="color:#4e9a06">&#39;{.lastTimestamp}&#39;</span></code></pre></div> -<p>Verify Jenkins master logs:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl logs -f jenkins-&lt;cr_name&gt;</code></pre></div> -<p>Verify jenkins-operator logs:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl logs deployment/jenkins-operator</code></pre></div> -<h2 id="troubleshooting">Troubleshooting</h2> - -<p>Delete the Jenkins master pod and wait for the new one to come up:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl delete pod jenkins-&lt;cr_name&gt;</code></pre></div> - - - - - Docs: Scheme - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.1.x/scheme/ - Mon, 05 Aug 2019 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.1.x/scheme/ - - - - - -<div class="pageinfo pageinfo-primary"> -<p>This document contains API scheme for <code>jenkins-operator</code> manifest</p> - -</div> - - -<p>Packages:</p> -<ul> -<li> -<a href="#jenkins.io">jenkins.io</a> -</li> -</ul> -<h2 id="jenkins.io">jenkins.io</h2> -<p> -<p>Package v1alpha2 contains the API Schema definitions for the jenkins.io v1alpha2 API group</p> -</p> -Resource Types: -<ul><li> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.Jenkins">Jenkins</a> -</li></ul> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Jenkins">Jenkins -</h3> -<p> -<p>Jenkins is the Schema for the jenkins API</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>apiVersion</code></br> -string</td> -<td> -<code> -jenkins.io/v1alpha2 -</code> -</td> -</tr> -<tr> -<td> -<code>kind</code></br> -string -</td> -<td><code>Jenkins</code></td> -</tr> -<tr> -<td> -<code>metadata</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.12/#objectmeta-v1-meta"> -Kubernetes meta/v1.ObjectMeta -</a> -</em> -</td> -<td> -Refer to the Kubernetes API documentation for the fields of the -<code>metadata</code> field. -</td> -</tr> -<tr> -<td> -<code>spec</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsSpec"> -JenkinsSpec -</a> -</em> -</td> -<td> -<p>Spec defines the desired state of the Jenkins</p> -<br/> -<br/> -<table> -<tr> -<td> -<code>master</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsMaster"> -JenkinsMaster -</a> -</em> -</td> -<td> -<p>Master represents Jenkins master pod properties and Jenkins plugins. -Every single change here requires a pod restart.</p> -</td> -</tr> -<tr> -<td> -<code>seedJobs</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.SeedJob"> -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.SeedJob -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>SeedJobs defines a list of Jenkins Seed Job configurations -More info: <a href="https://github.com/jenkinsci/kubernetes-operator/blob/master/docs/getting-started.md#configure-seed-jobs-and-pipelines">https://github.com/jenkinsci/kubernetes-operator/blob/master/docs/getting-started.md#configure-seed-jobs-and-pipelines</a></p> -</td> -</tr> -<tr> -<td> -<code>service</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Service"> -Service -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Service is the Kubernetes service of the Jenkins master HTTP pod -Defaults to : -port: 8080 -type: ClusterIP</p> -</td> -</tr> -<tr> -<td> -<code>slaveService</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Service"> -Service -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Service is the Kubernetes service of the Jenkins slave pods -Defaults to : -port: 50000 -type: ClusterIP</p> -</td> -</tr> -<tr> -<td> -<code>backup</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Backup"> -Backup -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Backup defines the configuration of a Jenkins backup -More info: <a href="https://github.com/jenkinsci/kubernetes-operator/blob/master/docs/getting-started.md#configure-backup-and-restore">https://github.com/jenkinsci/kubernetes-operator/blob/master/docs/getting-started.md#configure-backup-and-restore</a></p> -</td> -</tr> -<tr> -<td> -<code>restore</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Restore"> -Restore -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Backup defines the configuration of a Jenkins backup restore -More info: <a href="https://github.com/jenkinsci/kubernetes-operator/blob/master/docs/getting-started.md#configure-backup-and-restore">https://github.com/jenkinsci/kubernetes-operator/blob/master/docs/getting-started.md#configure-backup-and-restore</a></p> -</td> -</tr> -</table> -</td> -</tr> -<tr> -<td> -<code>status</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsStatus"> -JenkinsStatus -</a> -</em> -</td> -<td> -<p>Status defines the observed state of Jenkins</p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Backup">Backup -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.JenkinsSpec">JenkinsSpec</a>) -</p> -<p> -<p>Backup defines the configuration of Jenkins backup</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>containerName</code></br> -<em> -string -</em> -</td> -<td> -<p>ContainerName is the container name responsible for backup operation</p> -</td> -</tr> -<tr> -<td> -<code>action</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Handler"> -Handler -</a> -</em> -</td> -<td> -<p>Action defines the action which performs the backup in the backup container sidecar</p> -</td> -</tr> -<tr> -<td> -<code>interval</code></br> -<em> -uint64 -</em> -</td> -<td> -<p>Interval tells you how often the backup is made in seconds -Defaults to 30.</p> -</td> -</tr> -<tr> -<td> -<code>makeBackupBeforePodDeletion</code></br> -<em> -bool -</em> -</td> -<td> -<p>MakeBackupBeforePodDeletion tells the operator to make a backup before Jenkins master pod deletion</p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Build">Build -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.JenkinsStatus">JenkinsStatus</a>) -</p> -<p> -<p>Build defines the Jenkins Build status with corresponding metadata</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>jobName</code></br> -<em> -string -</em> -</td> -<td> -<p>JobName is the Jenkins job name</p> -</td> -</tr> -<tr> -<td> -<code>hash</code></br> -<em> -string -</em> -</td> -<td> -<p>Hash is the unique data identifier used in build</p> -</td> -</tr> -<tr> -<td> -<code>number</code></br> -<em> -int64 -</em> -</td> -<td> -<p>Number is the Jenkins build number</p> -</td> -</tr> -<tr> -<td> -<code>status</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.BuildStatus"> -BuildStatus -</a> -</em> -</td> -<td> -<p>Status is the status of a Jenkins build</p> -</td> -</tr> -<tr> -<td> -<code>retries</code></br> -<em> -int -</em> -</td> -<td> -<p>Retires is the amount of times a Jenkins job build retries</p> -</td> -</tr> -<tr> -<td> -<code>createTime</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.12/#time-v1-meta"> -Kubernetes meta/v1.Time -</a> -</em> -</td> -<td> -<p>CreateTime is the time when the first build has been created</p> -</td> -</tr> -<tr> -<td> -<code>lastUpdateTime</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.12/#time-v1-meta"> -Kubernetes meta/v1.Time -</a> -</em> -</td> -<td> -<p>LastUpdateTime is the last update status time</p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.BuildStatus">BuildStatus -(<code>string</code> alias)</p></h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.Build">Build</a>) -</p> -<p> -<p>BuildStatus defines the type of Jenkins build job status</p> -</p> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Container">Container -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.JenkinsMaster">JenkinsMaster</a>) -</p> -<p> -<p>Container defines the Kubernetes container attributes</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>name</code></br> -<em> -string -</em> -</td> -<td> -<p>Name of the container specified as a DNS_LABEL. -Each container in a pod must have a unique name (DNS_LABEL).</p> -</td> -</tr> -<tr> -<td> -<code>image</code></br> -<em> -string -</em> -</td> -<td> -<p>Docker image name. -More info: <a href="https://kubernetes.io/docs/concepts/containers/images">https://kubernetes.io/docs/concepts/containers/images</a></p> -</td> -</tr> -<tr> -<td> -<code>imagePullPolicy</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.12/#pullpolicy-v1-core"> -Kubernetes core/v1.PullPolicy -</a> -</em> -</td> -<td> -<p>Image pull policy. -One of Always, Never, IfNotPresent. -Defaults to Always.</p> -</td> -</tr> -<tr> -<td> -<code>resources</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.12/#resourcerequirements-v1-core"> -Kubernetes core/v1.ResourceRequirements -</a> -</em> -</td> -<td> -<p>Compute Resources required by this container. -More info: <a href="https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/">https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/</a></p> -</td> -</tr> -<tr> -<td> -<code>command</code></br> -<em> -[]string -</em> -</td> -<td> -<em>(Optional)</em> -<p>Entrypoint array. Not executed within a shell. -The docker image&rsquo;s ENTRYPOINT is used if this is not provided. -Variable references $(VAR_NAME) are expanded using the container&rsquo;s environment. If a variable -cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax -can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, -regardless of whether the variable exists or not. -More info: <a href="https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell">https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell</a></p> -</td> -</tr> -<tr> -<td> -<code>args</code></br> -<em> -[]string -</em> -</td> -<td> -<em>(Optional)</em> -<p>Arguments to the entrypoint. -The docker image&rsquo;s CMD is used if this is not provided. -Variable references $(VAR_NAME) are expanded using the container&rsquo;s environment. If a variable -cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax -can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, -regardless of whether the variable exists or not. -More info: <a href="https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell">https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell</a></p> -</td> -</tr> -<tr> -<td> -<code>workingDir</code></br> -<em> -string -</em> -</td> -<td> -<em>(Optional)</em> -<p>Container&rsquo;s working directory. -If not specified, the container runtime&rsquo;s default will be used, which -might be configured in the container image.</p> -</td> -</tr> -<tr> -<td> -<code>ports</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.12/#containerport-v1-core"> -[]Kubernetes core/v1.ContainerPort -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>List of ports to expose from the container. Exposing a port here gives -the system additional information about the network connections a -container uses, but is primarily informational. Not specifying a port here -DOES NOT prevent that port from being exposed. Any port which is -listening on the default &ldquo;0.0.0.0&rdquo; address inside a container will be -accessible from the network.</p> -</td> -</tr> -<tr> -<td> -<code>envFrom</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.12/#envfromsource-v1-core"> -[]Kubernetes core/v1.EnvFromSource -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>List of sources to populate environment variables in the container. -The keys defined within a source must be a C_IDENTIFIER. All invalid keys -will be reported as an event when the container is starting. When a key exists in multiple -sources, the value associated with the last source will take precedence. -Values defined by an Env with a duplicate key will take precedence.</p> -</td> -</tr> -<tr> -<td> -<code>env</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.12/#envvar-v1-core"> -[]Kubernetes core/v1.EnvVar -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>List of environment variables to set in the container.</p> -</td> -</tr> -<tr> -<td> -<code>volumeMounts</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.12/#volumemount-v1-core"> -[]Kubernetes core/v1.VolumeMount -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Pod volumes to mount into the container&rsquo;s filesystem.</p> -</td> -</tr> -<tr> -<td> -<code>livenessProbe</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.12/#probe-v1-core"> -Kubernetes core/v1.Probe -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Periodic probe of container liveness. -The container will be restarted if the probe fails.</p> -</td> -</tr> -<tr> -<td> -<code>readinessProbe</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.12/#probe-v1-core"> -Kubernetes core/v1.Probe -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Periodic probe of container service readiness. -The container will be removed from service endpoints if the probe fails.</p> -</td> -</tr> -<tr> -<td> -<code>lifecycle</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.12/#lifecycle-v1-core"> -Kubernetes core/v1.Lifecycle -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Actions that the management system should take in response to container lifecycle events.</p> -</td> -</tr> -<tr> -<td> -<code>securityContext</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.12/#securitycontext-v1-core"> -Kubernetes core/v1.SecurityContext -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Security options the pod should run with. -More info: <a href="https://kubernetes.io/docs/concepts/policy/security-context/">https://kubernetes.io/docs/concepts/policy/security-context/</a> -More info: <a href="https://kubernetes.io/docs/tasks/configure-pod-container/security-context/">https://kubernetes.io/docs/tasks/configure-pod-container/security-context/</a></p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Handler">Handler -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.Backup">Backup</a>, -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.Restore">Restore</a>) -</p> -<p> -<p>Handler defines a specific action that should be taken</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>exec</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.12/#execaction-v1-core"> -Kubernetes core/v1.ExecAction -</a> -</em> -</td> -<td> -<p>Exec specifies the action to take.</p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsCredentialType">JenkinsCredentialType -(<code>string</code> alias)</p></h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.SeedJob">SeedJob</a>) -</p> -<p> -<p>JenkinsCredentialType defines type of Jenkins credential used in the seed job mechanism</p> -</p> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsMaster">JenkinsMaster -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.JenkinsSpec">JenkinsSpec</a>) -</p> -<p> -<p>JenkinsMaster defines the Jenkins master pod attributes and plugins, -every single change requires a Jenkins master pod restart</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>masterAnnotations</code></br> -<em> -map[string]string -</em> -</td> -<td> -<em>(Optional)</em> -<p>Annotations is an unstructured key value map stored with a resource that may be -set by external tools to store and retrieve arbitrary metadata. They are not -queryable and should be preserved when modifying objects. -More info: <a href="http://kubernetes.io/docs/user-guide/annotations">http://kubernetes.io/docs/user-guide/annotations</a></p> -</td> -</tr> -<tr> -<td> -<code>nodeSelector</code></br> -<em> -map[string]string -</em> -</td> -<td> -<em>(Optional)</em> -<p>NodeSelector is a selector which must be true for the pod to fit on a node. -Selector which must match a node&rsquo;s labels for the pod to be scheduled on that node. -More info: <a href="https://kubernetes.io/docs/concepts/configuration/assign-pod-node/">https://kubernetes.io/docs/concepts/configuration/assign-pod-node/</a></p> -</td> -</tr> -<tr> -<td> -<code>securityContext</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.12/#podsecuritycontext-v1-core"> -Kubernetes core/v1.PodSecurityContext -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>SecurityContext that applies to all the containers of the Jenkins -Master. As per kubernetes specification, it can be overridden -for each container individually. -Defaults to: -runAsUser: 1000 -fsGroup: 1000</p> -</td> -</tr> -<tr> -<td> -<code>containers</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Container"> -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Container -</a> -</em> -</td> -<td> -<p>List of containers belonging to the pod. -Containers cannot currently be added or removed. -There must be at least one container in a Pod. -Defaults to: -- image: jenkins/jenkins:lts -imagePullPolicy: Always -livenessProbe: -failureThreshold: 12 -httpGet: -path: /login -port: http -scheme: HTTP -initialDelaySeconds: 80 -periodSeconds: 10 -successThreshold: 1 -timeoutSeconds: 5 -name: jenkins-master -readinessProbe: -failureThreshold: 3 -httpGet: -path: /login -port: http -scheme: HTTP -initialDelaySeconds: 30 -periodSeconds: 10 -successThreshold: 1 -timeoutSeconds: 1 -resources: -limits: -cpu: 1500m -memory: 3Gi -requests: -cpu: &ldquo;1&rdquo; -memory: 600Mi</p> -</td> -</tr> -<tr> -<td> -<code>volumes</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.12/#volume-v1-core"> -[]Kubernetes core/v1.Volume -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>List of volumes that can be mounted by containers belonging to the pod. -More info: <a href="https://kubernetes.io/docs/concepts/storage/volumes">https://kubernetes.io/docs/concepts/storage/volumes</a></p> -</td> -</tr> -<tr> -<td> -<code>basePlugins</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Plugin"> -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Plugin -</a> -</em> -</td> -<td> -<p>BasePlugins contains plugins required by operator -Defaults to : -- name: kubernetes -version: 1.15.7 -- name: workflow-job -version: &ldquo;2.32&rdquo; -- name: workflow-aggregator -version: &ldquo;2.6&rdquo; -- name: git -version: 3.10.0 -- name: job-dsl -version: &ldquo;1.74&rdquo; -- name: configuration-as-code -version: &ldquo;1.19&rdquo; -- name: kubernetes-credentials-provider -version: 0.12.1</p> -</td> -</tr> -<tr> -<td> -<code>plugins</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Plugin"> -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Plugin -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Plugins contains plugins required by user</p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsSpec">JenkinsSpec -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.Jenkins">Jenkins</a>) -</p> -<p> -<p>JenkinsSpec defines the desired state of the Jenkins</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>master</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsMaster"> -JenkinsMaster -</a> -</em> -</td> -<td> -<p>Master represents the Jenkins master pod properties and Jenkins plugins. -Every single change here requires a pod restart.</p> -</td> -</tr> -<tr> -<td> -<code>seedJobs</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.SeedJob"> -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.SeedJob -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>SeedJobs defines list of Jenkins Seed Job configurations -More info: <a href="https://github.com/jenkinsci/kubernetes-operator/blob/master/docs/getting-started.md#configure-seed-jobs-and-pipelines">https://github.com/jenkinsci/kubernetes-operator/blob/master/docs/getting-started.md#configure-seed-jobs-and-pipelines</a></p> -</td> -</tr> -<tr> -<td> -<code>service</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Service"> -Service -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Service is the Kubernetes service of the Jenkins master HTTP pod -Defaults to : -port: 8080 -type: ClusterIP</p> -</td> -</tr> -<tr> -<td> -<code>slaveService</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Service"> -Service -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Service is the Kubernetes service of the Jenkins slave pods -Defaults to : -port: 50000 -type: ClusterIP</p> -</td> -</tr> -<tr> -<td> -<code>backup</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Backup"> -Backup -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Backup defines the configuration of the Jenkins backup -More info: <a href="https://github.com/jenkinsci/kubernetes-operator/blob/master/docs/getting-started.md#configure-backup-and-restore">https://github.com/jenkinsci/kubernetes-operator/blob/master/docs/getting-started.md#configure-backup-and-restore</a></p> -</td> -</tr> -<tr> -<td> -<code>restore</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Restore"> -Restore -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Backup defines the configuration of the Jenkins backup restore -More info: <a href="https://github.com/jenkinsci/kubernetes-operator/blob/master/docs/getting-started.md#configure-backup-and-restore">https://github.com/jenkinsci/kubernetes-operator/blob/master/docs/getting-started.md#configure-backup-and-restore</a></p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsStatus">JenkinsStatus -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.Jenkins">Jenkins</a>) -</p> -<p> -<p>JenkinsStatus defines the observed state of Jenkins</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>operatorVersion</code></br> -<em> -string -</em> -</td> -<td> -<em>(Optional)</em> -<p>OperatorVersion is the operator version which manages this CR</p> -</td> -</tr> -<tr> -<td> -<code>provisionStartTime</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.12/#time-v1-meta"> -Kubernetes meta/v1.Time -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>ProvisionStartTime is a time when the Jenkins master pod has been created</p> -</td> -</tr> -<tr> -<td> -<code>baseConfigurationCompletedTime</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.12/#time-v1-meta"> -Kubernetes meta/v1.Time -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>BaseConfigurationCompletedTime is a time when Jenkins base configuration phase has been completed</p> -</td> -</tr> -<tr> -<td> -<code>userConfigurationCompletedTime</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.12/#time-v1-meta"> -Kubernetes meta/v1.Time -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>UserConfigurationCompletedTime is a time when Jenkins user configuration phase has been completed</p> -</td> -</tr> -<tr> -<td> -<code>builds</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Build"> -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Build -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Builds contains the Jenkins builds statues</p> -</td> -</tr> -<tr> -<td> -<code>restoredBackup</code></br> -<em> -uint64 -</em> -</td> -<td> -<em>(Optional)</em> -<p>RestoredBackup is the restored backup number after the Jenkins master pod restart</p> -</td> -</tr> -<tr> -<td> -<code>lastBackup</code></br> -<em> -uint64 -</em> -</td> -<td> -<em>(Optional)</em> -<p>LastBackup is the latest backup number</p> -</td> -</tr> -<tr> -<td> -<code>pendingBackup</code></br> -<em> -uint64 -</em> -</td> -<td> -<em>(Optional)</em> -<p>PendingBackup is the pending backup number</p> -</td> -</tr> -<tr> -<td> -<code>backupDoneBeforePodDeletion</code></br> -<em> -bool -</em> -</td> -<td> -<em>(Optional)</em> -<p>BackupDoneBeforePodDeletion tells if a backup before pod deletion has been made</p> -</td> -</tr> -<tr> -<td> -<code>userAndPasswordHash</code></br> -<em> -string -</em> -</td> -<td> -<em>(Optional)</em> -<p>UserAndPasswordHash is a SHA256 hash made from the username and password</p> -</td> -</tr> -<tr> -<td> -<code>createdSeedJobs</code></br> -<em> -[]string -</em> -</td> -<td> -<em>(Optional)</em> -<p>CreatedSeedJobs contains list of seed job ids already created in Jenkins</p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Plugin">Plugin -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.JenkinsMaster">JenkinsMaster</a>) -</p> -<p> -<p>Plugin defines Jenkins plugin</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>name</code></br> -<em> -string -</em> -</td> -<td> -<p>Name is the name of the Jenkins plugin</p> -</td> -</tr> -<tr> -<td> -<code>version</code></br> -<em> -string -</em> -</td> -<td> -<p>Version is the version of the Jenkins plugin</p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Restore">Restore -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.JenkinsSpec">JenkinsSpec</a>) -</p> -<p> -<p>Restore defines the configuration of a Jenkins backup restore operation</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>containerName</code></br> -<em> -string -</em> -</td> -<td> -<p>ContainerName is the container name responsible for the restore backup operation</p> -</td> -</tr> -<tr> -<td> -<code>action</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Handler"> -Handler -</a> -</em> -</td> -<td> -<p>Action defines action which performs the restore backup in a restore container sidecar</p> -</td> -</tr> -<tr> -<td> -<code>recoveryOnce</code></br> -<em> -uint64 -</em> -</td> -<td> -<em>(Optional)</em> -<p>RecoveryOnce if you want to restore a specific backup, set this field, and then Jenkins will be restarted and the desired backup will be restored</p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.SeedJob">SeedJob -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.JenkinsSpec">JenkinsSpec</a>) -</p> -<p> -<p>SeedJob defines configuration for seed job -More info: <a href="https://github.com/jenkinsci/kubernetes-operator/blob/master/docs/getting-started.md#configure-seed-jobs-and-pipelines">https://github.com/jenkinsci/kubernetes-operator/blob/master/docs/getting-started.md#configure-seed-jobs-and-pipelines</a></p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>id</code></br> -<em> -string -</em> -</td> -<td> -<p>ID is the unique seed job name</p> -</td> -</tr> -<tr> -<td> -<code>credentialID</code></br> -<em> -string -</em> -</td> -<td> -<p>CredentialID is the Kubernetes secret name which stores repository access credentials</p> -</td> -</tr> -<tr> -<td> -<code>description</code></br> -<em> -string -</em> -</td> -<td> -<em>(Optional)</em> -<p>Description is the description of the seed job</p> -</td> -</tr> -<tr> -<td> -<code>targets</code></br> -<em> -string -</em> -</td> -<td> -<p>Targets is the repository path where the seed job definitions are</p> -</td> -</tr> -<tr> -<td> -<code>repositoryBranch</code></br> -<em> -string -</em> -</td> -<td> -<p>RepositoryBranch is the repository branch where the seed job definitions are</p> -</td> -</tr> -<tr> -<td> -<code>repositoryUrl</code></br> -<em> -string -</em> -</td> -<td> -<p>RepositoryURL is the repository access URL. Can be SSH or HTTPS.</p> -</td> -</tr> -<tr> -<td> -<code>credentialType</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsCredentialType"> -JenkinsCredentialType -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>JenkinsCredentialType is the <a href="https://jenkinsci.github.io/kubernetes-credentials-provider-plugin/">https://jenkinsci.github.io/kubernetes-credentials-provider-plugin/</a> credential type</p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Service">Service -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.JenkinsSpec">JenkinsSpec</a>) -</p> -<p> -<p>Service defines the Kubernetes service attributes</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>annotations</code></br> -<em> -map[string]string -</em> -</td> -<td> -<em>(Optional)</em> -<p>Annotations is an unstructured key value map stored with a resource that may be -set by external tools to store and retrieve arbitrary metadata. They are not -queryable and should be preserved when modifying objects. -More info: <a href="http://kubernetes.io/docs/user-guide/annotations">http://kubernetes.io/docs/user-guide/annotations</a></p> -</td> -</tr> -<tr> -<td> -<code>labels</code></br> -<em> -map[string]string -</em> -</td> -<td> -<p>Route service traffic to pods with label keys and values matching this -selector. If empty or not present, the service is assumed to have an -external process managing its endpoints, which Kubernetes will not -modify. Only applies to types ClusterIP, NodePort, and LoadBalancer. -Ignored if type is ExternalName. -More info: <a href="https://kubernetes.io/docs/concepts/services-networking/service/">https://kubernetes.io/docs/concepts/services-networking/service/</a></p> -</td> -</tr> -<tr> -<td> -<code>type</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.12/#servicetype-v1-core"> -Kubernetes core/v1.ServiceType -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Type determines how the Service is exposed. Defaults to ClusterIP. Valid -options are ExternalName, ClusterIP, NodePort, and LoadBalancer. -&ldquo;ExternalName&rdquo; maps to the specified externalName. -&ldquo;ClusterIP&rdquo; allocates a cluster-internal IP address for load-balancing to -endpoints. Endpoints are determined by the selector or if that is not -specified, by manual construction of an Endpoints object. If clusterIP is -&ldquo;None&rdquo;, no virtual IP is allocated and the endpoints are published as a -set of endpoints rather than a stable IP. -&ldquo;NodePort&rdquo; builds on ClusterIP and allocates a port on every node which -routes to the clusterIP. -&ldquo;LoadBalancer&rdquo; builds on NodePort and creates an -external load-balancer (if supported in the current cloud) which routes -to the clusterIP. -More info: <a href="https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services---service-types">https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services&mdash;service-types</a></p> -</td> -</tr> -<tr> -<td> -<code>port</code></br> -<em> -int32 -</em> -</td> -<td> -<p>The port that is exposed by this service. -More info: <a href="https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies">https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies</a></p> -</td> -</tr> -<tr> -<td> -<code>nodePort</code></br> -<em> -int32 -</em> -</td> -<td> -<em>(Optional)</em> -<p>The port on each node on which this service is exposed when type=NodePort or LoadBalancer. -Usually assigned by the system. If specified, it will be allocated to the service, -if unused, or else creation of the service will fail. -Default is to auto-allocate a port if the ServiceType of this Service requires one. -More info: <a href="https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport">https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport</a></p> -</td> -</tr> -<tr> -<td> -<code>loadBalancerSourceRanges</code></br> -<em> -[]string -</em> -</td> -<td> -<em>(Optional)</em> -<p>If specified and supported by the platform, this will restrict traffic through the cloud-provider. -The load-balancer will be restricted to the specified client IPs. This field will be ignored if the -cloud-provider does not support the feature.&rdquo; -More info: <a href="https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/">https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/</a></p> -</td> -</tr> -<tr> -<td> -<code>loadBalancerIP</code></br> -<em> -string -</em> -</td> -<td> -<em>(Optional)</em> -<p>Only applies to Service Type: LoadBalancer -LoadBalancer will get created with the IP specified in this field. -This feature depends on whether the underlying cloud-provider supports specifying -the loadBalancerIP when a load balancer is created. -This field will be ignored if the cloud-provider does not support the feature.</p> -</td> -</tr> -</tbody> -</table> -<hr/> -<p><em> -Generated with <code>gen-crd-api-reference-docs</code> -on git commit <code>37e531a</code>. -</em></p> - - - - - - Docs: Migration guide from v1alpha1 to v1alpha2 - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.1.x/migration-guide-v1alpha1-to-v1alpha2/ - Mon, 05 Aug 2019 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.1.x/migration-guide-v1alpha1-to-v1alpha2/ - - - - - -<p>Please note that <strong>CRD manifests are global</strong>, not namespaced, so every <strong>Jenkins operator</strong> running on the cluster -will be impacted by the new CRD manifest. Multiple operator instances with different versions <em>should</em> continue to work.</p> - -<h2 id="stop-the-jenkins-operator-pod">Stop the jenkins-operator pod</h2> - -<p>Run command:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">$ kubectl -n &lt;namespace&gt; scale deployment.apps/jenkins-operator --replicas<span style="color:#ce5c00;font-weight:bold">=</span><span style="color:#0000cf;font-weight:bold">0</span> -deployment.apps/jenkins-operator scaled</code></pre></div> -<p>Verify the desired state, by running this command:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">$ kubectl -n &lt;namespace&gt; get po -No resources found.</code></pre></div> -<h2 id="stop-the-jenkins-master-pod">Stop the Jenkins master pod</h2> - -<p>Run command:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">$ kubectl -n &lt;namespace&gt; get po -NAME READY STATUS RESTARTS AGE -jenkins-operator-&lt;cr_name&gt; 2/2 Running <span style="color:#0000cf;font-weight:bold">0</span> 3m35s -$ kubectl -n &lt;namespace&gt; get delete po jenkins-operator-&lt;cr_name&gt; -pod <span style="color:#4e9a06">&#34;jenkins-operator-&lt;cr_name&gt;&#34;</span> deleted</code></pre></div> -<p>Verify the desired state, by running this command:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">$ kubectl -n &lt;namespace&gt; get po -No resources found.</code></pre></div> -<h2 id="save-jenkins-cr-to-jenkins-yaml-file">Save Jenkins CR to jenkins.yaml file</h2> - -<p>Run command:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">$ kubectl -n &lt;namespace&gt; get jenkins &lt;cr_name&gt; -o yaml &gt; jenkins.yaml</code></pre></div> -<h2 id="modify-jenkins-yaml-file">Modify jenkins.yaml file</h2> - -<p>Change apiVersion to <code>apiVersion: jenkins.io/v1alpha2</code></p> - -<p>New plugin format without dependent plugins:</p> - -<ul> -<li><p><code>spec.master.basePlugins</code> example:</p> -<pre><code>spec: -master: -basePlugins: - - name: a-plugin-name - version: "1.0.0" - ...</code></pre></li> - -<li><p><code>spec.master.plugins</code> example:</p> -<pre><code>spec: -master: -plugins: - - name: a-plugin-name - version: "1.0.0" -...</code></pre></li> -</ul> - -<p>Move Jenkins <code>master</code> container properties to <code>spec.master.containers[jenkins-master]</code> (non exhaustive list): -- <code>spec.master.image</code> -&gt; <code>spec.master.containers[jenkins-master].image</code> -- <code>spec.master.imagePullPolicy</code> -&gt; <code>spec.master.containers[jenkins-master].imagePullPolicy</code> -- <code>spec.master.livenessProbe</code> -&gt; <code>spec.master.containers[jenkins-master].livenessProbe</code> -- <code>spec.master.readinessProbe</code> -&gt; <code>spec.master.containers[jenkins-master].readinessProbe</code> -- <code>spec.master.resources</code> -&gt; <code>spec.master.containers[jenkins-master].resources</code> -- <code>spec.master.env</code> -&gt; <code>spec.master.containers[jenkins-master].env</code></p> -<pre><code>spec: - master: - containers: - - name: jenkins-master - image: jenkins/jenkins:lts - ...</code></pre> -<p>See also the examples below for more details. For even more details please look at the source code. -Code that defines the data structures can be found <a href="v0.1.1/jenkins-v1alpha2-scheme.md">here</a></p> - -<h3 id="examples">Examples</h3> - -<p>Old format:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.io/v1alpha1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>&lt;cr_name<span style="color:#8f5902;font-style:italic">&gt; -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">namespace: &lt;namespace&gt;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>master<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>basePlugins<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configuration-as-code<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.17</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>configuration-as-code-support<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.17</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>git<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">3.10</span><span style="color:#0000cf;font-weight:bold">.0</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apache-httpcomponents-client<span style="color:#0000cf;font-weight:bold">-4</span>-api<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">4.5</span><span style="color:#0000cf;font-weight:bold">.5</span><span style="color:#0000cf;font-weight:bold">-3.0</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>credentials<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">2.1</span><span style="color:#0000cf;font-weight:bold">.19</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>display-url-api<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">2.3</span><span style="color:#0000cf;font-weight:bold">.1</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>git-client<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">2.7</span><span style="color:#0000cf;font-weight:bold">.7</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>jsch<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">0.1</span><span style="color:#0000cf;font-weight:bold">.55</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>junit<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.28</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>mailer<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.23</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>matrix-project<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.14</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>scm-api<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">2.4</span><span style="color:#0000cf;font-weight:bold">.1</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>script-security<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.59</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>ssh-credentials<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.16</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>structs<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.19</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>workflow-api<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">2.34</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>workflow-scm-step<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">2.7</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>workflow-step-api<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">2.19</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>job-dsl<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.74</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>script-security<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.59</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>structs<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.19</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>kubernetes-credentials-provider<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">0.12</span><span style="color:#0000cf;font-weight:bold">.1</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>credentials<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">2.1</span><span style="color:#0000cf;font-weight:bold">.19</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>structs<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.19</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>variant<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.2</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>kubernetes<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.15</span><span style="color:#0000cf;font-weight:bold">.5</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apache-httpcomponents-client<span style="color:#0000cf;font-weight:bold">-4</span>-api<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">4.5</span><span style="color:#0000cf;font-weight:bold">.5</span><span style="color:#0000cf;font-weight:bold">-3.0</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>cloudbees-folder<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">6.8</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>credentials<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">2.1</span><span style="color:#0000cf;font-weight:bold">.19</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>durable-task<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.29</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>jackson2-api<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">2.9</span><span style="color:#0000cf;font-weight:bold">.9</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>kubernetes-credentials<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">0.4</span><span style="color:#0000cf;font-weight:bold">.0</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>plain-credentials<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.5</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>structs<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.19</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>variant<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.2</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>workflow-step-api<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">2.19</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>workflow-aggregator<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">2.6</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>ace-editor<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.1</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apache-httpcomponents-client<span style="color:#0000cf;font-weight:bold">-4</span>-api<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">4.5</span><span style="color:#0000cf;font-weight:bold">.5</span><span style="color:#0000cf;font-weight:bold">-3.0</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>authentication-tokens<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.3</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>branch-api<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">2.5</span><span style="color:#0000cf;font-weight:bold">.2</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>cloudbees-folder<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">6.8</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>credentials-binding<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.18</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>credentials<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">2.1</span><span style="color:#0000cf;font-weight:bold">.19</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>display-url-api<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">2.3</span><span style="color:#0000cf;font-weight:bold">.1</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>docker-commons<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.15</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>docker-workflow<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.18</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>durable-task<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.29</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>git-client<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">2.7</span><span style="color:#0000cf;font-weight:bold">.7</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>git-server<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.7</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>handlebars<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.1</span><span style="color:#0000cf;font-weight:bold">.1</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>jackson2-api<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">2.9</span><span style="color:#0000cf;font-weight:bold">.9</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>jquery-detached<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.2</span><span style="color:#0000cf;font-weight:bold">.1</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>jsch<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">0.1</span><span style="color:#0000cf;font-weight:bold">.55</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>junit<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.28</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>lockable-resources<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">2.5</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>mailer<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.23</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>matrix-project<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.14</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>momentjs<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.1</span><span style="color:#0000cf;font-weight:bold">.1</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>pipeline-build-step<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">2.9</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>pipeline-graph-analysis<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.10</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>pipeline-input-step<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">2.10</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>pipeline-milestone-step<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.3</span><span style="color:#0000cf;font-weight:bold">.1</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>pipeline-model-api<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.3</span><span style="color:#0000cf;font-weight:bold">.8</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>pipeline-model-declarative-agent<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.1</span><span style="color:#0000cf;font-weight:bold">.1</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>pipeline-model-definition<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.3</span><span style="color:#0000cf;font-weight:bold">.8</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>pipeline-model-extensions<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.3</span><span style="color:#0000cf;font-weight:bold">.8</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>pipeline-rest-api<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">2.11</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>pipeline-stage-step<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">2.3</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>pipeline-stage-tags-metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.3</span><span style="color:#0000cf;font-weight:bold">.8</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>pipeline-stage-view<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">2.11</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>plain-credentials<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.5</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>scm-api<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">2.4</span><span style="color:#0000cf;font-weight:bold">.1</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>script-security<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.59</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>ssh-credentials<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.16</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>structs<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.19</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>workflow-api<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">2.34</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>workflow-basic-steps<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">2.16</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>workflow-cps-global-lib<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">2.13</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>workflow-cps<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">2.69</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>workflow-durable-task-step<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">2.30</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>workflow-job<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">2.32</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>workflow-multibranch<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">2.21</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>workflow-scm-step<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">2.7</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>workflow-step-api<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">2.19</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>workflow-support<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">3.3</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>workflow-job<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">2.32</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>scm-api<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">2.4</span><span style="color:#0000cf;font-weight:bold">.1</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>script-security<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.59</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>structs<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.19</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>workflow-api<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">2.34</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>workflow-step-api<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">2.19</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>workflow-support<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">3.3</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>image<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins/jenkins<span style="color:#000;font-weight:bold">:</span>lts<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>imagePullPolicy<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Always<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>livenessProbe<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>failureThreshold<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">12</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>httpGet<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>path<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/login<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>port<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">8080</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>scheme<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>HTTP<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>initialDelaySeconds<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">30</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>periodSeconds<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">10</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>successThreshold<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>timeoutSeconds<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">5</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>plugins<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>simple-theme-plugin<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">0.5</span><span style="color:#0000cf;font-weight:bold">.1</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">]</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>slack<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">2.24</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>workflow-step-api<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">2.19</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>credentials<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">2.1</span><span style="color:#0000cf;font-weight:bold">.19</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>display-url-api<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">2.3</span><span style="color:#0000cf;font-weight:bold">.1</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>junit<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.28</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>plain-credentials<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.5</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>script-security<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.59</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>structs<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.19</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>token-macro<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">2.8</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>readinessProbe<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>failureThreshold<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">12</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>httpGet<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>path<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/login<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>port<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">8080</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>scheme<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>HTTP<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>initialDelaySeconds<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">30</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>periodSeconds<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">10</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>successThreshold<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>timeoutSeconds<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">5</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>limits<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>cpu<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>1500m<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>memory<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>3Gi<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>requests<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>cpu<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;1&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>memory<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>500Mi</code></pre></div> -<p>New format:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.io/v1alpha2<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>&lt;cr_name<span style="color:#8f5902;font-style:italic">&gt; -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">namespace: &lt;namespace&gt;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>master<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>basePlugins<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>kubernetes<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1.15</span><span style="color:#0000cf;font-weight:bold">.7</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>workflow-job<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;2.32&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>workflow-aggregator<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;2.6&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>git<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">3.10</span><span style="color:#0000cf;font-weight:bold">.0</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>job-dsl<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;1.74&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configuration-as-code<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;1.19&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>kubernetes-credentials-provider<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">0.12</span><span style="color:#0000cf;font-weight:bold">.1</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>containers<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-master<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>image<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins/jenkins<span style="color:#000;font-weight:bold">:</span>lts<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>imagePullPolicy<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Always<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>livenessProbe<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>failureThreshold<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">12</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>httpGet<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>path<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/login<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>port<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>http<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>scheme<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>HTTP<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>initialDelaySeconds<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">30</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>periodSeconds<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">10</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>successThreshold<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>timeoutSeconds<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">5</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>readinessProbe<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>failureThreshold<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">3</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>httpGet<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>path<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/login<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>port<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>http<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>scheme<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>HTTP<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>initialDelaySeconds<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">30</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>periodSeconds<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">10</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>successThreshold<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>timeoutSeconds<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>limits<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>cpu<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>1500m<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>memory<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>3Gi<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>requests<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>cpu<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;1&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>memory<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>500Mi<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>plugins<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>simple-theme-plugin<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">0.5</span><span style="color:#0000cf;font-weight:bold">.1</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>slack<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">2.24</span></code></pre></div> -<h2 id="update-crd-to-a-new-version">Update CRD to a new version</h2> - -<p>A new version of the Custom Resource Definition for the operator needs to be applied: --<a href="https://github.com/jenkinsci/kubernetes-operator/blob/master/deploy/crds/jenkins_v1alpha2_jenkins_crd.yaml">Jenkins CRD v1alpha2</a></p> - -<p>To use the default CRD file:</p> -<pre><code>kubectl -n <namespace> apply -f https://github.com/jenkinsci/kubernetes-operator/blob/master/deploy/crds/jenkins_v1alpha2_jenkins_crd.yaml</code></pre> -<h2 id="update-rbac-to-a-new-version">Update RBAC to a new version</h2> - -<p>A new operator version requires updated RBAC permissions:</p> - -<p>To use the default Role file:</p> -<pre><code>$ kubectl -n <namespace> apply -f https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/deploy/role.yaml</code></pre> -<h2 id="deploy-new-operator-manifests">Deploy new operator manifests</h2> - -<p>Replace your modified operator configuration file:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">$ kubectl -n &lt;namespace&gt; replace -f jenkins.yaml</code></pre></div> -<p>Update operator version in the deployment file to <code>image: virtuslab/jenkins-operator:v0.1.0</code> and scale up, -or use the default deployment manifest:</p> -<pre><code>$ kubectl -n <namespace> apply -f https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/deploy/operator.yaml</code></pre> - - - - - diff --git a/docs/docs/getting-started/v0.1.x/migration-guide-v1alpha1-to-v1alpha2/index.html b/docs/docs/getting-started/v0.1.x/migration-guide-v1alpha1-to-v1alpha2/index.html deleted file mode 100644 index 185765f2a..000000000 --- a/docs/docs/getting-started/v0.1.x/migration-guide-v1alpha1-to-v1alpha2/index.html +++ /dev/null @@ -1,1285 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Migration guide from v1alpha1 to v1alpha2 | Jenkins Operator - - - - - - - - - - - - - - - - - - - - - - - - - - - - Migration guide from v1alpha1 to v1alpha2 | Jenkins Operator - - -
- - - -
-
-
-
-
- - - - - -
- - - - -
- - - - -
- -
- - - -
-

Migration guide from v1alpha1 to v1alpha2

-
How to migrate to new CRD manifest
- - -

Please note that CRD manifests are global, not namespaced, so every Jenkins operator running on the cluster -will be impacted by the new CRD manifest. Multiple operator instances with different versions should continue to work.

- -

Stop the jenkins-operator pod

- -

Run command:

-
$ kubectl -n <namespace> scale deployment.apps/jenkins-operator --replicas=0
-deployment.apps/jenkins-operator scaled
-

Verify the desired state, by running this command:

-
$ kubectl -n <namespace> get po
-No resources found.
-

Stop the Jenkins master pod

- -

Run command:

-
$ kubectl -n <namespace> get po
-NAME                       READY     STATUS        RESTARTS   AGE
-jenkins-operator-<cr_name>   2/2       Running       0          3m35s
-$ kubectl -n <namespace> get delete po jenkins-operator-<cr_name>
-pod "jenkins-operator-<cr_name>" deleted
-

Verify the desired state, by running this command:

-
$ kubectl -n <namespace> get po
-No resources found.
-

Save Jenkins CR to jenkins.yaml file

- -

Run command:

-
$ kubectl -n <namespace> get jenkins <cr_name> -o yaml > jenkins.yaml
-

Modify jenkins.yaml file

- -

Change apiVersion to apiVersion: jenkins.io/v1alpha2

- -

New plugin format without dependent plugins:

- -
    -
  • spec.master.basePlugins example:

    -
    spec:
    -master:
    -basePlugins:
    -  - name: a-plugin-name
    -    version: "1.0.0"
    -  ...
  • - -
  • spec.master.plugins example:

    -
    spec:
    -master:
    -plugins:
    -  - name: a-plugin-name
    -     version: "1.0.0"
    -...
  • -
- -

Move Jenkins master container properties to spec.master.containers[jenkins-master] (non exhaustive list): -- spec.master.image -> spec.master.containers[jenkins-master].image -- spec.master.imagePullPolicy -> spec.master.containers[jenkins-master].imagePullPolicy -- spec.master.livenessProbe -> spec.master.containers[jenkins-master].livenessProbe -- spec.master.readinessProbe -> spec.master.containers[jenkins-master].readinessProbe -- spec.master.resources -> spec.master.containers[jenkins-master].resources -- spec.master.env -> spec.master.containers[jenkins-master].env

-
spec:
-  master:
-    containers:
-      - name: jenkins-master
-        image: jenkins/jenkins:lts
-      ...
-

See also the examples below for more details. For even more details please look at the source code. -Code that defines the data structures can be found here

- -

Examples

- -

Old format:

-
apiVersion: jenkins.io/v1alpha1
-kind: Jenkins
-metadata:
-  name: <cr_name>
-  namespace: <namespace>
-spec:
-  master:
-    basePlugins:
-      configuration-as-code:1.17:
-      - configuration-as-code-support:1.17
-      git:3.10.0:
-      - apache-httpcomponents-client-4-api:4.5.5-3.0
-      - credentials:2.1.19
-      - display-url-api:2.3.1
-      - git-client:2.7.7
-      - jsch:0.1.55
-      - junit:1.28
-      - mailer:1.23
-      - matrix-project:1.14
-      - scm-api:2.4.1
-      - script-security:1.59
-      - ssh-credentials:1.16
-      - structs:1.19
-      - workflow-api:2.34
-      - workflow-scm-step:2.7
-      - workflow-step-api:2.19
-      job-dsl:1.74:
-      - script-security:1.59
-      - structs:1.19
-      kubernetes-credentials-provider:0.12.1:
-      - credentials:2.1.19
-      - structs:1.19
-      - variant:1.2
-      kubernetes:1.15.5:
-      - apache-httpcomponents-client-4-api:4.5.5-3.0
-      - cloudbees-folder:6.8
-      - credentials:2.1.19
-      - durable-task:1.29
-      - jackson2-api:2.9.9
-      - kubernetes-credentials:0.4.0
-      - plain-credentials:1.5
-      - structs:1.19
-      - variant:1.2
-      - workflow-step-api:2.19
-      workflow-aggregator:2.6:
-      - ace-editor:1.1
-      - apache-httpcomponents-client-4-api:4.5.5-3.0
-      - authentication-tokens:1.3
-      - branch-api:2.5.2
-      - cloudbees-folder:6.8
-      - credentials-binding:1.18
-      - credentials:2.1.19
-      - display-url-api:2.3.1
-      - docker-commons:1.15
-      - docker-workflow:1.18
-      - durable-task:1.29
-      - git-client:2.7.7
-      - git-server:1.7
-      - handlebars:1.1.1
-      - jackson2-api:2.9.9
-      - jquery-detached:1.2.1
-      - jsch:0.1.55
-      - junit:1.28
-      - lockable-resources:2.5
-      - mailer:1.23
-      - matrix-project:1.14
-      - momentjs:1.1.1
-      - pipeline-build-step:2.9
-      - pipeline-graph-analysis:1.10
-      - pipeline-input-step:2.10
-      - pipeline-milestone-step:1.3.1
-      - pipeline-model-api:1.3.8
-      - pipeline-model-declarative-agent:1.1.1
-      - pipeline-model-definition:1.3.8
-      - pipeline-model-extensions:1.3.8
-      - pipeline-rest-api:2.11
-      - pipeline-stage-step:2.3
-      - pipeline-stage-tags-metadata:1.3.8
-      - pipeline-stage-view:2.11
-      - plain-credentials:1.5
-      - scm-api:2.4.1
-      - script-security:1.59
-      - ssh-credentials:1.16
-      - structs:1.19
-      - workflow-api:2.34
-      - workflow-basic-steps:2.16
-      - workflow-cps-global-lib:2.13
-      - workflow-cps:2.69
-      - workflow-durable-task-step:2.30
-      - workflow-job:2.32
-      - workflow-multibranch:2.21
-      - workflow-scm-step:2.7
-      - workflow-step-api:2.19
-      - workflow-support:3.3
-      workflow-job:2.32:
-      - scm-api:2.4.1
-      - script-security:1.59
-      - structs:1.19
-      - workflow-api:2.34
-      - workflow-step-api:2.19
-      - workflow-support:3.3
-    image: jenkins/jenkins:lts
-    imagePullPolicy: Always
-    livenessProbe:
-      failureThreshold: 12
-      httpGet:
-        path: /login
-        port: 8080
-        scheme: HTTP
-      initialDelaySeconds: 30
-      periodSeconds: 10
-      successThreshold: 1
-      timeoutSeconds: 5
-    plugins:
-      simple-theme-plugin:0.5.1: []
-      slack:2.24:
-      - workflow-step-api:2.19
-      - credentials:2.1.19
-      - display-url-api:2.3.1
-      - junit:1.28
-      - plain-credentials:1.5
-      - script-security:1.59
-      - structs:1.19
-      - token-macro:2.8
-    readinessProbe:
-      failureThreshold: 12
-      httpGet:
-        path: /login
-        port: 8080
-        scheme: HTTP
-      initialDelaySeconds: 30
-      periodSeconds: 10
-      successThreshold: 1
-      timeoutSeconds: 5
-    resources:
-      limits:
-        cpu: 1500m
-        memory: 3Gi
-      requests:
-        cpu: "1"
-        memory: 500Mi
-

New format:

-
apiVersion: jenkins.io/v1alpha2
-kind: Jenkins
-metadata:
-  name: <cr_name>
-  namespace: <namespace>
-spec:
-  master:
-    basePlugins:
-    - name: kubernetes
-      version: 1.15.7
-    - name: workflow-job
-      version: "2.32"
-    - name: workflow-aggregator
-      version: "2.6"
-    - name: git
-      version: 3.10.0
-    - name: job-dsl
-      version: "1.74"
-    - name: configuration-as-code
-      version: "1.19"
-    - name: kubernetes-credentials-provider
-      version: 0.12.1
-    containers:
-    - name: jenkins-master
-      image: jenkins/jenkins:lts
-      imagePullPolicy: Always
-      livenessProbe:
-        failureThreshold: 12
-        httpGet:
-          path: /login
-          port: http
-          scheme: HTTP
-        initialDelaySeconds: 30
-        periodSeconds: 10
-        successThreshold: 1
-        timeoutSeconds: 5
-      readinessProbe:
-        failureThreshold: 3
-        httpGet:
-          path: /login
-          port: http
-          scheme: HTTP
-        initialDelaySeconds: 30
-        periodSeconds: 10
-        successThreshold: 1
-        timeoutSeconds: 1
-      resources:
-        limits:
-          cpu: 1500m
-          memory: 3Gi
-        requests:
-          cpu: "1"
-          memory: 500Mi
-    plugins:
-    - name: simple-theme-plugin
-      version: 0.5.1
-    - name: slack
-      version: 2.24
-

Update CRD to a new version

- -

A new version of the Custom Resource Definition for the operator needs to be applied: --Jenkins CRD v1alpha2

- -

To use the default CRD file:

-
kubectl -n  apply -f https://github.com/jenkinsci/kubernetes-operator/blob/master/deploy/crds/jenkins_v1alpha2_jenkins_crd.yaml
-

Update RBAC to a new version

- -

A new operator version requires updated RBAC permissions:

- -

To use the default Role file:

-
$ kubectl -n  apply -f https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/deploy/role.yaml
-

Deploy new operator manifests

- -

Replace your modified operator configuration file:

-
$ kubectl -n <namespace> replace -f jenkins.yaml
-

Update operator version in the deployment file to image: virtuslab/jenkins-operator:v0.1.0 and scale up, -or use the default deployment manifest:

-
$ kubectl -n  apply -f https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/deploy/operator.yaml
- - -
Last modified August 5, 2019 -
-
- - -
-
-
- - - - -
- - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/docs/getting-started/v0.1.x/scheme/index.html b/docs/docs/getting-started/v0.1.x/scheme/index.html deleted file mode 100644 index afbf51f4f..000000000 --- a/docs/docs/getting-started/v0.1.x/scheme/index.html +++ /dev/null @@ -1,2412 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Scheme | Jenkins Operator - - - - - - - - - - - - - - - - - - - - - - - - - - - - Scheme | Jenkins Operator - - -
- - - -
-
-
-
-
- - - - - -
- - - - -
- - - - -
-
- - - - - - - - - - - -
-
- - - -
-

Scheme

-
API Schema definitions for Jenkins CR
- - -
-

This document contains API scheme for jenkins-operator manifest

- -
- - -

Packages:

- -

jenkins.io

-

-

Package v1alpha2 contains the API Schema definitions for the jenkins.io v1alpha2 API group

-

-Resource Types: - -

Jenkins -

-

-

Jenkins is the Schema for the jenkins API

-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldDescription
-apiVersion
-string
- -jenkins.io/v1alpha2 - -
-kind
-string -
Jenkins
-metadata
- - -Kubernetes meta/v1.ObjectMeta - - -
-Refer to the Kubernetes API documentation for the fields of the -metadata field. -
-spec
- - -JenkinsSpec - - -
-

Spec defines the desired state of the Jenkins

-
-
- - - - - - - - - - - - - - - - - - - - - - - - - -
-master
- - -JenkinsMaster - - -
-

Master represents Jenkins master pod properties and Jenkins plugins. -Every single change here requires a pod restart.

-
-seedJobs
- - -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.SeedJob - - -
-(Optional) -

SeedJobs defines a list of Jenkins Seed Job configurations -More info: https://github.com/jenkinsci/kubernetes-operator/blob/master/docs/getting-started.md#configure-seed-jobs-and-pipelines

-
-service
- - -Service - - -
-(Optional) -

Service is the Kubernetes service of the Jenkins master HTTP pod -Defaults to : -port: 8080 -type: ClusterIP

-
-slaveService
- - -Service - - -
-(Optional) -

Service is the Kubernetes service of the Jenkins slave pods -Defaults to : -port: 50000 -type: ClusterIP

-
-backup
- - -Backup - - -
-(Optional) -

Backup defines the configuration of a Jenkins backup -More info: https://github.com/jenkinsci/kubernetes-operator/blob/master/docs/getting-started.md#configure-backup-and-restore

-
-restore
- - -Restore - - -
-(Optional) -

Backup defines the configuration of a Jenkins backup restore -More info: https://github.com/jenkinsci/kubernetes-operator/blob/master/docs/getting-started.md#configure-backup-and-restore

-
-
-status
- - -JenkinsStatus - - -
-

Status defines the observed state of Jenkins

-
-

Backup -

-

-(Appears on: -JenkinsSpec) -

-

-

Backup defines the configuration of Jenkins backup

-

- - - - - - - - - - - - - - - - - - - - - - - - - -
FieldDescription
-containerName
- -string - -
-

ContainerName is the container name responsible for backup operation

-
-action
- - -Handler - - -
-

Action defines the action which performs the backup in the backup container sidecar

-
-interval
- -uint64 - -
-

Interval tells you how often the backup is made in seconds -Defaults to 30.

-
-makeBackupBeforePodDeletion
- -bool - -
-

MakeBackupBeforePodDeletion tells the operator to make a backup before Jenkins master pod deletion

-
-

Build -

-

-(Appears on: -JenkinsStatus) -

-

-

Build defines the Jenkins Build status with corresponding metadata

-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldDescription
-jobName
- -string - -
-

JobName is the Jenkins job name

-
-hash
- -string - -
-

Hash is the unique data identifier used in build

-
-number
- -int64 - -
-

Number is the Jenkins build number

-
-status
- - -BuildStatus - - -
-

Status is the status of a Jenkins build

-
-retries
- -int - -
-

Retires is the amount of times a Jenkins job build retries

-
-createTime
- - -Kubernetes meta/v1.Time - - -
-

CreateTime is the time when the first build has been created

-
-lastUpdateTime
- - -Kubernetes meta/v1.Time - - -
-

LastUpdateTime is the last update status time

-
-

BuildStatus -(string alias)

-

-(Appears on: -Build) -

-

-

BuildStatus defines the type of Jenkins build job status

-

-

Container -

-

-(Appears on: -JenkinsMaster) -

-

-

Container defines the Kubernetes container attributes

-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldDescription
-name
- -string - -
-

Name of the container specified as a DNS_LABEL. -Each container in a pod must have a unique name (DNS_LABEL).

-
-image
- -string - -
-

Docker image name. -More info: https://kubernetes.io/docs/concepts/containers/images

-
-imagePullPolicy
- - -Kubernetes core/v1.PullPolicy - - -
-

Image pull policy. -One of Always, Never, IfNotPresent. -Defaults to Always.

-
-resources
- - -Kubernetes core/v1.ResourceRequirements - - -
-

Compute Resources required by this container. -More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/

-
-command
- -[]string - -
-(Optional) -

Entrypoint array. Not executed within a shell. -The docker image’s ENTRYPOINT is used if this is not provided. -Variable references $(VAR_NAME) are expanded using the container’s environment. If a variable -cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax -can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, -regardless of whether the variable exists or not. -More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell

-
-args
- -[]string - -
-(Optional) -

Arguments to the entrypoint. -The docker image’s CMD is used if this is not provided. -Variable references $(VAR_NAME) are expanded using the container’s environment. If a variable -cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax -can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, -regardless of whether the variable exists or not. -More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell

-
-workingDir
- -string - -
-(Optional) -

Container’s working directory. -If not specified, the container runtime’s default will be used, which -might be configured in the container image.

-
-ports
- - -[]Kubernetes core/v1.ContainerPort - - -
-(Optional) -

List of ports to expose from the container. Exposing a port here gives -the system additional information about the network connections a -container uses, but is primarily informational. Not specifying a port here -DOES NOT prevent that port from being exposed. Any port which is -listening on the default “0.0.0.0” address inside a container will be -accessible from the network.

-
-envFrom
- - -[]Kubernetes core/v1.EnvFromSource - - -
-(Optional) -

List of sources to populate environment variables in the container. -The keys defined within a source must be a C_IDENTIFIER. All invalid keys -will be reported as an event when the container is starting. When a key exists in multiple -sources, the value associated with the last source will take precedence. -Values defined by an Env with a duplicate key will take precedence.

-
-env
- - -[]Kubernetes core/v1.EnvVar - - -
-(Optional) -

List of environment variables to set in the container.

-
-volumeMounts
- - -[]Kubernetes core/v1.VolumeMount - - -
-(Optional) -

Pod volumes to mount into the container’s filesystem.

-
-livenessProbe
- - -Kubernetes core/v1.Probe - - -
-(Optional) -

Periodic probe of container liveness. -The container will be restarted if the probe fails.

-
-readinessProbe
- - -Kubernetes core/v1.Probe - - -
-(Optional) -

Periodic probe of container service readiness. -The container will be removed from service endpoints if the probe fails.

-
-lifecycle
- - -Kubernetes core/v1.Lifecycle - - -
-(Optional) -

Actions that the management system should take in response to container lifecycle events.

-
-securityContext
- - -Kubernetes core/v1.SecurityContext - - -
-(Optional) -

Security options the pod should run with. -More info: https://kubernetes.io/docs/concepts/policy/security-context/ -More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/

-
-

Handler -

-

-(Appears on: -Backup, -Restore) -

-

-

Handler defines a specific action that should be taken

-

- - - - - - - - - - - - - -
FieldDescription
-exec
- - -Kubernetes core/v1.ExecAction - - -
-

Exec specifies the action to take.

-
-

JenkinsCredentialType -(string alias)

-

-(Appears on: -SeedJob) -

-

-

JenkinsCredentialType defines type of Jenkins credential used in the seed job mechanism

-

-

JenkinsMaster -

-

-(Appears on: -JenkinsSpec) -

-

-

JenkinsMaster defines the Jenkins master pod attributes and plugins, -every single change requires a Jenkins master pod restart

-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldDescription
-masterAnnotations
- -map[string]string - -
-(Optional) -

Annotations is an unstructured key value map stored with a resource that may be -set by external tools to store and retrieve arbitrary metadata. They are not -queryable and should be preserved when modifying objects. -More info: http://kubernetes.io/docs/user-guide/annotations

-
-nodeSelector
- -map[string]string - -
-(Optional) -

NodeSelector is a selector which must be true for the pod to fit on a node. -Selector which must match a node’s labels for the pod to be scheduled on that node. -More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/

-
-securityContext
- - -Kubernetes core/v1.PodSecurityContext - - -
-(Optional) -

SecurityContext that applies to all the containers of the Jenkins -Master. As per kubernetes specification, it can be overridden -for each container individually. -Defaults to: -runAsUser: 1000 -fsGroup: 1000

-
-containers
- - -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Container - - -
-

List of containers belonging to the pod. -Containers cannot currently be added or removed. -There must be at least one container in a Pod. -Defaults to: -- image: jenkins/jenkins:lts -imagePullPolicy: Always -livenessProbe: -failureThreshold: 12 -httpGet: -path: /login -port: http -scheme: HTTP -initialDelaySeconds: 80 -periodSeconds: 10 -successThreshold: 1 -timeoutSeconds: 5 -name: jenkins-master -readinessProbe: -failureThreshold: 3 -httpGet: -path: /login -port: http -scheme: HTTP -initialDelaySeconds: 30 -periodSeconds: 10 -successThreshold: 1 -timeoutSeconds: 1 -resources: -limits: -cpu: 1500m -memory: 3Gi -requests: -cpu: “1” -memory: 600Mi

-
-volumes
- - -[]Kubernetes core/v1.Volume - - -
-(Optional) -

List of volumes that can be mounted by containers belonging to the pod. -More info: https://kubernetes.io/docs/concepts/storage/volumes

-
-basePlugins
- - -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Plugin - - -
-

BasePlugins contains plugins required by operator -Defaults to : -- name: kubernetes -version: 1.15.7 -- name: workflow-job -version: “2.32” -- name: workflow-aggregator -version: “2.6” -- name: git -version: 3.10.0 -- name: job-dsl -version: “1.74” -- name: configuration-as-code -version: “1.19” -- name: kubernetes-credentials-provider -version: 0.12.1

-
-plugins
- - -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Plugin - - -
-(Optional) -

Plugins contains plugins required by user

-
-

JenkinsSpec -

-

-(Appears on: -Jenkins) -

-

-

JenkinsSpec defines the desired state of the Jenkins

-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldDescription
-master
- - -JenkinsMaster - - -
-

Master represents the Jenkins master pod properties and Jenkins plugins. -Every single change here requires a pod restart.

-
-seedJobs
- - -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.SeedJob - - -
-(Optional) -

SeedJobs defines list of Jenkins Seed Job configurations -More info: https://github.com/jenkinsci/kubernetes-operator/blob/master/docs/getting-started.md#configure-seed-jobs-and-pipelines

-
-service
- - -Service - - -
-(Optional) -

Service is the Kubernetes service of the Jenkins master HTTP pod -Defaults to : -port: 8080 -type: ClusterIP

-
-slaveService
- - -Service - - -
-(Optional) -

Service is the Kubernetes service of the Jenkins slave pods -Defaults to : -port: 50000 -type: ClusterIP

-
-backup
- - -Backup - - -
-(Optional) -

Backup defines the configuration of the Jenkins backup -More info: https://github.com/jenkinsci/kubernetes-operator/blob/master/docs/getting-started.md#configure-backup-and-restore

-
-restore
- - -Restore - - -
-(Optional) -

Backup defines the configuration of the Jenkins backup restore -More info: https://github.com/jenkinsci/kubernetes-operator/blob/master/docs/getting-started.md#configure-backup-and-restore

-
-

JenkinsStatus -

-

-(Appears on: -Jenkins) -

-

-

JenkinsStatus defines the observed state of Jenkins

-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldDescription
-operatorVersion
- -string - -
-(Optional) -

OperatorVersion is the operator version which manages this CR

-
-provisionStartTime
- - -Kubernetes meta/v1.Time - - -
-(Optional) -

ProvisionStartTime is a time when the Jenkins master pod has been created

-
-baseConfigurationCompletedTime
- - -Kubernetes meta/v1.Time - - -
-(Optional) -

BaseConfigurationCompletedTime is a time when Jenkins base configuration phase has been completed

-
-userConfigurationCompletedTime
- - -Kubernetes meta/v1.Time - - -
-(Optional) -

UserConfigurationCompletedTime is a time when Jenkins user configuration phase has been completed

-
-builds
- - -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Build - - -
-(Optional) -

Builds contains the Jenkins builds statues

-
-restoredBackup
- -uint64 - -
-(Optional) -

RestoredBackup is the restored backup number after the Jenkins master pod restart

-
-lastBackup
- -uint64 - -
-(Optional) -

LastBackup is the latest backup number

-
-pendingBackup
- -uint64 - -
-(Optional) -

PendingBackup is the pending backup number

-
-backupDoneBeforePodDeletion
- -bool - -
-(Optional) -

BackupDoneBeforePodDeletion tells if a backup before pod deletion has been made

-
-userAndPasswordHash
- -string - -
-(Optional) -

UserAndPasswordHash is a SHA256 hash made from the username and password

-
-createdSeedJobs
- -[]string - -
-(Optional) -

CreatedSeedJobs contains list of seed job ids already created in Jenkins

-
-

Plugin -

-

-(Appears on: -JenkinsMaster) -

-

-

Plugin defines Jenkins plugin

-

- - - - - - - - - - - - - - - - - -
FieldDescription
-name
- -string - -
-

Name is the name of the Jenkins plugin

-
-version
- -string - -
-

Version is the version of the Jenkins plugin

-
-

Restore -

-

-(Appears on: -JenkinsSpec) -

-

-

Restore defines the configuration of a Jenkins backup restore operation

-

- - - - - - - - - - - - - - - - - - - - - -
FieldDescription
-containerName
- -string - -
-

ContainerName is the container name responsible for the restore backup operation

-
-action
- - -Handler - - -
-

Action defines action which performs the restore backup in a restore container sidecar

-
-recoveryOnce
- -uint64 - -
-(Optional) -

RecoveryOnce if you want to restore a specific backup, set this field, and then Jenkins will be restarted and the desired backup will be restored

-
-

SeedJob -

-

-(Appears on: -JenkinsSpec) -

-

-

SeedJob defines configuration for seed job -More info: https://github.com/jenkinsci/kubernetes-operator/blob/master/docs/getting-started.md#configure-seed-jobs-and-pipelines

-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldDescription
-id
- -string - -
-

ID is the unique seed job name

-
-credentialID
- -string - -
-

CredentialID is the Kubernetes secret name which stores repository access credentials

-
-description
- -string - -
-(Optional) -

Description is the description of the seed job

-
-targets
- -string - -
-

Targets is the repository path where the seed job definitions are

-
-repositoryBranch
- -string - -
-

RepositoryBranch is the repository branch where the seed job definitions are

-
-repositoryUrl
- -string - -
-

RepositoryURL is the repository access URL. Can be SSH or HTTPS.

-
-credentialType
- - -JenkinsCredentialType - - -
-(Optional) -

JenkinsCredentialType is the https://jenkinsci.github.io/kubernetes-credentials-provider-plugin/ credential type

-
-

Service -

-

-(Appears on: -JenkinsSpec) -

-

-

Service defines the Kubernetes service attributes

-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldDescription
-annotations
- -map[string]string - -
-(Optional) -

Annotations is an unstructured key value map stored with a resource that may be -set by external tools to store and retrieve arbitrary metadata. They are not -queryable and should be preserved when modifying objects. -More info: http://kubernetes.io/docs/user-guide/annotations

-
-labels
- -map[string]string - -
-

Route service traffic to pods with label keys and values matching this -selector. If empty or not present, the service is assumed to have an -external process managing its endpoints, which Kubernetes will not -modify. Only applies to types ClusterIP, NodePort, and LoadBalancer. -Ignored if type is ExternalName. -More info: https://kubernetes.io/docs/concepts/services-networking/service/

-
-type
- - -Kubernetes core/v1.ServiceType - - -
-(Optional) -

Type determines how the Service is exposed. Defaults to ClusterIP. Valid -options are ExternalName, ClusterIP, NodePort, and LoadBalancer. -“ExternalName” maps to the specified externalName. -“ClusterIP” allocates a cluster-internal IP address for load-balancing to -endpoints. Endpoints are determined by the selector or if that is not -specified, by manual construction of an Endpoints object. If clusterIP is -“None”, no virtual IP is allocated and the endpoints are published as a -set of endpoints rather than a stable IP. -“NodePort” builds on ClusterIP and allocates a port on every node which -routes to the clusterIP. -“LoadBalancer” builds on NodePort and creates an -external load-balancer (if supported in the current cloud) which routes -to the clusterIP. -More info: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services—service-types

-
-port
- -int32 - -
-

The port that is exposed by this service. -More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies

-
-nodePort
- -int32 - -
-(Optional) -

The port on each node on which this service is exposed when type=NodePort or LoadBalancer. -Usually assigned by the system. If specified, it will be allocated to the service, -if unused, or else creation of the service will fail. -Default is to auto-allocate a port if the ServiceType of this Service requires one. -More info: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport

-
-loadBalancerSourceRanges
- -[]string - -
-(Optional) -

If specified and supported by the platform, this will restrict traffic through the cloud-provider. -The load-balancer will be restricted to the specified client IPs. This field will be ignored if the -cloud-provider does not support the feature.” -More info: https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/

-
-loadBalancerIP
- -string - -
-(Optional) -

Only applies to Service Type: LoadBalancer -LoadBalancer will get created with the IP specified in this field. -This feature depends on whether the underlying cloud-provider supports specifying -the loadBalancerIP when a load balancer is created. -This field will be ignored if the cloud-provider does not support the feature.

-
-
-

-Generated with gen-crd-api-reference-docs -on git commit 37e531a. -

- - - -
Last modified August 5, 2019 -
-
- - -
-
-
- - - - -
- - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/docs/getting-started/v0.2.x/aks/index.html b/docs/docs/getting-started/v0.2.x/aks/index.html deleted file mode 100644 index d32cffb79..000000000 --- a/docs/docs/getting-started/v0.2.x/aks/index.html +++ /dev/null @@ -1,986 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -AKS | Jenkins Operator - - - - - - - - - - - - - - - - - - - - - - - - - - - - AKS | Jenkins Operator - - -
- - - -
-
-
-
-
- - - - - -
- - - - -
- - - - -
-
- - - - - - - - - - - -
-
- - - -
-

AKS

-
Additional configuration for Azure Kubernetes Service
-

Azure AKS managed Kubernetes service adds to every pod the following environment variables:

-
- name: KUBERNETES_PORT_443_TCP_ADDR
-  value:
-- name: KUBERNETES_PORT
-  value: tcp://
-- name: KUBERNETES_PORT_443_TCP
-  value: tcp://
-- name: KUBERNETES_SERVICE_HOST
-  value:
-

The operator is aware of it and omits these environment variables when checking if a Jenkins pod environment has been changed. It prevents the -restart of a Jenkins pod over and over again.

- - - -
Last modified August 5, 2019 -
-
- - -
-
-
- - - - -
- - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/docs/getting-started/v0.2.x/configuration/index.html b/docs/docs/getting-started/v0.2.x/configuration/index.html deleted file mode 100644 index 6c0d8bfcc..000000000 --- a/docs/docs/getting-started/v0.2.x/configuration/index.html +++ /dev/null @@ -1,1264 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Configuration | Jenkins Operator - - - - - - - - - - - - - - - - - - - - - - - - - - - - Configuration | Jenkins Operator - - -
- - - -
-
-
-
-
- - - - - -
- - - - -
- - - - -
- -
- - - -
-

Configuration

-
How to configure Jenkins with Operator
- - -

Configure Seed Jobs and Pipelines

- -

Jenkins operator uses job-dsl and kubernetes-credentials-provider plugins for configuring jobs -and deploy keys.

- -

Prepare job definitions and pipelines

- -

First you have to prepare pipelines and job definition in your GitHub repository using the following structure:

-
cicd/
-├── jobs
-│   └── build.jenkins
-└── pipelines
-    └── build.jenkins
-

cicd/jobs/build.jenkins is a job definition:

-
#!/usr/bin/env groovy
-
-pipelineJob('build-jenkins-operator') {
-    displayName('Build jenkins-operator')
-
-    definition {
-        cpsScm {
-            scm {
-                git {
-                    remote {
-                        url('https://github.com/jenkinsci/kubernetes-operator.git')
-                        credentials('jenkins-operator')
-                    }
-                    branches('*/master')
-                }
-            }
-            scriptPath('cicd/pipelines/build.jenkins')
-        }
-    }
-}
-

cicd/pipelines/build.jenkins is an actual Jenkins pipeline:

-
#!/usr/bin/env groovy
-
-def label = "build-jenkins-operator-${UUID.randomUUID().toString()}"
-def home = "/home/jenkins"
-def workspace = "${home}/workspace/build-jenkins-operator"
-def workdir = "${workspace}/src/github.com/jenkinsci/kubernetes-operator/"
-
-podTemplate(label: label,
-        containers: [
-                containerTemplate(name: 'jnlp', image: 'jenkins/inbound-agent:alpine'),
-                containerTemplate(name: 'go', image: 'golang:1-alpine', command: 'cat', ttyEnabled: true),
-        ],
-        envVars: [
-                envVar(key: 'GOPATH', value: workspace),
-        ],
-        ) {
-
-    node(label) {
-        dir(workdir) {
-            stage('Init') {
-                timeout(time: 3, unit: 'MINUTES') {
-                    checkout scm
-                }
-                container('go') {
-                    sh 'apk --no-cache --update add make git gcc libc-dev'
-                }
-            }
-
-            stage('Dep') {
-                container('go') {
-                    sh 'make dep'
-                }
-            }
-
-            stage('Test') {
-                container('go') {
-                    sh 'make test'
-                }
-            }
-
-            stage('Build') {
-                container('go') {
-                    sh 'make build'
-                }
-            }
-        }
-    }
-}
-

Configure Seed Jobs

- -

Jenkins Seed Jobs are configured using Jenkins.spec.seedJobs section from your custom resource manifest:

-
apiVersion: jenkins.io/v1alpha2
-kind: Jenkins
-metadata:
-  name: example
-spec:
-  seedJobs:
-  - id: jenkins-operator
-    targets: "cicd/jobs/*.jenkins"
-    description: "Jenkins Operator repository"
-    repositoryBranch: master
-    repositoryUrl: https://github.com/jenkinsci/kubernetes-operator.git
-

Jenkins Operator will automatically discover and configure all the seed jobs.

- -

You can verify if deploy keys were successfully configured in the Jenkins Credentials tab.

- -

jenkins

- -

You can verify if your pipelines were successfully configured in the Jenkins Seed Job console output.

- -

jenkins

- -

If your GitHub repository is private you have to configure SSH or username/password authentication.

- -

SSH authentication

- -

Generate SSH Keys

- -

There are two methods of SSH private key generation:

-
$ openssl genrsa -out <filename> 2048
-

or

-
$ ssh-keygen -t rsa -b 2048
-$ ssh-keygen -p -f <filename> -m pem
-

Then copy content from generated file.

- -

Public key

- -

If you want to upload your public key to your Git server you need to extract it.

- -

If key was generated by openssl then you need to type this to extract public key:

-
$ openssl rsa -in <filename> -pubout > <filename>.pub
-

If key was generated by ssh-keygen the public key content is located in .pub and there is no need to extract public key

- -

Configure SSH authentication

- -

Configure a seed job like this:

-
apiVersion: jenkins.io/v1alpha2
-kind: Jenkins
-metadata:
-  name: example
-spec:
-  seedJobs:
-  - id: jenkins-operator-ssh
-    credentialType: basicSSHUserPrivateKey
-    credentialID: k8s-ssh
-    targets: "cicd/jobs/*.jenkins"
-    description: "Jenkins Operator repository"
-    repositoryBranch: master
-    repositoryUrl: git@github.com:jenkinsci/kubernetes-operator.git
-

and create a Kubernetes Secret (name of secret should be the same from credentialID field):

-
apiVersion: v1
-kind: Secret
-metadata:
-  name: k8s-ssh
-stringData:
-  privateKey: |
-    -----BEGIN RSA PRIVATE KEY-----
-    MIIJKAIBAAKCAgEAxxDpleJjMCN5nusfW/AtBAZhx8UVVlhhhIKXvQ+dFODQIdzO
-    oDXybs1zVHWOj31zqbbJnsfsVZ9Uf3p9k6xpJ3WFY9b85WasqTDN1xmSd6swD4N8
-    ...
-  username: github_user_name
-

Username & password authentication

- -

Configure the seed job like:

-
apiVersion: jenkins.io/v1alpha2
-kind: Jenkins
-metadata:
-  name: example
-spec:
-  seedJobs:
-  - id: jenkins-operator-user-pass
-    credentialType: usernamePassword
-    credentialID: k8s-user-pass
-    targets: "cicd/jobs/*.jenkins"
-    description: "Jenkins Operator repository"
-    repositoryBranch: master
-    repositoryUrl: https://github.com/jenkinsci/kubernetes-operator.git
-

and create a Kubernetes Secret (name of secret should be the same from credentialID field):

-
apiVersion: v1
-kind: Secret
-metadata:
-  name: k8s-user-pass
-stringData:
-  username: github_user_name
-  password: password_or_token
-

HTTP Proxy for downloading plugins

- -

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.:

-
spec:
-  master:
-    containers:
-      - name: jenkins-master
-        env:
-          - name: CURL_OPTIONS
-            value: -L -x <proxy_url>
-

In CURL_OPTIONS var you can set additional arguments to curl command.

- -

Pulling Docker images from private repositories

- -

To pull a Docker Image from private repository you can use imagePullSecrets.

- -

Please follow the instructions on creating a secret with a docker config.

- -

Docker Hub Configuration

- -

To use Docker Hub additional steps are required.

- -

Edit the previously created secret:

-
kubectl -n <namespace> edit secret <name>
-

The .dockerconfigjson key’s value needs to be replaced with a modified version.

- -

After modifications, it needs to be encoded as a Base64 value before setting the .dockerconfigjson key.

- -

Example config file to modify and use:

-
{
-    "auths":{
-        "https://index.docker.io/v1/":{
-            "username":"user",
-            "password":"password",
-            "email":"yourdockeremail@gmail.com",
-            "auth":"base64 of string user:password"
-        },
-        "auth.docker.io":{
-            "username":"user",
-            "password":"password",
-            "email":"yourdockeremail@gmail.com",
-            "auth":"base64 of string user:password"
-        },
-        "registry.docker.io":{
-            "username":"user",
-            "password":"password",
-            "email":"yourdockeremail@gmail.com",
-            "auth":"base64 of string user:password"
-        },
-        "docker.io":{
-            "username":"user",
-            "password":"password",
-            "email":"yourdockeremail@gmail.com",
-            "auth":"base64 of string user:password"
-        },
-        "https://registry-1.docker.io/v2/": {
-            "username":"user",
-            "password":"password",
-            "email":"yourdockeremail@gmail.com",
-            "auth":"base64 of string user:password"
-        },
-        "registry-1.docker.io/v2/": {
-            "username":"user",
-            "password":"password",
-            "email":"yourdockeremail@gmail.com",
-            "auth":"base64 of string user:password"
-        },
-        "registry-1.docker.io": {
-            "username":"user",
-            "password":"password",
-            "email":"yourdockeremail@gmail.com",
-            "auth":"base64 of string user:password"
-        },
-        "https://registry-1.docker.io": {
-            "username":"user",
-            "password":"password",
-            "email":"yourdockeremail@gmail.com",
-            "auth":"base64 of string user:password"
-        }
-    }
-}
- - -
Last modified August 5, 2019 -
-
- - -
-
-
- - - - -
- - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/docs/getting-started/v0.2.x/configure-backup-and-restore/index.html b/docs/docs/getting-started/v0.2.x/configure-backup-and-restore/index.html deleted file mode 100644 index 54746ef0c..000000000 --- a/docs/docs/getting-started/v0.2.x/configure-backup-and-restore/index.html +++ /dev/null @@ -1,1062 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Configure backup and restore | Jenkins Operator - - - - - - - - - - - - - - - - - - - - - - - - - - - - Configure backup and restore | Jenkins Operator - - -
- - - -
-
-
-
-
- - - - - -
- - - - -
- - - - -
-
- - - - - - - - - - - - - - - -
-
- - - -
-

Configure backup and restore

-
Prevent loss of job history
- - -

Backup and restore is done by a container sidecar.

- -

PVC

- -

Create PVC

- -

Save to the file named pvc.yaml:

-
apiVersion: v1
-kind: PersistentVolumeClaim
-metadata:
-  name: <pvc_name>
-  namespace: <namespace>
-spec:
-  accessModes:
-  - ReadWriteOnce
-  resources:
-    requests:
-      storage: 500Gi
-

Run the following command:

-
$ kubectl -n <namespace> create -f pvc.yaml
-

Configure Jenkins CR

-
apiVersion: jenkins.io/v1alpha2
-kind: Jenkins
-metadata:
-  name: <cr_name>
-  namespace: <namespace>
-spec:
-  master:
-    securityContext:
-      runAsUser: 1000
-      fsGroup: 1000
-    containers:
-    - name: jenkins-master
-      image: jenkins/jenkins:lts
-    - name: backup # container responsible for the backup and restore
-      env:
-      - name: BACKUP_DIR
-        value: /backup
-      - name: JENKINS_HOME
-        value: /jenkins-home
-      - name: BACKUP_COUNT
-        value: "3" # keep only the 2 most recent backups
-      image: virtuslab/jenkins-operator-backup-pvc:v0.0.8 # look at backup/pvc directory
-      imagePullPolicy: IfNotPresent
-      volumeMounts:
-      - mountPath: /jenkins-home # Jenkins home volume
-        name: jenkins-home
-      - mountPath: /backup # backup volume
-        name: backup
-    volumes:
-    - name: backup # PVC volume where backups will be stored
-      persistentVolumeClaim:
-        claimName: <pvc_name>
-  backup:
-    containerName: backup # container name is responsible for backup
-    action:
-      exec:
-        command:
-        - /home/user/bin/backup.sh # this command is invoked on "backup" container to make backup, for example /home/user/bin/backup.sh <backup_number>, <backup_number> is passed by operator
-    interval: 30 # how often make backup in seconds
-    makeBackupBeforePodDeletion: true # make a backup before pod deletion
-  restore:
-    containerName: backup # container name is responsible for restore backup
-    action:
-      exec:
-        command:
-        - /home/user/bin/restore.sh # this command is invoked on "backup" container to make restore backup, for example /home/user/bin/restore.sh <backup_number>, <backup_number> is passed by operator
-    #recoveryOnce: <backup_number> # if want to restore specific backup configure this field and then Jenkins will be restarted and desired backup will be restored
- - -
Last modified August 5, 2019 -
-
- - -
-
-
- - - - -
- - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/docs/getting-started/v0.2.x/custom-backup-and-restore/index.html b/docs/docs/getting-started/v0.2.x/custom-backup-and-restore/index.html deleted file mode 100644 index b2403778e..000000000 --- a/docs/docs/getting-started/v0.2.x/custom-backup-and-restore/index.html +++ /dev/null @@ -1,1158 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Custom Backup and Restore Providers | Jenkins Operator - - - - - - - - - - - - - - - - - - - - - - - - - - - - Custom Backup and Restore Providers | Jenkins Operator - - -
- - - -
-
-
-
-
- - - - - -
- - - - -
- - - - -
- -
- - - -
-

Custom Backup and Restore Providers

-
Custom backup and restore provider
- - -

With enough effort one can create a custom backup and restore provider -for the Jenkins Operator.

- -

Requirements

- -

Two commands (e.g. scripts) are required:

- -
    -
  • a backup command, e.g. backup.sh that takes one argument, a backup number
  • -
  • a restore command, e.g. backup.sh that takes one argument, a backup number
  • -
- -

Both scripts need to return an exit code of 0 on success and 1 or greater for failure.

- -

One of those scripts (or the entry point of the container) needs to be responsible -for backup cleanup or rotation if required, or an external system.

- -

How it works

- -

The mechanism relies on basic Kubernetes and UNIX functionalities.

- -

The backup (and restore) container runs as a sidecar in the same -Kubernetes pod as the Jenkins master.

- -

Name of the backup and restore containers can be set as necessary using -spec.backup.containerName and spec.restore.containerName. -In most cases it will be the same container, but we allow for less common use cases.

- -

The operator will call a backup or restore commands inside a sidecar container when necessary:

- -
    -
  • backup command (defined in spec.backup.action.exec.command) -will be called every N seconds configurable in: spec.backup.interval -and on pod shutdown (if enabled in spec.backup.makeBackupBeforePodDeletion) -with an integer representing the current backup number as first and only argument
  • -
  • restore command (defined in spec.restore.action.exec.command) -will be called at Jenkins startup -with an integer representing the backup number to restore as first and only argument -(can be overridden using spec.restore.recoveryOnce)
  • -
- -

Example AWS S3 backup using the CLI

- -

This example shows abbreviated version of a simple AWS S3 backup implementation -using: aws-cli, bash and kube2iam.

- -

In addition to your normal Jenkins CustomResource some additional settings -for backup and restore are required, e.g.:

-
kind: Jenkins
-apiVersion: jenkins.io/v1alpha1
-metadata:
-  name: example
-  namespace: jenkins
-spec:
-  master:
-    masterAnnotations:
-      iam.amazonaws.com/role: "my-example-backup-role" # tell kube2iam where the AWS IAM role is
-    containers:
-      - name: jenkins-master
-        ...
-      - name: backup # container responsible for backup and restore
-        image: quay.io/virtuslab/aws-cli:1.16.263-2
-        workingDir: /home/user/bin/
-        command: # our container entry point
-          - sleep
-          - infinity
-        env:
-          - name: BACKUP_BUCKET
-            value: my-example-bucket # the S3 bucket name to use
-          - name: BACKUP_PATH
-            value: my-backup-path # the S3 bucket path prefix to use
-          - name: JENKINS_HOME
-            value: /jenkins-home # the path to mount jenkins home dir in the backup container
-        volumeMounts:
-          - mountPath: /jenkins-home # Jenkins home volume
-            name: jenkins-home
-          - mountPath: /home/user/bin/backup.sh
-            name: backup-scripts
-            subPath: backup.sh
-            readOnly: true
-          - mountPath: /home/user/bin/restore.sh
-            name: backup-scripts
-            subPath: restore.sh
-            readOnly: true
-    volumes:
-      - name: backup-scripts
-        configMap:
-          defaultMode: 0754
-          name: jenkins-operator-backup-s3
-    securityContext: # make sure both containers use the same UID and GUID
-      runAsUser: 1000
-      fsGroup: 1000
-  ...
-  backup:
-    containerName: backup # container name responsible for backup
-    interval: 3600 # how often make a backup in seconds
-    makeBackupBeforePodDeletion: true # trigger backup just before deleting the pod
-    action:
-      exec:
-        command:
-          # this command is invoked on "backup" container to create a backup,
-          # <backup_number> is passed by operator,
-          # for example /home/user/bin/backup.sh <backup_number>
-          - /home/user/bin/backup.sh
-  restore:
-    containerName: backup # container name is responsible for restore backup
-    action:
-      exec:
-        command:
-          # this command is invoked on "backup" container to restore a backup,
-          # <backup_number> is passed by operator
-          # for example /home/user/bin/restore.sh <backup_number>
-          - /home/user/bin/restore.sh
-#    recoveryOnce: <backup_number> # if want to restore specific backup configure this field and then Jenkins will be restarted and desired backup will be restored
-

The actual backup and restore scripts will be provided in a ConfigMap:

-
kind: ConfigMap
-apiVersion: v1
-metadata:
-  name: jenkins-operator-backup-s3
-  namespace: jenkins
-  labels:
-    app: jenkins-operator
-data:
-  backup.sh: |-
-    #!/bin/bash -xeu
-    [[ ! $# -eq 1 ]] && echo "Usage: $0 backup_number" && exit 1;
-    [[ -z "${BACKUP_BUCKET}" ]] && echo "Required 'BACKUP_BUCKET' env not set" && exit 1;
-    [[ -z "${BACKUP_PATH}" ]] && echo "Required 'BACKUP_PATH' env not set" && exit 1;
-    [[ -z "${JENKINS_HOME}" ]] && echo "Required 'JENKINS_HOME' env not set" && exit 1;
-
-    backup_number=$1
-    echo "Running backup #${backup_number}"
-
-    BACKUP_TMP_DIR=$(mktemp -d)
-    tar -C ${JENKINS_HOME} -czf "${BACKUP_TMP_DIR}/${backup_number}.tar.gz" --exclude jobs/*/workspace* -c jobs && \
-
-    aws s3 cp ${BACKUP_TMP_DIR}/${backup_number}.tar.gz s3://${BACKUP_BUCKET}/${BACKUP_PATH}/${backup_number}.tar.gz
-    echo Done
-
-  restore.sh: |-
-    #!/bin/bash -xeu
-    [[ ! $# -eq 1 ]] && echo "Usage: $0 backup_number" && exit 1
-    [[ -z "${BACKUP_BUCKET}" ]] && echo "Required 'BACKUP_BUCKET' env not set" && exit 1;
-    [[ -z "${BACKUP_PATH}" ]] && echo "Required 'BACKUP_PATH' env not set" && exit 1;
-    [[ -z "${JENKINS_HOME}" ]] && echo "Required 'JENKINS_HOME' env not set" && exit 1;
-
-    backup_number=$1
-    echo "Running restore #${backup_number}"
-
-    BACKUP_TMP_DIR=$(mktemp -d)
-    aws s3 cp s3://${BACKUP_BUCKET}/${BACKUP_PATH}/${backup_number}.tar.gz ${BACKUP_TMP_DIR}/${backup_number}.tar.gz
-
-    tar -C ${JENKINS_HOME} -zxf "${BACKUP_TMP_DIR}/${backup_number}.tar.gz"
-    echo Done
-

In our example we will use S3 bucket lifecycle policy to keep -the number of backups under control, e.g. Cloud Formation fragment:

-
    Type: AWS::S3::Bucket
-    Properties:
-      BucketName: my-example-bucket
-      ...
-      LifecycleConfiguration:
-        Rules:
-          - Id: BackupCleanup
-            Status: Enabled
-            Prefix: my-backup-path
-            ExpirationInDays: 7
-            NoncurrentVersionExpirationInDays: 14
-            AbortIncompleteMultipartUpload:
-              DaysAfterInitiation: 3
- - -
Last modified August 5, 2019 -
-
- - -
-
-
- - - - -
- - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/docs/getting-started/v0.2.x/customization/index.html b/docs/docs/getting-started/v0.2.x/customization/index.html deleted file mode 100644 index 4f8573fda..000000000 --- a/docs/docs/getting-started/v0.2.x/customization/index.html +++ /dev/null @@ -1,1138 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Customization | Jenkins Operator - - - - - - - - - - - - - - - - - - - - - - - - - - - - Customization | Jenkins Operator - - -
- - - -
-
-
-
-
- - - - - -
- - - - -
- - - - -
-
- - - - - - - - - - - - - - - -
-
- - - -
-

Customization

-
How to customize Jenkins
- - -

Jenkins can be customized using groovy scripts or the configuration as code plugin. -By using a ConfigMap you can create your own Jenkins customized configuration. -Then you must reference the ConfigMap in the Jenkins pod customization file in spec.groovyScripts or spec.configurationAsCode

- -

For example create a ConfigMap with name jenkins-operator-user-configuration. Then, modify the Jenkins manifest to look like this:

-
apiVersion: jenkins.io/v1alpha2
-kind: Jenkins
-metadata:
-  name: example
-spec:
-  configurationAsCode:
-    configurations: 
-    - name: jenkins-operator-user-configuration
-  groovyScripts:
-    configurations:
-    - name: jenkins-operator-user-configuration
-

Here is an example of jenkins-operator-user-configuration:

-
apiVersion: v1
-kind: ConfigMap
-metadata:
-  name: jenkins-operator-user-configuration
-data:
-  1-configure-theme.groovy: | 
-    import jenkins.*
-    import jenkins.model.*
-    import hudson.*
-    import hudson.model.*
-    import org.jenkinsci.plugins.simpletheme.ThemeElement
-    import org.jenkinsci.plugins.simpletheme.CssTextThemeElement
-    import org.jenkinsci.plugins.simpletheme.CssUrlThemeElement
-
-    Jenkins jenkins = Jenkins.getInstance()
-
-    def decorator = Jenkins.instance.getDescriptorByType(org.codefirst.SimpleThemeDecorator.class)
-
-    List<ThemeElement> configElements = new ArrayList<>();
-    configElements.add(new CssTextThemeElement("DEFAULT"));
-    configElements.add(new CssUrlThemeElement("https://cdn.rawgit.com/afonsof/jenkins-material-theme/gh-pages/dist/material-light-green.css"));
-    decorator.setElements(configElements);
-    decorator.save();
-
-    jenkins.save()
-  1-system-message.yaml: |
-    jenkins:
-      systemMessage: "Configuration as Code integration works!!!"
-
    -
  • *.groovy is Groovy script configuration
  • -
  • *.yaml is configuration as code
  • -
- -

If you want to correct your configuration you can edit it while the Jenkins Operator is running. -Jenkins will reconcile and apply the new configuration.

- -

Using secrets from a Groovy script

- -

If you configured spec.groovyScripts.secret.name, then this secret is available to use from map Groovy scripts. -The secrets are loaded to secrets map.

- -

Create a secret with for example the name jenkins-conf-secrets.

-
kind: Secret
-apiVersion: v1
-type: Opaque
-metadata:
-  name: jenkins-conf-secrets
-  namespace: default
-data:
-  SYSTEM_MESSAGE: SGVsbG8gd29ybGQ=
-

Then modify the Jenkins pod manifest by changing spec.groovyScripts.secret.name to jenkins-conf-secrets.

-
apiVersion: jenkins.io/v1alpha2
-kind: Jenkins
-metadata:
-  name: example
-spec:
-  configurationAsCode:
-    configurations: 
-    - name: jenkins-operator-user-configuration
-    secret:
-      name: jenkins-conf-secrets
-  groovyScripts:
-    configurations:
-    - name: jenkins-operator-user-configuration
-    secret:
-      name: jenkins-conf-secrets
-

Now you can test that the secret is mounted by applying this ConfigMap for Groovy script:

-
apiVersion: v1
-kind: ConfigMap
-metadata:
-  name: jenkins-operator-user-configuration
-data:
-  1-system-message.groovy: | 
-    import jenkins.*
-    import jenkins.model.*
-    import hudson.*
-    import hudson.model.*
-    Jenkins jenkins = Jenkins.getInstance()
-    
-    jenkins.setSystemMessage(secrets["SYSTEM_MESSAGE"])
-    jenkins.save()
-

Or by applying this configuration as code:

-
apiVersion: v1
-kind: ConfigMap
-metadata:
-  name: jenkins-operator-user-configuration
-data:
-  1-system-message.yaml: |
-    jenkins:
-      systemMessage: ${SYSTEM_MESSAGE}
-

After this, you should see the Hello world system message from the Jenkins homepage.

- -

Install Plugins

- -

Edit Custom Resource under spec.master.plugins:

-
apiVersion: jenkins.io/v1alpha2
-kind: Jenkins
-metadata:
-  name: example
-spec:
-  master:
-   plugins:
-   - name: simple-theme-plugin
-     version: 0.5.1
-

Under spec.master.basePlugins you can find plugins for a valid Jenkins Operator:

-
apiVersion: jenkins.io/v1alpha2
-kind: Jenkins
-metadata:
-  name: example
-spec:
-  master:
-    basePlugins:
-    - name: kubernetes
-      version: 1.18.3
-    - name: workflow-job
-      version: "2.34"
-    - name: workflow-aggregator
-      version: "2.6"
-    - name: git
-      version: 3.12.0
-    - name: job-dsl
-      version: "1.76"
-    - name: configuration-as-code
-      version: "1.29"
-    - name: kubernetes-credentials-provider
-      version: 0.12.1
-

You can change their versions.

- -

The Jenkins Operator will then automatically install plugins after the Jenkins master pod restarts.

- - - -
Last modified August 5, 2019 -
-
- - -
-
-
- - - - -
- - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/docs/getting-started/v0.2.x/deploy-jenkins/index.html b/docs/docs/getting-started/v0.2.x/deploy-jenkins/index.html deleted file mode 100644 index e82a4ecaa..000000000 --- a/docs/docs/getting-started/v0.2.x/deploy-jenkins/index.html +++ /dev/null @@ -1,1033 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Deploy Jenkins | Jenkins Operator - - - - - - - - - - - - - - - - - - - - - - - - - - - - Deploy Jenkins | Jenkins Operator - - -
- - - -
-
-
-
-
- - - - - -
- - - - -
- - - - -
-
- - - - - - - - - - - -
-
- - - -
-

Deploy Jenkins

-
Deploy production ready Jenkins Operator manifest
-

Once Jenkins Operator is up and running let’s deploy actual Jenkins instance. -Create manifest e.g. jenkins_instance.yaml with following data and save it on drive.

-
apiVersion: jenkins.io/v1alpha2
-kind: Jenkins
-metadata:
-  name: example
-spec:
-  master:
-    containers:
-    - name: jenkins-master
-      image: jenkins/jenkins:lts
-      imagePullPolicy: Always
-      livenessProbe:
-        failureThreshold: 12
-        httpGet:
-          path: /login
-          port: http
-          scheme: HTTP
-        initialDelaySeconds: 80
-        periodSeconds: 10
-        successThreshold: 1
-        timeoutSeconds: 5
-      readinessProbe:
-        failureThreshold: 3
-        httpGet:
-          path: /login
-          port: http
-          scheme: HTTP
-        initialDelaySeconds: 30
-        periodSeconds: 10
-        successThreshold: 1
-        timeoutSeconds: 1
-      resources:
-        limits:
-          cpu: 1500m
-          memory: 3Gi
-        requests:
-          cpu: "1"
-          memory: 500Mi
-  seedJobs:
-  - id: jenkins-operator
-    targets: "cicd/jobs/*.jenkins"
-    description: "Jenkins Operator repository"
-    repositoryBranch: master
-    repositoryUrl: https://github.com/jenkinsci/kubernetes-operator.git
-

Deploy a Jenkins to Kubernetes:

-
kubectl create -f jenkins_instance.yaml
-

Watch the Jenkins instance being created:

-
kubectl get pods -w
-

Get the Jenkins credentials:

-
kubectl get secret jenkins-operator-credentials-<cr_name> -o 'jsonpath={.data.user}' | base64 -d
-kubectl get secret jenkins-operator-credentials-<cr_name> -o 'jsonpath={.data.password}' | base64 -d
-

Connect to the Jenkins instance (minikube):

-
minikube service jenkins-operator-http-<cr_name> --url
-

Connect to the Jenkins instance (actual Kubernetes cluster):

-
kubectl port-forward jenkins-<cr_name> 8080:8080
-

Then open browser with address http://localhost:8080. -jenkins

- - - -
Last modified August 5, 2019 -
-
- - -
-
-
- - - - -
- - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/docs/getting-started/v0.2.x/diagnostics/index.html b/docs/docs/getting-started/v0.2.x/diagnostics/index.html deleted file mode 100644 index e3ddbc1a5..000000000 --- a/docs/docs/getting-started/v0.2.x/diagnostics/index.html +++ /dev/null @@ -1,991 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Diagnostics | Jenkins Operator - - - - - - - - - - - - - - - - - - - - - - - - - - - - Diagnostics | Jenkins Operator - - -
- - - -
-
-
-
-
- - - - - -
- - - - -
- - - - -
-
- - - - - - - - - - - - - -
-
- - - -
-

Diagnostics

-
How to deal with Jenkins Operator problems
- - -

Turn on debug in Jenkins Operator deployment:

-
sed -i 's|\(args:\).*|\1\ ["--debug"\]|' deploy/operator.yaml
-kubectl apply -f deploy/operator.yaml
-

Watch Kubernetes events:

-
kubectl get events --sort-by='{.lastTimestamp}'
-

Verify Jenkins master logs:

-
kubectl logs -f jenkins-<cr_name>
-

Verify the jenkins-operator logs:

-
kubectl logs deployment/jenkins-operator
-

Troubleshooting

- -

Delete the Jenkins master pod and wait for the new one to come up:

-
kubectl delete pod jenkins-<cr_name>
- - -
Last modified August 5, 2019 -
-
- - -
-
-
- - - - -
- - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/docs/getting-started/v0.2.x/index.html b/docs/docs/getting-started/v0.2.x/index.html deleted file mode 100644 index 97f1841fe..000000000 --- a/docs/docs/getting-started/v0.2.x/index.html +++ /dev/null @@ -1,1226 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - -v0.2.x | Jenkins Operator - - - - - - - - - - - - - - - - - - - - v0.2.x | Jenkins Operator - - -
- - - -
-
-
-
-
- - - - - -
- - - - -
- - - - -
-
- - - - - - - - - - - - - -
-
- - - -
-

v0.2.x

-
How to work with Jenkins Operator 0.2.x version. We recommend migrating to a newer version.
- - - - -
-

This document describes a getting started guide for Jenkins Operator v0.2.x and also additional configuration.

- -
- - -

First Steps

- -

Prepare your Kubernetes cluster and set up your kubectl access.

- -

Once you have running Kubernetes cluster you can focus on installing Jenkins Operator according to the Installation guide.

- -
- - - - -
- - - - - - - - - - - - - - - - - - - - - - -
-
- Deploy Jenkins -
-

Deploy production ready Jenkins Operator manifest -

-
- - - - - - - - - - - - - - - - - - - -
-
- Configuration -
-

How to configure Jenkins with Operator -

-
- - - - - - - - - - - - - - - - - - - -
-
- Customization -
-

How to customize Jenkins -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- AKS -
-

Additional configuration for Azure Kubernetes Service -

-
- - - - - -
-
- Configure backup and restore -
-

Prevent loss of job history -

-
- - - -
-
- Custom Backup and Restore Providers -
-

Custom backup and restore provider -

-
- - - - - -
-
- Migration from v0.1.x -
-

How to migrate from v0.1.x to v0.2.x -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- Diagnostics -
-

How to deal with Jenkins Operator problems -

-
- - - -
-
- Schema -
-

API Schema definitions for Jenkins CRD -

-
- - - - - - - -
- - - -
Last modified August 19, 2021 -
-
- -
-
-
- - - - -
- - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/docs/getting-started/v0.2.x/index.xml b/docs/docs/getting-started/v0.2.x/index.xml deleted file mode 100644 index 8a723ce03..000000000 --- a/docs/docs/getting-started/v0.2.x/index.xml +++ /dev/null @@ -1,2894 +0,0 @@ - - - Jenkins Operator – v0.2.x - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.2.x/ - Recent Hugo news from gohugo.io - Hugo -- gohugo.io - Thu, 19 Aug 2021 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/img/hugo.png - GoHugo.io - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.2.x/ - - - - - - - - - - - - Docs: Deploy Jenkins - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.2.x/deploy-jenkins/ - Mon, 05 Aug 2019 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.2.x/deploy-jenkins/ - - - - <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: - name: example -spec: - master: - containers: - - name: jenkins-master - image: jenkins/jenkins:lts - imagePullPolicy: Always - livenessProbe: - failureThreshold: <span style="color:#0000cf;font-weight:bold">12</span> - httpGet: - path: /login - port: http - scheme: HTTP - initialDelaySeconds: <span style="color:#0000cf;font-weight:bold">80</span> - periodSeconds: <span style="color:#0000cf;font-weight:bold">10</span> - successThreshold: <span style="color:#0000cf;font-weight:bold">1</span> - timeoutSeconds: <span style="color:#0000cf;font-weight:bold">5</span> - readinessProbe: - failureThreshold: <span style="color:#0000cf;font-weight:bold">3</span> - httpGet: - path: /login - port: http - scheme: HTTP - initialDelaySeconds: <span style="color:#0000cf;font-weight:bold">30</span> - periodSeconds: <span style="color:#0000cf;font-weight:bold">10</span> - successThreshold: <span style="color:#0000cf;font-weight:bold">1</span> - timeoutSeconds: <span style="color:#0000cf;font-weight:bold">1</span> - resources: - limits: - cpu: 1500m - memory: 3Gi - requests: - cpu: <span style="color:#4e9a06">&#34;1&#34;</span> - memory: 500Mi - seedJobs: - - id: jenkins-operator - targets: <span style="color:#4e9a06">&#34;cicd/jobs/*.jenkins&#34;</span> - description: <span style="color:#4e9a06">&#34;Jenkins Operator repository&#34;</span> - repositoryBranch: master - repositoryUrl: https://github.com/jenkinsci/kubernetes-operator.git</code></pre></div> -<p>Deploy a Jenkins to 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> -<p>Get the Jenkins credentials:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl get secret jenkins-operator-credentials-&lt;cr_name&gt; -o <span style="color:#4e9a06">&#39;jsonpath={.data.user}&#39;</span> <span style="color:#000;font-weight:bold">|</span> base64 -d -kubectl get secret jenkins-operator-credentials-&lt;cr_name&gt; -o <span style="color:#4e9a06">&#39;jsonpath={.data.password}&#39;</span> <span style="color:#000;font-weight:bold">|</span> base64 -d</code></pre></div> -<p>Connect to the Jenkins instance (minikube):</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">minikube service jenkins-operator-http-&lt;cr_name&gt; --url</code></pre></div> -<p>Connect to the Jenkins instance (actual Kubernetes cluster):</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl port-forward jenkins-&lt;cr_name&gt; 8080:8080</code></pre></div> -<p>Then open browser with address <code>http://localhost:8080</code>. -<img src="https://jenkinsci.github.io/kubernetes-operator/img/jenkins.png" alt="jenkins" /></p> - - - - - - Docs: Configuration - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.2.x/configuration/ - Mon, 05 Aug 2019 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.2.x/configuration/ - - - - - -<h2 id="configure-seed-jobs-and-pipelines">Configure Seed Jobs and Pipelines</h2> - -<p>Jenkins operator uses <a href="https://github.com/jenkinsci/job-dsl-plugin">job-dsl</a> and <a href="https://jenkinsci.github.io/kubernetes-credentials-provider-plugin/">kubernetes-credentials-provider</a> plugins for configuring jobs -and deploy keys.</p> - -<h2 id="prepare-job-definitions-and-pipelines">Prepare job definitions and pipelines</h2> - -<p>First you have to prepare pipelines and job definition in your GitHub repository using the following structure:</p> -<pre><code>cicd/ -├── jobs -│   └── build.jenkins -└── pipelines - └── build.jenkins</code></pre> -<p><strong><code>cicd/jobs/build.jenkins</code></strong> is a job definition:</p> -<pre><code>#!/usr/bin/env groovy - -pipelineJob('build-jenkins-operator') { - displayName('Build jenkins-operator') - - definition { - cpsScm { - scm { - git { - remote { - url('https://github.com/jenkinsci/kubernetes-operator.git') - credentials('jenkins-operator') - } - branches('*/master') - } - } - scriptPath('cicd/pipelines/build.jenkins') - } - } -}</code></pre> -<p><strong><code>cicd/pipelines/build.jenkins</code></strong> is an actual Jenkins pipeline:</p> -<pre><code>#!/usr/bin/env groovy - -def label = "build-jenkins-operator-${UUID.randomUUID().toString()}" -def home = "/home/jenkins" -def workspace = "${home}/workspace/build-jenkins-operator" -def workdir = "${workspace}/src/github.com/jenkinsci/kubernetes-operator/" - -podTemplate(label: label, - containers: [ - containerTemplate(name: 'jnlp', image: 'jenkins/inbound-agent:alpine'), - containerTemplate(name: 'go', image: 'golang:1-alpine', command: 'cat', ttyEnabled: true), - ], - envVars: [ - envVar(key: 'GOPATH', value: workspace), - ], - ) { - - node(label) { - dir(workdir) { - stage('Init') { - timeout(time: 3, unit: 'MINUTES') { - checkout scm - } - container('go') { - sh 'apk --no-cache --update add make git gcc libc-dev' - } - } - - stage('Dep') { - container('go') { - sh 'make dep' - } - } - - stage('Test') { - container('go') { - sh 'make test' - } - } - - stage('Build') { - container('go') { - sh 'make build' - } - } - } - } -}</code></pre> -<h2 id="configure-seed-jobs">Configure Seed Jobs</h2> - -<p>Jenkins Seed Jobs are configured using <code>Jenkins.spec.seedJobs</code> section from your custom resource manifest:</p> -<pre><code>apiVersion: jenkins.io/v1alpha2 -kind: Jenkins -metadata: - name: example -spec: - seedJobs: - - id: jenkins-operator - targets: "cicd/jobs/*.jenkins" - description: "Jenkins Operator repository" - repositoryBranch: master - repositoryUrl: https://github.com/jenkinsci/kubernetes-operator.git</code></pre> -<p><strong>Jenkins Operator</strong> will automatically discover and configure all the seed jobs.</p> - -<p>You can verify if deploy keys were successfully configured in the Jenkins <strong>Credentials</strong> tab.</p> - -<p><img src="https://jenkinsci.github.io/kubernetes-operator/kubernetes-operator/img/jenkins-credentials.png" alt="jenkins" /></p> - -<p>You can verify if your pipelines were successfully configured in the Jenkins Seed Job console output.</p> - -<p><img src="https://jenkinsci.github.io/kubernetes-operator/kubernetes-operator/img/jenkins-seed.png" alt="jenkins" /></p> - -<p>If your GitHub repository is <strong>private</strong> you have to configure SSH or username/password authentication.</p> - -<h3 id="ssh-authentication">SSH authentication</h3> - -<h4 id="generate-ssh-keys">Generate SSH Keys</h4> - -<p>There are two methods of SSH private key generation:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">$ openssl genrsa -out &lt;filename&gt; <span style="color:#0000cf;font-weight:bold">2048</span></code></pre></div> -<p>or</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">$ ssh-keygen -t rsa -b <span style="color:#0000cf;font-weight:bold">2048</span> -$ ssh-keygen -p -f &lt;filename&gt; -m pem</code></pre></div> -<p>Then copy content from generated file.</p> - -<h4 id="public-key">Public key</h4> - -<p>If you want to upload your public key to your Git server you need to extract it.</p> - -<p>If key was generated by <code>openssl</code> then you need to type this to extract public key:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">$ openssl rsa -in &lt;filename&gt; -pubout &gt; &lt;filename&gt;.pub</code></pre></div> -<p>If key was generated by <code>ssh-keygen</code> the public key content is located in <filename>.pub and there is no need to extract public key</p> - -<h4 id="configure-ssh-authentication">Configure SSH authentication</h4> - -<p>Configure a seed job like this:</p> -<pre><code>apiVersion: jenkins.io/v1alpha2 -kind: Jenkins -metadata: - name: example -spec: - seedJobs: - - id: jenkins-operator-ssh - credentialType: basicSSHUserPrivateKey - credentialID: k8s-ssh - targets: "cicd/jobs/*.jenkins" - description: "Jenkins Operator repository" - repositoryBranch: master - repositoryUrl: git@github.com:jenkinsci/kubernetes-operator.git</code></pre> -<p>and create a Kubernetes Secret (name of secret should be the same from <code>credentialID</code> field):</p> -<pre><code>apiVersion: v1 -kind: Secret -metadata: - name: k8s-ssh -stringData: - privateKey: | - -----BEGIN RSA PRIVATE KEY----- - MIIJKAIBAAKCAgEAxxDpleJjMCN5nusfW/AtBAZhx8UVVlhhhIKXvQ+dFODQIdzO - oDXybs1zVHWOj31zqbbJnsfsVZ9Uf3p9k6xpJ3WFY9b85WasqTDN1xmSd6swD4N8 - ... - username: github_user_name</code></pre> -<h3 id="username-password-authentication">Username &amp; password authentication</h3> - -<p>Configure the seed job like:</p> -<pre><code>apiVersion: jenkins.io/v1alpha2 -kind: Jenkins -metadata: - name: example -spec: - seedJobs: - - id: jenkins-operator-user-pass - credentialType: usernamePassword - credentialID: k8s-user-pass - targets: "cicd/jobs/*.jenkins" - description: "Jenkins Operator repository" - repositoryBranch: master - repositoryUrl: https://github.com/jenkinsci/kubernetes-operator.git</code></pre> -<p>and create a Kubernetes Secret (name of secret should be the same from <code>credentialID</code> field):</p> -<pre><code>apiVersion: v1 -kind: Secret -metadata: - name: k8s-user-pass -stringData: - username: github_user_name - password: password_or_token</code></pre> -<h2 id="http-proxy-for-downloading-plugins">HTTP Proxy for downloading plugins</h2> - -<p>To use forwarding proxy with an operator to download plugins you need to add the following environment variable to Jenkins 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"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-master<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>env<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>CURL_OPTIONS<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-L<span style="color:#f8f8f8;text-decoration:underline"> </span>-x<span style="color:#f8f8f8;text-decoration:underline"> </span>&lt;proxy_url&gt;</code></pre></div> -<p>In <code>CURL_OPTIONS</code> var you can set additional arguments to <code>curl</code> command.</p> - -<h2 id="pulling-docker-images-from-private-repositories">Pulling Docker images from private repositories</h2> - -<p>To pull a Docker Image from private repository you can use <code>imagePullSecrets</code>.</p> - -<p>Please follow the instructions on <a href="https://kubernetes.io/docs/concepts/containers/images/?origin_team=T42NTAGHM#creating-a-secret-with-a-docker-config">creating a secret with a docker config</a>.</p> - -<h3 id="docker-hub-configuration">Docker Hub Configuration</h3> - -<p>To use Docker Hub additional steps are required.</p> - -<p>Edit the previously created secret:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl -n &lt;namespace&gt; edit secret &lt;name&gt;</code></pre></div> -<p>The <code>.dockerconfigjson</code> key&rsquo;s value needs to be replaced with a modified version.</p> - -<p>After modifications, it needs to be encoded as a Base64 value before setting the <code>.dockerconfigjson</code> key.</p> - -<p>Example config file to modify and use:</p> -<pre><code>{ - "auths":{ - "https://index.docker.io/v1/":{ - "username":"user", - "password":"password", - "email":"yourdockeremail@gmail.com", - "auth":"base64 of string user:password" - }, - "auth.docker.io":{ - "username":"user", - "password":"password", - "email":"yourdockeremail@gmail.com", - "auth":"base64 of string user:password" - }, - "registry.docker.io":{ - "username":"user", - "password":"password", - "email":"yourdockeremail@gmail.com", - "auth":"base64 of string user:password" - }, - "docker.io":{ - "username":"user", - "password":"password", - "email":"yourdockeremail@gmail.com", - "auth":"base64 of string user:password" - }, - "https://registry-1.docker.io/v2/": { - "username":"user", - "password":"password", - "email":"yourdockeremail@gmail.com", - "auth":"base64 of string user:password" - }, - "registry-1.docker.io/v2/": { - "username":"user", - "password":"password", - "email":"yourdockeremail@gmail.com", - "auth":"base64 of string user:password" - }, - "registry-1.docker.io": { - "username":"user", - "password":"password", - "email":"yourdockeremail@gmail.com", - "auth":"base64 of string user:password" - }, - "https://registry-1.docker.io": { - "username":"user", - "password":"password", - "email":"yourdockeremail@gmail.com", - "auth":"base64 of string user:password" - } - } -}</code></pre> - - - - - Docs: Customization - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.2.x/customization/ - Mon, 05 Aug 2019 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.2.x/customization/ - - - - - -<p>Jenkins can be customized using groovy scripts or the <a href="https://github.com/jenkinsci/configuration-as-code-plugin">configuration as code plugin</a>. -By using a <a href="https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/">ConfigMap</a> you can create your own <strong>Jenkins</strong> customized configuration. -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 <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"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>example<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurationAsCode<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurations<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-user-configuration<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>groovyScripts<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurations<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-user-configuration</code></pre></div> -<p>Here is an example of <code>jenkins-operator-user-configuration</code>:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>v1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>ConfigMap<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-user-configuration<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>data<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>-configure-theme.groovy<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">| -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">import jenkins.*</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.model.*<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>hudson.*<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>hudson.model.*<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>org.jenkinsci.plugins.simpletheme.ThemeElement<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>org.jenkinsci.plugins.simpletheme.CssTextThemeElement<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>org.jenkinsci.plugins.simpletheme.CssUrlThemeElement<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins<span style="color:#f8f8f8;text-decoration:underline"> </span>=<span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins.getInstance()<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>def<span style="color:#f8f8f8;text-decoration:underline"> </span>decorator<span style="color:#f8f8f8;text-decoration:underline"> </span>=<span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins.instance.getDescriptorByType(org.codefirst.SimpleThemeDecorator.class)<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>List&lt;ThemeElement&gt;<span style="color:#f8f8f8;text-decoration:underline"> </span>configElements<span style="color:#f8f8f8;text-decoration:underline"> </span>=<span style="color:#f8f8f8;text-decoration:underline"> </span>new<span style="color:#f8f8f8;text-decoration:underline"> </span>ArrayList&lt;&gt;();<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configElements.add(new<span style="color:#f8f8f8;text-decoration:underline"> </span>CssTextThemeElement(<span style="color:#4e9a06">&#34;DEFAULT&#34;</span>));<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configElements.add(new<span style="color:#f8f8f8;text-decoration:underline"> </span>CssUrlThemeElement(<span style="color:#4e9a06">&#34;https://cdn.rawgit.com/afonsof/jenkins-material-theme/gh-pages/dist/material-light-green.css&#34;</span>));<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>decorator.setElements(configElements);<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>decorator.save();<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.save()<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>-system-message.yaml<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">| -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">jenkins:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>systemMessage<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Configuration as Code integration works!!!&#34;</span></code></pre></div> -<ul> -<li><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. -Jenkins will reconcile and apply the new configuration.</p> - -<h3 id="using-secrets-from-a-groovy-script">Using secrets from a Groovy script</h3> - -<p>If you configured <code>spec.groovyScripts.secret.name</code>, then this secret is available to use from map Groovy scripts. -The secrets are loaded to <code>secrets</code> map.</p> - -<p>Create a <a href="https://kubernetes.io/docs/concepts/configuration/secret/">secret</a> with for example the name <code>jenkins-conf-secrets</code>.</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Secret<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>v1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>type<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Opaque<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-conf-secrets<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>namespace<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>default<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>data<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>SYSTEM_MESSAGE<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>SGVsbG8gd29ybGQ=</code></pre></div> -<p>Then modify the <strong>Jenkins</strong> pod manifest by changing <code>spec.groovyScripts.secret.name</code> to <code>jenkins-conf-secrets</code>.</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.io/v1alpha2<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>example<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurationAsCode<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurations<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-user-configuration<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>secret<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-conf-secrets<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>groovyScripts<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurations<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-user-configuration<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>secret<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-conf-secrets</code></pre></div> -<p>Now you can test that the secret is mounted by applying this <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"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-user-configuration<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>data<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>-system-message.groovy<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">| -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">import jenkins.*</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.model.*<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>hudson.*<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>hudson.model.*<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins<span style="color:#f8f8f8;text-decoration:underline"> </span>=<span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins.getInstance()<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.setSystemMessage(secrets<span style="color:#000;font-weight:bold">[</span><span style="color:#4e9a06">&#34;SYSTEM_MESSAGE&#34;</span><span style="color:#000;font-weight:bold">]</span>)<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.save()</code></pre></div> -<p>Or by applying this configuration as code:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>v1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>ConfigMap<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-user-configuration<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>data<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>-system-message.yaml<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">| -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">jenkins:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>systemMessage<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>${SYSTEM_MESSAGE}</code></pre></div> -<p>After this, you should see the <code>Hello world</code> system message from the <strong>Jenkins</strong> homepage.</p> - -<h2 id="install-plugins">Install Plugins</h2> - -<p>Edit Custom Resource under <code>spec.master.plugins</code>:</p> -<pre><code>apiVersion: jenkins.io/v1alpha2 -kind: Jenkins -metadata: - name: example -spec: - master: - plugins: - - name: simple-theme-plugin - version: 0.5.1</code></pre> -<p>Under <code>spec.master.basePlugins</code> you can find plugins for a valid <strong>Jenkins Operator</strong>:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.io/v1alpha2<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>example<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>master<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>basePlugins<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>kubernetes<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1.18</span><span style="color:#0000cf;font-weight:bold">.3</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>workflow-job<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;2.34&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>workflow-aggregator<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;2.6&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>git<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">3.12</span><span style="color:#0000cf;font-weight:bold">.0</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>job-dsl<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;1.76&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configuration-as-code<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;1.29&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>kubernetes-credentials-provider<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">0.12</span><span style="color:#0000cf;font-weight:bold">.1</span></code></pre></div> -<p>You can change their versions.</p> - -<p>The <strong>Jenkins Operator</strong> will then automatically install plugins after the Jenkins master pod restarts.</p> - - - - - - Docs: AKS - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.2.x/aks/ - Mon, 05 Aug 2019 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.2.x/aks/ - - - - <p>Azure AKS managed Kubernetes service adds to every pod the following environment variables:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>KUBERNETES_PORT_443_TCP_ADDR<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>KUBERNETES_PORT<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>tcp<span style="color:#000;font-weight:bold">:</span>//<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>KUBERNETES_PORT_443_TCP<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>tcp<span style="color:#000;font-weight:bold">:</span>//<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>KUBERNETES_SERVICE_HOST<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span></code></pre></div> -<p>The operator is aware of it and omits these environment variables when checking if a Jenkins pod environment has been changed. It prevents the -restart of a Jenkins pod over and over again.</p> - - - - - - Docs: Configure backup and restore - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.2.x/configure-backup-and-restore/ - Mon, 05 Aug 2019 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.2.x/configure-backup-and-restore/ - - - - - -<p>Backup and restore is done by a container sidecar.</p> - -<h3 id="pvc">PVC</h3> - -<h4 id="create-pvc">Create PVC</h4> - -<p>Save to the file named pvc.yaml:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>v1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>PersistentVolumeClaim<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>&lt;pvc_name<span style="color:#8f5902;font-style:italic">&gt; -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">namespace: &lt;namespace&gt;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>accessModes<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>ReadWriteOnce<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>requests<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>storage<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>500Gi</code></pre></div> -<p>Run the following command:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">$ kubectl -n &lt;namespace&gt; create -f pvc.yaml</code></pre></div> -<h4 id="configure-jenkins-cr">Configure Jenkins CR</h4> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.io/v1alpha2<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>&lt;cr_name<span style="color:#8f5902;font-style:italic">&gt; -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">namespace: &lt;namespace&gt;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>master<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>securityContext<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>runAsUser<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1000</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>fsGroup<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1000</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>containers<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-master<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>image<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins/jenkins<span style="color:#000;font-weight:bold">:</span>lts<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># container responsible for the backup and restore</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>env<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>BACKUP_DIR<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/backup<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>JENKINS_HOME<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/jenkins-home<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>BACKUP_COUNT<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;3&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># keep only the 2 most recent backups</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>image<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>virtuslab/jenkins-operator-backup-pvc<span style="color:#000;font-weight:bold">:</span>v0<span style="color:#0000cf;font-weight:bold">.0</span><span style="color:#0000cf;font-weight:bold">.8</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># look at backup/pvc directory</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>imagePullPolicy<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>IfNotPresent<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>volumeMounts<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>mountPath<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/jenkins-home<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># Jenkins home volume</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-home<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>mountPath<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># backup volume</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>volumes<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># PVC volume where backups will be stored</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>persistentVolumeClaim<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>claimName<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>&lt;pvc_name<span style="color:#8f5902;font-style:italic">&gt; -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">backup:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>containerName<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># container name is responsible for backup</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>action<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>command<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>/home/user/bin/backup.sh<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># this command is invoked on &#34;backup&#34; container to make backup, for example /home/user/bin/backup.sh &lt;backup_number&gt;, &lt;backup_number&gt; is passed by operator</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>interval<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">30</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># how often make backup in seconds</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>makeBackupBeforePodDeletion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">true</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># make a backup before pod deletion</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>restore<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>containerName<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># container name is responsible for restore backup</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>action<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>command<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>/home/user/bin/restore.sh<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># this command is invoked on &#34;backup&#34; container to make restore backup, for example /home/user/bin/restore.sh &lt;backup_number&gt;, &lt;backup_number&gt; is passed by operator</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">#recoveryOnce: &lt;backup_number&gt; # if want to restore specific backup configure this field and then Jenkins will be restarted and desired backup will be restored</span></code></pre></div> - - - - - Docs: Custom Backup and Restore Providers - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.2.x/custom-backup-and-restore/ - Mon, 05 Aug 2019 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.2.x/custom-backup-and-restore/ - - - - - -<p>With enough effort one can create a custom backup and restore provider -for the Jenkins Operator.</p> - -<h2 id="requirements">Requirements</h2> - -<p>Two commands (e.g. scripts) are required:</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> - -<p>One of those scripts (or the entry point of the container) needs to be responsible -for backup cleanup or rotation if required, or an external system.</p> - -<h2 id="how-it-works">How it works</h2> - -<p>The mechanism relies on basic Kubernetes and UNIX functionalities.</p> - -<p>The backup (and restore) container runs as a sidecar in the same -Kubernetes pod as the Jenkins master.</p> - -<p>Name of the backup and restore containers can be set as necessary using -<code>spec.backup.containerName</code> and <code>spec.restore.containerName</code>. -In most cases it will be the same container, but we allow for less common use cases.</p> - -<p>The operator will call a backup or restore commands inside a sidecar container when necessary:</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> - -<p>This example shows abbreviated version of a simple AWS S3 backup implementation -using: <code>aws-cli</code>, <code>bash</code> and <code>kube2iam</code>.</p> - -<p>In addition to your normal <code>Jenkins</code> <code>CustomResource</code> some additional settings -for backup and restore are required, e.g.:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.io/v1alpha1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>example<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>namespace<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>master<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>masterAnnotations<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>iam.amazonaws.com/role<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;my-example-backup-role&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># tell kube2iam where the AWS IAM role is</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>containers<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-master<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>...<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># container responsible for backup and restore</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>image<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>quay.io/virtuslab/aws-cli<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.16</span><span style="color:#0000cf;font-weight:bold">.263</span><span style="color:#0000cf;font-weight:bold">-2</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>workingDir<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/home/user/bin/<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>command<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># our container entry point</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>sleep<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>infinity<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>env<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>BACKUP_BUCKET<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>my-example-bucket<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># the S3 bucket name to use</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>BACKUP_PATH<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>my-backup-path<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># the S3 bucket path prefix to use</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>JENKINS_HOME<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/jenkins-home<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># the path to mount jenkins home dir in the backup container</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>volumeMounts<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>mountPath<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/jenkins-home<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># Jenkins home volume</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-home<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>mountPath<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/home/user/bin/backup.sh<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup-scripts<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>subPath<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup.sh<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>readOnly<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">true</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>mountPath<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/home/user/bin/restore.sh<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup-scripts<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>subPath<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>restore.sh<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>readOnly<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">true</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>volumes<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup-scripts<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configMap<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>defaultMode<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">0754</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-backup-s3<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>securityContext<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># make sure both containers use the same UID and GUID</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>runAsUser<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1000</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>fsGroup<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1000</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>...<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>containerName<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># container name responsible for backup</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>interval<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">3600</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># how often make a backup in seconds</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>makeBackupBeforePodDeletion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">true</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># trigger backup just before deleting the pod</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>action<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>command<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># this command is invoked on &#34;backup&#34; container to create a backup,</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># &lt;backup_number&gt; is passed by operator,</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># for example /home/user/bin/backup.sh &lt;backup_number&gt;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>/home/user/bin/backup.sh<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>restore<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>containerName<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># container name is responsible for restore backup</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>action<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>command<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># this command is invoked on &#34;backup&#34; container to restore a backup,</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># &lt;backup_number&gt; is passed by operator</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># for example /home/user/bin/restore.sh &lt;backup_number&gt;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>/home/user/bin/restore.sh<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#8f5902;font-style:italic"># recoveryOnce: &lt;backup_number&gt; # if want to restore specific backup configure this field and then Jenkins will be restarted and desired backup will be restored</span></code></pre></div> -<p>The actual backup and restore scripts will be provided in a <code>ConfigMap</code>:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>ConfigMap<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>v1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-backup-s3<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>namespace<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>labels<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>app<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>data<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup.sh<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>|<span style="color:#8f5902;font-style:italic">- -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">#!/bin/bash -xeu</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">[</span><span style="color:#f8f8f8;text-decoration:underline"> </span>!<span style="color:#f8f8f8;text-decoration:underline"> </span>$<span style="color:#8f5902;font-style:italic"># -eq 1 ]] &amp;&amp; echo &#34;Usage: $0 backup_number&#34; &amp;&amp; exit 1;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">[</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-z<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;${BACKUP_BUCKET}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">]</span><span style="color:#000;font-weight:bold">]</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Required &#39;BACKUP_BUCKET&#39; env not set&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exit<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>;<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">[</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-z<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;${BACKUP_PATH}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">]</span><span style="color:#000;font-weight:bold">]</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Required &#39;BACKUP_PATH&#39; env not set&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exit<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>;<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">[</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-z<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;${JENKINS_HOME}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">]</span><span style="color:#000;font-weight:bold">]</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Required &#39;JENKINS_HOME&#39; env not set&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exit<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>;<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup_number=$<span style="color:#0000cf;font-weight:bold">1</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Running backup #${backup_number}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>BACKUP_TMP_DIR=$(mktemp<span style="color:#f8f8f8;text-decoration:underline"> </span>-d)<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>tar<span style="color:#f8f8f8;text-decoration:underline"> </span>-C<span style="color:#f8f8f8;text-decoration:underline"> </span>${JENKINS_HOME}<span style="color:#f8f8f8;text-decoration:underline"> </span>-czf<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;${BACKUP_TMP_DIR}/${backup_number}.tar.gz&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>--exclude<span style="color:#f8f8f8;text-decoration:underline"> </span>jobs/<span style="color:#8f5902;font-style:italic">*/workspace*</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-c<span style="color:#f8f8f8;text-decoration:underline"> </span>jobs<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>\<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>aws<span style="color:#f8f8f8;text-decoration:underline"> </span>s3<span style="color:#f8f8f8;text-decoration:underline"> </span>cp<span style="color:#f8f8f8;text-decoration:underline"> </span>${BACKUP_TMP_DIR}/${backup_number}.tar.gz<span style="color:#f8f8f8;text-decoration:underline"> </span>s3<span style="color:#000;font-weight:bold">:</span>//${BACKUP_BUCKET}/${BACKUP_PATH}/${backup_number}.tar.gz<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span>Done<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>restore.sh<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>|<span style="color:#8f5902;font-style:italic">- -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">#!/bin/bash -xeu</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">[</span><span style="color:#f8f8f8;text-decoration:underline"> </span>!<span style="color:#f8f8f8;text-decoration:underline"> </span>$<span style="color:#8f5902;font-style:italic"># -eq 1 ]] &amp;&amp; echo &#34;Usage: $0 backup_number&#34; &amp;&amp; exit 1</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">[</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-z<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;${BACKUP_BUCKET}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">]</span><span style="color:#000;font-weight:bold">]</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Required &#39;BACKUP_BUCKET&#39; env not set&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exit<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>;<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">[</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-z<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;${BACKUP_PATH}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">]</span><span style="color:#000;font-weight:bold">]</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Required &#39;BACKUP_PATH&#39; env not set&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exit<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>;<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">[</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-z<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;${JENKINS_HOME}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">]</span><span style="color:#000;font-weight:bold">]</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Required &#39;JENKINS_HOME&#39; env not set&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exit<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>;<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup_number=$<span style="color:#0000cf;font-weight:bold">1</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Running restore #${backup_number}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>BACKUP_TMP_DIR=$(mktemp<span style="color:#f8f8f8;text-decoration:underline"> </span>-d)<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>aws<span style="color:#f8f8f8;text-decoration:underline"> </span>s3<span style="color:#f8f8f8;text-decoration:underline"> </span>cp<span style="color:#f8f8f8;text-decoration:underline"> </span>s3<span style="color:#000;font-weight:bold">:</span>//${BACKUP_BUCKET}/${BACKUP_PATH}/${backup_number}.tar.gz<span style="color:#f8f8f8;text-decoration:underline"> </span>${BACKUP_TMP_DIR}/${backup_number}.tar.gz<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>tar<span style="color:#f8f8f8;text-decoration:underline"> </span>-C<span style="color:#f8f8f8;text-decoration:underline"> </span>${JENKINS_HOME}<span style="color:#f8f8f8;text-decoration:underline"> </span>-zxf<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;${BACKUP_TMP_DIR}/${backup_number}.tar.gz&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span>Done</code></pre></div> -<p>In our example we will use S3 bucket lifecycle policy to keep -the number of backups under control, e.g. Cloud Formation fragment:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#f8f8f8;text-decoration:underline"> </span>Type<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>AWS<span style="color:#000;font-weight:bold">:</span><span style="color:#000;font-weight:bold">:</span>S3<span style="color:#000;font-weight:bold">:</span><span style="color:#000;font-weight:bold">:</span>Bucket<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Properties<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>BucketName<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>my-example-bucket<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>...<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>LifecycleConfiguration<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Rules<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>Id<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>BackupCleanup<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Status<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Enabled<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Prefix<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>my-backup-path<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>ExpirationInDays<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">7</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>NoncurrentVersionExpirationInDays<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">14</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>AbortIncompleteMultipartUpload<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>DaysAfterInitiation<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">3</span></code></pre></div> - - - - - Docs: Migration from v0.1.x - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.2.x/migration/ - Mon, 05 Aug 2019 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.2.x/migration/ - - - - - -<h3 id="major-changes">Major Changes</h3> - -<h4 id="adding-the-seed-job-agent">Adding the seed job agent</h4> - -<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&rsquo;ve had disabled master executors for security reasons.</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 succeeded 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>&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; -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">secret:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-user-configuration-&lt;cr_name<span style="color:#8f5902;font-style:italic">&gt; -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">groovyScripts:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurations<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-user-configuration-&lt;cr_name<span style="color:#8f5902;font-style:italic">&gt; -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">secret:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-user-configuration-&lt;cr_name<span style="color:#8f5902;font-style:italic">&gt; -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">...</span></code></pre></div> - - - - - Docs: Diagnostics - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.2.x/diagnostics/ - Mon, 05 Aug 2019 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.2.x/diagnostics/ - - - - - -<p>Turn on debug in <strong>Jenkins Operator</strong> deployment:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">sed -i <span style="color:#4e9a06">&#39;s|\(args:\).*|\1\ [&#34;--debug&#34;\]|&#39;</span> deploy/operator.yaml -kubectl apply -f deploy/operator.yaml</code></pre></div> -<p>Watch Kubernetes events:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl get events --sort-by<span style="color:#ce5c00;font-weight:bold">=</span><span style="color:#4e9a06">&#39;{.lastTimestamp}&#39;</span></code></pre></div> -<p>Verify Jenkins master logs:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl logs -f jenkins-&lt;cr_name&gt;</code></pre></div> -<p>Verify 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> - -<p>Delete the Jenkins master pod and wait for the new one to come up:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl delete pod jenkins-&lt;cr_name&gt;</code></pre></div> - - - - - Docs: Schema - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.2.x/schema/ - Mon, 05 Aug 2019 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.2.x/schema/ - - - - - -<div class="pageinfo pageinfo-primary"> -<p>This document contains API scheme for <code>jenkins-operator</code> Custom Resource Definition manifest</p> - -</div> - - -<p>Packages:</p> -<ul> -<li> -<a href="#jenkins.io">jenkins.io</a> -</li> -</ul> -<h2 id="jenkins.io">jenkins.io</h2> -<p> -<p>Package v1alpha2 contains the API Schema definitions for the jenkins.io v1alpha2 API group</p> -</p> -Resource Types: -<ul><li> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.Jenkins">Jenkins</a> -</li></ul> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Jenkins">Jenkins -</h3> -<p> -<p>Jenkins is the Schema for the jenkins API</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>apiVersion</code></br> -string</td> -<td> -<code> -jenkins.io/v1alpha2 -</code> -</td> -</tr> -<tr> -<td> -<code>kind</code></br> -string -</td> -<td><code>Jenkins</code></td> -</tr> -<tr> -<td> -<code>metadata</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.12/#objectmeta-v1-meta"> -Kubernetes meta/v1.ObjectMeta -</a> -</em> -</td> -<td> -Refer to the Kubernetes API documentation for the fields of the -<code>metadata</code> field. -</td> -</tr> -<tr> -<td> -<code>spec</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsSpec"> -JenkinsSpec -</a> -</em> -</td> -<td> -<p>Spec defines the desired state of the Jenkins</p> -<br/> -<br/> -<table> -<tr> -<td> -<code>master</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsMaster"> -JenkinsMaster -</a> -</em> -</td> -<td> -<p>Master represents Jenkins master pod properties and Jenkins plugins. -Every single change here requires a pod restart.</p> -</td> -</tr> -<tr> -<td> -<code>seedJobs</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.SeedJob"> -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.SeedJob -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>SeedJobs defines a list of Jenkins Seed Job configurations -More info: <a href="https://github.com/jenkinsci/kubernetes-operator/blob/master/docs/getting-started.md#configure-seed-jobs-and-pipelines">https://github.com/jenkinsci/kubernetes-operator/blob/master/docs/getting-started.md#configure-seed-jobs-and-pipelines</a></p> -</td> -</tr> -<tr> -<td> -<code>service</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Service"> -Service -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Service is the Kubernetes service of the Jenkins master HTTP pod -Defaults to : -port: 8080 -type: ClusterIP</p> -</td> -</tr> -<tr> -<td> -<code>slaveService</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Service"> -Service -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Service is the Kubernetes service of the Jenkins slave pods -Defaults to : -port: 50000 -type: ClusterIP</p> -</td> -</tr> -<tr> -<td> -<code>backup</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Backup"> -Backup -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Backup defines the configuration of a Jenkins backup -More info: <a href="https://github.com/jenkinsci/kubernetes-operator/blob/master/docs/getting-started.md#configure-backup-and-restore">https://github.com/jenkinsci/kubernetes-operator/blob/master/docs/getting-started.md#configure-backup-and-restore</a></p> -</td> -</tr> -<tr> -<td> -<code>restore</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Restore"> -Restore -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Backup defines the configuration of a Jenkins backup restore -More info: <a href="https://github.com/jenkinsci/kubernetes-operator/blob/master/docs/getting-started.md#configure-backup-and-restore">https://github.com/jenkinsci/kubernetes-operator/blob/master/docs/getting-started.md#configure-backup-and-restore</a></p> -</td> -</tr> -<tr> -<td> -<code>groovyScripts</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.GroovyScripts"> -GroovyScripts -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>GroovyScripts defines the configuration of Jenkins customization via groovy scripts</p> -</td> -</tr> -<tr> -<td> -<code>configurationAsCode</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.ConfigurationAsCode"> -ConfigurationAsCode -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>ConfigurationAsCode defines the configuration of Jenkins customization via the Configuration as Code Jenkins plugin</p> -</td> -</tr> -</table> -</td> -</tr> -<tr> -<td> -<code>status</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsStatus"> -JenkinsStatus -</a> -</em> -</td> -<td> -<p>Status defines the observed state of Jenkins</p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.AppliedGroovyScript">AppliedGroovyScript -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.JenkinsStatus">JenkinsStatus</a>) -</p> -<p> -<p>AppliedGroovyScript is the applied groovy script in Jenkins by the operator</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>configurationType</code></br> -<em> -string -</em> -</td> -<td> -<p>ConfigurationType is the name of the configuration type(base-groovy, user-groovy, user-casc)</p> -</td> -</tr> -<tr> -<td> -<code>source</code></br> -<em> -string -</em> -</td> -<td> -<p>Source is the name of source where is located groovy script</p> -</td> -</tr> -<tr> -<td> -<code>name</code></br> -<em> -string -</em> -</td> -<td> -<p>Name is the name of the groovy script</p> -</td> -</tr> -<tr> -<td> -<code>Hash</code></br> -<em> -string -</em> -</td> -<td> -<p>Hash is the hash of the groovy script and secrets which it uses</p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Backup">Backup -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.JenkinsSpec">JenkinsSpec</a>) -</p> -<p> -<p>Backup defines the configuration of a Jenkins backup</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>containerName</code></br> -<em> -string -</em> -</td> -<td> -<p>ContainerName is the container name responsible for backup operation</p> -</td> -</tr> -<tr> -<td> -<code>action</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Handler"> -Handler -</a> -</em> -</td> -<td> -<p>Action defines the action which performs the backup in the backup container sidecar</p> -</td> -</tr> -<tr> -<td> -<code>interval</code></br> -<em> -uint64 -</em> -</td> -<td> -<p>Interval tells you how often the backup is made in seconds -Defaults to 30.</p> -</td> -</tr> -<tr> -<td> -<code>makeBackupBeforePodDeletion</code></br> -<em> -bool -</em> -</td> -<td> -<p>MakeBackupBeforePodDeletion tells the operator to make a backup before Jenkins master pod deletion</p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.ConfigMapRef">ConfigMapRef -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.Customization">Customization</a>) -</p> -<p> -<p>ConfigMapRef is the reference to Kubernetes ConfigMap</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>name</code></br> -<em> -string -</em> -</td> -<td> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.ConfigurationAsCode">ConfigurationAsCode -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.JenkinsSpec">JenkinsSpec</a>) -</p> -<p> -<p>ConfigurationAsCode defines configuration of Jenkins customization via the Configuration as Code Jenkins plugin</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>Customization</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Customization"> -Customization -</a> -</em> -</td> -<td> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Container">Container -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.JenkinsMaster">JenkinsMaster</a>) -</p> -<p> -<p>Container defines the Kubernetes container attributes</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>name</code></br> -<em> -string -</em> -</td> -<td> -<p>Name of the container specified as a DNS_LABEL. -Each container in a pod must have a unique name (DNS_LABEL).</p> -</td> -</tr> -<tr> -<td> -<code>image</code></br> -<em> -string -</em> -</td> -<td> -<p>Docker image name. -More info: <a href="https://kubernetes.io/docs/concepts/containers/images">https://kubernetes.io/docs/concepts/containers/images</a></p> -</td> -</tr> -<tr> -<td> -<code>imagePullPolicy</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.12/#pullpolicy-v1-core"> -Kubernetes core/v1.PullPolicy -</a> -</em> -</td> -<td> -<p>Image pull policy. -One of Always, Never, IfNotPresent. -Defaults to Always.</p> -</td> -</tr> -<tr> -<td> -<code>resources</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.12/#resourcerequirements-v1-core"> -Kubernetes core/v1.ResourceRequirements -</a> -</em> -</td> -<td> -<p>Compute Resources required by this container. -More info: <a href="https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/">https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/</a></p> -</td> -</tr> -<tr> -<td> -<code>command</code></br> -<em> -[]string -</em> -</td> -<td> -<em>(Optional)</em> -<p>Entrypoint array. Not executed within a shell. -The docker image&rsquo;s ENTRYPOINT is used if this is not provided. -Variable references $(VAR_NAME) are expanded using the container&rsquo;s environment. If a variable -cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax -can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, -regardless of whether the variable exists or not. -More info: <a href="https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell">https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell</a></p> -</td> -</tr> -<tr> -<td> -<code>args</code></br> -<em> -[]string -</em> -</td> -<td> -<em>(Optional)</em> -<p>Arguments to the entrypoint. -The docker image&rsquo;s CMD is used if this is not provided. -Variable references $(VAR_NAME) are expanded using the container&rsquo;s environment. If a variable -cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax -can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, -regardless of whether the variable exists or not. -More info: <a href="https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell">https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell</a></p> -</td> -</tr> -<tr> -<td> -<code>workingDir</code></br> -<em> -string -</em> -</td> -<td> -<em>(Optional)</em> -<p>Container&rsquo;s working directory. -If not specified, the container runtime&rsquo;s default will be used, which -might be configured in the container image.</p> -</td> -</tr> -<tr> -<td> -<code>ports</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.12/#containerport-v1-core"> -[]Kubernetes core/v1.ContainerPort -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>List of ports to expose from the container. Exposing a port here gives -the system additional information about the network connections a -container uses, but is primarily informational. Not specifying a port here -DOES NOT prevent that port from being exposed. Any port which is -listening on the default &ldquo;0.0.0.0&rdquo; address inside a container will be -accessible from the network.</p> -</td> -</tr> -<tr> -<td> -<code>envFrom</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.12/#envfromsource-v1-core"> -[]Kubernetes core/v1.EnvFromSource -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>List of sources to populate environment variables in the container. -The keys defined within a source must be a C_IDENTIFIER. All invalid keys -will be reported as an event when the container is starting. When a key exists in multiple -sources, the value associated with the last source will take precedence. -Values defined by an Env with a duplicate key will take precedence.</p> -</td> -</tr> -<tr> -<td> -<code>env</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.12/#envvar-v1-core"> -[]Kubernetes core/v1.EnvVar -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>List of environment variables to set in the container.</p> -</td> -</tr> -<tr> -<td> -<code>volumeMounts</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.12/#volumemount-v1-core"> -[]Kubernetes core/v1.VolumeMount -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Pod volumes to mount into the container&rsquo;s filesystem.</p> -</td> -</tr> -<tr> -<td> -<code>livenessProbe</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.12/#probe-v1-core"> -Kubernetes core/v1.Probe -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Periodic probe of container liveness. -Container will be restarted if the probe fails.</p> -</td> -</tr> -<tr> -<td> -<code>readinessProbe</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.12/#probe-v1-core"> -Kubernetes core/v1.Probe -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Periodic probe of container service readiness. -Container will be removed from service endpoints if the probe fails.</p> -</td> -</tr> -<tr> -<td> -<code>lifecycle</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.12/#lifecycle-v1-core"> -Kubernetes core/v1.Lifecycle -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Actions that the management system should take in response to container lifecycle events.</p> -</td> -</tr> -<tr> -<td> -<code>securityContext</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.12/#securitycontext-v1-core"> -Kubernetes core/v1.SecurityContext -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Security options the pod should run with. -More info: <a href="https://kubernetes.io/docs/concepts/policy/security-context/">https://kubernetes.io/docs/concepts/policy/security-context/</a> -More info: <a href="https://kubernetes.io/docs/tasks/configure-pod-container/security-context/">https://kubernetes.io/docs/tasks/configure-pod-container/security-context/</a></p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Customization">Customization -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.ConfigurationAsCode">ConfigurationAsCode</a>, -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.GroovyScripts">GroovyScripts</a>) -</p> -<p> -<p>Customization defines configuration of Jenkins customization</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>secret</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.SecretRef"> -SecretRef -</a> -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>configurations</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.ConfigMapRef"> -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.ConfigMapRef -</a> -</em> -</td> -<td> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.GroovyScripts">GroovyScripts -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.JenkinsSpec">JenkinsSpec</a>) -</p> -<p> -<p>GroovyScripts defines configuration of Jenkins customization via groovy scripts</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>Customization</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Customization"> -Customization -</a> -</em> -</td> -<td> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Handler">Handler -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.Backup">Backup</a>, -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.Restore">Restore</a>) -</p> -<p> -<p>Handler defines a specific action that should be taken</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>exec</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.12/#execaction-v1-core"> -Kubernetes core/v1.ExecAction -</a> -</em> -</td> -<td> -<p>Exec specifies the action to take.</p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsCredentialType">JenkinsCredentialType -(<code>string</code> alias)</p></h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.SeedJob">SeedJob</a>) -</p> -<p> -<p>JenkinsCredentialType defines the type of Jenkins credential used in the seed job mechanism</p> -</p> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsMaster">JenkinsMaster -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.JenkinsSpec">JenkinsSpec</a>) -</p> -<p> -<p>JenkinsMaster defines the Jenkins master pod attributes and plugins, -every single change requires a Jenkins master pod restart</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>masterAnnotations</code></br> -<em> -map[string]string -</em> -</td> -<td> -<em>(Optional)</em> -<p>Annotations is an unstructured key value map stored with a resource that may be -set by external tools to store and retrieve arbitrary metadata. They are not -queryable and should be preserved when modifying objects. -More info: <a href="http://kubernetes.io/docs/user-guide/annotations">http://kubernetes.io/docs/user-guide/annotations</a></p> -</td> -</tr> -<tr> -<td> -<code>nodeSelector</code></br> -<em> -map[string]string -</em> -</td> -<td> -<em>(Optional)</em> -<p>NodeSelector is a selector which must be true for the pod to fit on a node. -Selector which must match a node&rsquo;s labels for the pod to be scheduled on that node. -More info: <a href="https://kubernetes.io/docs/concepts/configuration/assign-pod-node/">https://kubernetes.io/docs/concepts/configuration/assign-pod-node/</a></p> -</td> -</tr> -<tr> -<td> -<code>securityContext</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.12/#podsecuritycontext-v1-core"> -Kubernetes core/v1.PodSecurityContext -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>SecurityContext that applies to all the containers of the Jenkins -Master. As per kubernetes specification, it can be overridden -for each container individually. -Defaults to: -runAsUser: 1000 -fsGroup: 1000</p> -</td> -</tr> -<tr> -<td> -<code>containers</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Container"> -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Container -</a> -</em> -</td> -<td> -<p>List of containers belonging to the pod. -Containers cannot currently be added or removed. -There must be at least one container in a Pod. -Defaults to: -- image: jenkins/jenkins:lts -imagePullPolicy: Always -livenessProbe: -failureThreshold: 12 -httpGet: -path: /login -port: http -scheme: HTTP -initialDelaySeconds: 80 -periodSeconds: 10 -successThreshold: 1 -timeoutSeconds: 5 -name: jenkins-master -readinessProbe: -failureThreshold: 3 -httpGet: -path: /login -port: http -scheme: HTTP -initialDelaySeconds: 30 -periodSeconds: 10 -successThreshold: 1 -timeoutSeconds: 1 -resources: -limits: -cpu: 1500m -memory: 3Gi -requests: -cpu: &ldquo;1&rdquo; -memory: 600Mi</p> -</td> -</tr> -<tr> -<td> -<code>imagePullSecrets</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.12/#localobjectreference-v1-core"> -[]Kubernetes core/v1.LocalObjectReference -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. -If specified, these secrets will be passed to individual puller implementations for them to use. For example, -in the case of docker, only DockerConfig type secrets are honored. -More info: <a href="https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod">https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod</a></p> -</td> -</tr> -<tr> -<td> -<code>volumes</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.12/#volume-v1-core"> -[]Kubernetes core/v1.Volume -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>List of volumes that can be mounted by containers belonging to the pod. -More info: <a href="https://kubernetes.io/docs/concepts/storage/volumes">https://kubernetes.io/docs/concepts/storage/volumes</a></p> -</td> -</tr> -<tr> -<td> -<code>basePlugins</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Plugin"> -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Plugin -</a> -</em> -</td> -<td> -<p>BasePlugins contains plugins required by operator -Defaults to : -- name: kubernetes -version: 1.15.7 -- name: workflow-job -version: &ldquo;2.32&rdquo; -- name: workflow-aggregator -version: &ldquo;2.6&rdquo; -- name: git -version: 3.10.0 -- name: job-dsl -version: &ldquo;1.74&rdquo; -- name: configuration-as-code -version: &ldquo;1.19&rdquo; -- name: kubernetes-credentials-provider -version: 0.12.1</p> -</td> -</tr> -<tr> -<td> -<code>plugins</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Plugin"> -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Plugin -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Plugins contains plugins required by user</p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsSpec">JenkinsSpec -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.Jenkins">Jenkins</a>) -</p> -<p> -<p>JenkinsSpec defines the desired state of the Jenkins</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>master</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsMaster"> -JenkinsMaster -</a> -</em> -</td> -<td> -<p>Master represents Jenkins master pod properties and Jenkins plugins. -Every single change here requires a pod restart.</p> -</td> -</tr> -<tr> -<td> -<code>seedJobs</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.SeedJob"> -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.SeedJob -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>SeedJobs defines list of Jenkins Seed Job configurations -More info: <a href="https://github.com/jenkinsci/kubernetes-operator/blob/master/docs/getting-started.md#configure-seed-jobs-and-pipelines">https://github.com/jenkinsci/kubernetes-operator/blob/master/docs/getting-started.md#configure-seed-jobs-and-pipelines</a></p> -</td> -</tr> -<tr> -<td> -<code>service</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Service"> -Service -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Service is Kubernetes service of Jenkins master HTTP pod -Defaults to : -port: 8080 -type: ClusterIP</p> -</td> -</tr> -<tr> -<td> -<code>slaveService</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Service"> -Service -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Service is Kubernetes service of Jenkins slave pods -Defaults to : -port: 50000 -type: ClusterIP</p> -</td> -</tr> -<tr> -<td> -<code>backup</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Backup"> -Backup -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Backup defines configuration of Jenkins backup -More info: <a href="https://github.com/jenkinsci/kubernetes-operator/blob/master/docs/getting-started.md#configure-backup-and-restore">https://github.com/jenkinsci/kubernetes-operator/blob/master/docs/getting-started.md#configure-backup-and-restore</a></p> -</td> -</tr> -<tr> -<td> -<code>restore</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Restore"> -Restore -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Backup defines configuration of Jenkins backup restore -More info: <a href="https://github.com/jenkinsci/kubernetes-operator/blob/master/docs/getting-started.md#configure-backup-and-restore">https://github.com/jenkinsci/kubernetes-operator/blob/master/docs/getting-started.md#configure-backup-and-restore</a></p> -</td> -</tr> -<tr> -<td> -<code>groovyScripts</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.GroovyScripts"> -GroovyScripts -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>GroovyScripts defines configuration of Jenkins customization via groovy scripts</p> -</td> -</tr> -<tr> -<td> -<code>configurationAsCode</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.ConfigurationAsCode"> -ConfigurationAsCode -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>ConfigurationAsCode defines configuration of Jenkins customization via Configuration as Code Jenkins plugin</p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsStatus">JenkinsStatus -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.Jenkins">Jenkins</a>) -</p> -<p> -<p>JenkinsStatus defines the observed state of Jenkins</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>operatorVersion</code></br> -<em> -string -</em> -</td> -<td> -<em>(Optional)</em> -<p>OperatorVersion is the operator version which manages this CR</p> -</td> -</tr> -<tr> -<td> -<code>provisionStartTime</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.12/#time-v1-meta"> -Kubernetes meta/v1.Time -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>ProvisionStartTime is a time when Jenkins master pod has been created</p> -</td> -</tr> -<tr> -<td> -<code>baseConfigurationCompletedTime</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.12/#time-v1-meta"> -Kubernetes meta/v1.Time -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>BaseConfigurationCompletedTime is a time when Jenkins base configuration phase has been completed</p> -</td> -</tr> -<tr> -<td> -<code>userConfigurationCompletedTime</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.12/#time-v1-meta"> -Kubernetes meta/v1.Time -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>UserConfigurationCompletedTime is a time when Jenkins user configuration phase has been completed</p> -</td> -</tr> -<tr> -<td> -<code>restoredBackup</code></br> -<em> -uint64 -</em> -</td> -<td> -<em>(Optional)</em> -<p>RestoredBackup is the restored backup number after Jenkins master pod restart</p> -</td> -</tr> -<tr> -<td> -<code>lastBackup</code></br> -<em> -uint64 -</em> -</td> -<td> -<em>(Optional)</em> -<p>LastBackup is the latest backup number</p> -</td> -</tr> -<tr> -<td> -<code>pendingBackup</code></br> -<em> -uint64 -</em> -</td> -<td> -<em>(Optional)</em> -<p>PendingBackup is the pending backup number</p> -</td> -</tr> -<tr> -<td> -<code>backupDoneBeforePodDeletion</code></br> -<em> -bool -</em> -</td> -<td> -<em>(Optional)</em> -<p>BackupDoneBeforePodDeletion tells if backup before pod deletion has been made</p> -</td> -</tr> -<tr> -<td> -<code>userAndPasswordHash</code></br> -<em> -string -</em> -</td> -<td> -<em>(Optional)</em> -<p>UserAndPasswordHash is a SHA256 hash made from the username and password</p> -</td> -</tr> -<tr> -<td> -<code>createdSeedJobs</code></br> -<em> -[]string -</em> -</td> -<td> -<em>(Optional)</em> -<p>CreatedSeedJobs contains list of seed job ids already created in Jenkins</p> -</td> -</tr> -<tr> -<td> -<code>appliedGroovyScripts</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.AppliedGroovyScript"> -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.AppliedGroovyScript -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>AppliedGroovyScripts is a list with all applied groovy scripts in Jenkins by the operator</p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Mailgun">Mailgun -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.Notification">Notification</a>) -</p> -<p> -<p>Mailgun is handler for Mailgun email service notification channel</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>domain</code></br> -<em> -string -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>apiKeySecretKeySelector</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.SecretKeySelector"> -SecretKeySelector -</a> -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>recipient</code></br> -<em> -string -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>from</code></br> -<em> -string -</em> -</td> -<td> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.MicrosoftTeams">MicrosoftTeams -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.Notification">Notification</a>) -</p> -<p> -<p>MicrosoftTeams is handler for Microsoft MicrosoftTeams notification channel</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>webHookURLSecretKeySelector</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.SecretKeySelector"> -SecretKeySelector -</a> -</em> -</td> -<td> -<p>The web hook URL to MicrosoftTeams App</p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Notification">Notification -</h3> -<p> -<p>Notification is a service configuration used to send notifications about Jenkins status</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>loggingLevel</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.NotificationLogLevel"> -NotificationLogLevel -</a> -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>verbose</code></br> -<em> -bool -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>name</code></br> -<em> -string -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>slack</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Slack"> -github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Slack -</a> -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>teams</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.MicrosoftTeams"> -github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.MicrosoftTeams -</a> -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>mailgun</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Mailgun"> -github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Mailgun -</a> -</em> -</td> -<td> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.NotificationLogLevel">NotificationLogLevel -(<code>string</code> alias)</p></h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.Notification">Notification</a>) -</p> -<p> -<p>NotificationLogLevel defines logging level of Notification</p> -</p> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Plugin">Plugin -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.JenkinsMaster">JenkinsMaster</a>) -</p> -<p> -<p>Plugin defines Jenkins plugin</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>name</code></br> -<em> -string -</em> -</td> -<td> -<p>Name is the name of Jenkins plugin</p> -</td> -</tr> -<tr> -<td> -<code>version</code></br> -<em> -string -</em> -</td> -<td> -<p>Version is the version of Jenkins plugin</p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Restore">Restore -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.JenkinsSpec">JenkinsSpec</a>) -</p> -<p> -<p>Restore defines configuration of Jenkins backup restore operation</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>containerName</code></br> -<em> -string -</em> -</td> -<td> -<p>ContainerName is the container name responsible for restore backup operation</p> -</td> -</tr> -<tr> -<td> -<code>action</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Handler"> -Handler -</a> -</em> -</td> -<td> -<p>Action defines action which performs restore backup in restore container sidecar</p> -</td> -</tr> -<tr> -<td> -<code>recoveryOnce</code></br> -<em> -uint64 -</em> -</td> -<td> -<em>(Optional)</em> -<p>RecoveryOnce if want to restore specific backup set this field and then Jenkins will be restarted and desired backup will be restored</p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.SecretKeySelector">SecretKeySelector -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.Mailgun">Mailgun</a>, -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.MicrosoftTeams">MicrosoftTeams</a>, -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.Slack">Slack</a>) -</p> -<p> -<p>SecretKeySelector selects a key of a Secret.</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>secret</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.12/#localobjectreference-v1-core"> -Kubernetes core/v1.LocalObjectReference -</a> -</em> -</td> -<td> -<p>The name of the secret in the pod&rsquo;s namespace to select from.</p> -</td> -</tr> -<tr> -<td> -<code>key</code></br> -<em> -string -</em> -</td> -<td> -<p>The key of the secret to select from. Must be a valid secret key.</p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.SecretRef">SecretRef -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.Customization">Customization</a>) -</p> -<p> -<p>SecretRef is reference to Kubernetes secret</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>name</code></br> -<em> -string -</em> -</td> -<td> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.SeedJob">SeedJob -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.JenkinsSpec">JenkinsSpec</a>) -</p> -<p> -<p>SeedJob defines configuration for seed job -More info: <a href="https://github.com/jenkinsci/kubernetes-operator/blob/master/docs/getting-started.md#configure-seed-jobs-and-pipelines">https://github.com/jenkinsci/kubernetes-operator/blob/master/docs/getting-started.md#configure-seed-jobs-and-pipelines</a></p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>id</code></br> -<em> -string -</em> -</td> -<td> -<p>ID is the unique seed job name</p> -</td> -</tr> -<tr> -<td> -<code>credentialID</code></br> -<em> -string -</em> -</td> -<td> -<p>CredentialID is the Kubernetes secret name which stores repository access credentials</p> -</td> -</tr> -<tr> -<td> -<code>description</code></br> -<em> -string -</em> -</td> -<td> -<em>(Optional)</em> -<p>Description is the description of the seed job</p> -</td> -</tr> -<tr> -<td> -<code>targets</code></br> -<em> -string -</em> -</td> -<td> -<p>Targets is the repository path where the seed job definitions are</p> -</td> -</tr> -<tr> -<td> -<code>repositoryBranch</code></br> -<em> -string -</em> -</td> -<td> -<p>RepositoryBranch is the repository branch where the seed job definitions are</p> -</td> -</tr> -<tr> -<td> -<code>repositoryUrl</code></br> -<em> -string -</em> -</td> -<td> -<p>RepositoryURL is the repository access URL. Can be SSH or HTTPS.</p> -</td> -</tr> -<tr> -<td> -<code>credentialType</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsCredentialType"> -JenkinsCredentialType -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>JenkinsCredentialType is the <a href="https://jenkinsci.github.io/kubernetes-credentials-provider-plugin/">https://jenkinsci.github.io/kubernetes-credentials-provider-plugin/</a> credential type</p> -</td> -</tr> -<tr> -<td> -<code>githubPushTrigger</code></br> -<em> -bool -</em> -</td> -<td> -<em>(Optional)</em> -<p>GitHubPushTrigger is used for GitHub web hooks</p> -</td> -</tr> -<tr> -<td> -<code>buildPeriodically</code></br> -<em> -string -</em> -</td> -<td> -<em>(Optional)</em> -<p>BuildPeriodically is setting for scheduled trigger</p> -</td> -</tr> -<tr> -<td> -<code>pollSCM</code></br> -<em> -string -</em> -</td> -<td> -<em>(Optional)</em> -<p>PollSCM is setting for polling changes in SCM</p> -</td> -</tr> -<tr> -<td> -<code>ignoreMissingFiles</code></br> -<em> -bool -</em> -</td> -<td> -<em>(Optional)</em> -<p>IgnoreMissingFiles is setting for Job DSL API plugin to ignore files that miss</p> -</td> -</tr> -<tr> -<td> -<code>additionalClasspath</code></br> -<em> -string -</em> -</td> -<td> -<em>(Optional)</em> -<p>AdditionalClasspath is setting for Job DSL API plugin to set Additional Classpath</p> -</td> -</tr> -<tr> -<td> -<code>failOnMissingPlugin</code></br> -<em> -bool -</em> -</td> -<td> -<em>(Optional)</em> -<p>FailOnMissingPlugin is setting for Job DSL API plugin that fails job if required plugin is missing</p> -</td> -</tr> -<tr> -<td> -<code>unstableOnDeprecation</code></br> -<em> -bool -</em> -</td> -<td> -<em>(Optional)</em> -<p>UnstableOnDeprecation is setting for Job DSL API plugin that sets build status as unstable if build using deprecated features</p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Service">Service -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.JenkinsSpec">JenkinsSpec</a>) -</p> -<p> -<p>Service defines Kubernetes service attributes</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>annotations</code></br> -<em> -map[string]string -</em> -</td> -<td> -<em>(Optional)</em> -<p>Annotations is an unstructured key value map stored with a resource that may be -set by external tools to store and retrieve arbitrary metadata. They are not -queryable and should be preserved when modifying objects. -More info: <a href="http://kubernetes.io/docs/user-guide/annotations">http://kubernetes.io/docs/user-guide/annotations</a></p> -</td> -</tr> -<tr> -<td> -<code>labels</code></br> -<em> -map[string]string -</em> -</td> -<td> -<p>Route service traffic to pods with label keys and values matching this -selector. If empty or not present, the service is assumed to have an -external process managing its endpoints, which Kubernetes will not -modify. Only applies to types ClusterIP, NodePort, and LoadBalancer. -Ignored if type is ExternalName. -More info: <a href="https://kubernetes.io/docs/concepts/services-networking/service/">https://kubernetes.io/docs/concepts/services-networking/service/</a></p> -</td> -</tr> -<tr> -<td> -<code>type</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.12/#servicetype-v1-core"> -Kubernetes core/v1.ServiceType -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Type determines how the Service is exposed. Defaults to ClusterIP. Valid -options are ExternalName, ClusterIP, NodePort, and LoadBalancer. -&ldquo;ExternalName&rdquo; maps to the specified externalName. -&ldquo;ClusterIP&rdquo; allocates a cluster-internal IP address for load-balancing to -endpoints. Endpoints are determined by the selector or if that is not -specified, by manual construction of an Endpoints object. If clusterIP is -&ldquo;None&rdquo;, no virtual IP is allocated and the endpoints are published as a -set of endpoints rather than a stable IP. -&ldquo;NodePort&rdquo; builds on ClusterIP and allocates a port on every node which -routes to the clusterIP. -&ldquo;LoadBalancer&rdquo; builds on NodePort and creates an -external load-balancer (if supported in the current cloud) which routes -to the clusterIP. -More info: <a href="https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services---service-types">https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services&mdash;service-types</a></p> -</td> -</tr> -<tr> -<td> -<code>port</code></br> -<em> -int32 -</em> -</td> -<td> -<p>The port that is exposed by this service. -More info: <a href="https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies">https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies</a></p> -</td> -</tr> -<tr> -<td> -<code>nodePort</code></br> -<em> -int32 -</em> -</td> -<td> -<em>(Optional)</em> -<p>The port on each node on which this service is exposed when type=NodePort or LoadBalancer. -Usually assigned by the system. If specified, it will be allocated to the service -if unused, or else creation of the service will fail. -Default is to auto-allocate a port if the ServiceType of this Service requires one. -More info: <a href="https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport">https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport</a></p> -</td> -</tr> -<tr> -<td> -<code>loadBalancerSourceRanges</code></br> -<em> -[]string -</em> -</td> -<td> -<em>(Optional)</em> -<p>If specified and supported by the platform, this will restrict traffic through the cloud-provider -the load-balancer will be restricted to the specified client IPs. This field will be ignored if the -cloud-provider does not support the feature.&rdquo; -More info: <a href="https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/">https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/</a></p> -</td> -</tr> -<tr> -<td> -<code>loadBalancerIP</code></br> -<em> -string -</em> -</td> -<td> -<em>(Optional)</em> -<p>Only applies to Service Type: LoadBalancer -LoadBalancer will get created with the IP specified in this field. -This feature depends on whether the underlying cloud-provider supports specifying -the loadBalancerIP when a load balancer is created. -This field will be ignored if the cloud-provider does not support the feature.</p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Slack">Slack -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.Notification">Notification</a>) -</p> -<p> -<p>Slack is handler for Slack notification channel</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>webHookURLSecretKeySelector</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.SecretKeySelector"> -SecretKeySelector -</a> -</em> -</td> -<td> -<p>The web hook URL to Slack App</p> -</td> -</tr> -</tbody> -</table> -<hr/> -<p><em> -Generated with <code>gen-crd-api-reference-docs</code> -on git commit <code>f4c4235</code>. -</em></p> - - - - - - diff --git a/docs/docs/getting-started/v0.2.x/migration/index.html b/docs/docs/getting-started/v0.2.x/migration/index.html deleted file mode 100644 index 90993529f..000000000 --- a/docs/docs/getting-started/v0.2.x/migration/index.html +++ /dev/null @@ -1,1045 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Migration from v0.1.x | Jenkins Operator - - - - - - - - - - - - - - - - - - - - - - - - - - - - Migration from v0.1.x | Jenkins Operator - - -
- - - -
-
-
-
-
- - - - - -
- - - - -
- - - - -
- -
- - - -
-

Migration from v0.1.x

-
How to migrate from v0.1.x to v0.2.x
- - -

Major Changes

- -

Adding the seed job agent

- -

From version v0.2.0 seed jobs are not run by master executors, but by a dedicated agent deployed as a Kubernetes Pod.

- -

We’ve had disabled master executors for security reasons.

- -

Replacing configuration jobs with Groovy scripts

- -

In v0.1.x Jenkins Operator user configuration application was implemented using Jenkins jobs -and this mechanism was replaced since v0.2.0 with Groovy scripts implementing the same functionality.

- -

As a result, the Jenkins configuration jobs (“Configure Seed Jobs”, “jenkins-operator-base-configuration”, “jenkins-operator-user-configuration”) are no longer visible in Jenkins UI.

- -

In v0.1.x you can see if any of the configuration jobs failed or succeeded in the Jenkins UI (job build logs). -Instead, you can make sure the operator is running correctly by inspecting its logs, e.g.:

-
$ kubectl -n logs deployment/jenkins-operator
-

Making User Configuration sources configurable

- -

In v0.1.x Jenkins Operator user configuration was stored in a ConfigMap and a Secret -named jenkins-operator-user-configuration-<cr_name>, and its name was hardcoded in the operator.

- -

Since v0.2.0 the user configuration can be stored in a multiple ConfigMap and Secret manifests -and has to be explicitly pointed to with spec.configurationAsCode.configurations and spec.configurationAsCode.secret -for the Configuration as Code plugin, -and spec.groovyScripts.configurations and spec.groovyScripts.secret for the more advanced groovy scripts.

- -

Migration

- -

If you want to use v0.1.x operator configuration with v0.2.x you have to modify your Jenkins Custom Resource(s) -and add explicit references to the existing ConfigMap and Secret, e.g.:

-
apiVersion: jenkins.io/v1alpha2
-kind: Jenkins
-metadata:
-  name: <cr_name>
-spec:
-  ...
-  configurationAsCode:
-    configurations:
-    - name: jenkins-operator-user-configuration-<cr_name>
-    secret:
-      name: jenkins-operator-user-configuration-<cr_name>
-  groovyScripts:
-    configurations:
-    - name: jenkins-operator-user-configuration-<cr_name>
-    secret:
-      name: jenkins-operator-user-configuration-<cr_name>
-  ...
- - -
Last modified August 5, 2019 -
-
- - -
-
-
- - - - -
- - - - - - - - - - - - - - diff --git a/docs/docs/getting-started/v0.2.x/schema/index.html b/docs/docs/getting-started/v0.2.x/schema/index.html deleted file mode 100644 index 947c3c68a..000000000 --- a/docs/docs/getting-started/v0.2.x/schema/index.html +++ /dev/null @@ -1,2947 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Schema | Jenkins Operator - - - - - - - - - - - - - - - - - - - - - - - - - - - - Schema | Jenkins Operator - - -
- - - -
-
-
-
-
- - - - - -
- - - - -
- - - - -
-
- - - - - - - - - - - -
-
- - - -
-

Schema

-
API Schema definitions for Jenkins CRD
- - -
-

This document contains API scheme for jenkins-operator Custom Resource Definition manifest

- -
- - -

Packages:

- -

jenkins.io

-

-

Package v1alpha2 contains the API Schema definitions for the jenkins.io v1alpha2 API group

-

-Resource Types: - -

Jenkins -

-

-

Jenkins is the Schema for the jenkins API

-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldDescription
-apiVersion
-string
- -jenkins.io/v1alpha2 - -
-kind
-string -
Jenkins
-metadata
- - -Kubernetes meta/v1.ObjectMeta - - -
-Refer to the Kubernetes API documentation for the fields of the -metadata field. -
-spec
- - -JenkinsSpec - - -
-

Spec defines the desired state of the Jenkins

-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-master
- - -JenkinsMaster - - -
-

Master represents Jenkins master pod properties and Jenkins plugins. -Every single change here requires a pod restart.

-
-seedJobs
- - -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.SeedJob - - -
-(Optional) -

SeedJobs defines a list of Jenkins Seed Job configurations -More info: https://github.com/jenkinsci/kubernetes-operator/blob/master/docs/getting-started.md#configure-seed-jobs-and-pipelines

-
-service
- - -Service - - -
-(Optional) -

Service is the Kubernetes service of the Jenkins master HTTP pod -Defaults to : -port: 8080 -type: ClusterIP

-
-slaveService
- - -Service - - -
-(Optional) -

Service is the Kubernetes service of the Jenkins slave pods -Defaults to : -port: 50000 -type: ClusterIP

-
-backup
- - -Backup - - -
-(Optional) -

Backup defines the configuration of a Jenkins backup -More info: https://github.com/jenkinsci/kubernetes-operator/blob/master/docs/getting-started.md#configure-backup-and-restore

-
-restore
- - -Restore - - -
-(Optional) -

Backup defines the configuration of a Jenkins backup restore -More info: https://github.com/jenkinsci/kubernetes-operator/blob/master/docs/getting-started.md#configure-backup-and-restore

-
-groovyScripts
- - -GroovyScripts - - -
-(Optional) -

GroovyScripts defines the configuration of Jenkins customization via groovy scripts

-
-configurationAsCode
- - -ConfigurationAsCode - - -
-(Optional) -

ConfigurationAsCode defines the configuration of Jenkins customization via the Configuration as Code Jenkins plugin

-
-
-status
- - -JenkinsStatus - - -
-

Status defines the observed state of Jenkins

-
-

AppliedGroovyScript -

-

-(Appears on: -JenkinsStatus) -

-

-

AppliedGroovyScript is the applied groovy script in Jenkins by the operator

-

- - - - - - - - - - - - - - - - - - - - - - - - - -
FieldDescription
-configurationType
- -string - -
-

ConfigurationType is the name of the configuration type(base-groovy, user-groovy, user-casc)

-
-source
- -string - -
-

Source is the name of source where is located groovy script

-
-name
- -string - -
-

Name is the name of the groovy script

-
-Hash
- -string - -
-

Hash is the hash of the groovy script and secrets which it uses

-
-

Backup -

-

-(Appears on: -JenkinsSpec) -

-

-

Backup defines the configuration of a Jenkins backup

-

- - - - - - - - - - - - - - - - - - - - - - - - - -
FieldDescription
-containerName
- -string - -
-

ContainerName is the container name responsible for backup operation

-
-action
- - -Handler - - -
-

Action defines the action which performs the backup in the backup container sidecar

-
-interval
- -uint64 - -
-

Interval tells you how often the backup is made in seconds -Defaults to 30.

-
-makeBackupBeforePodDeletion
- -bool - -
-

MakeBackupBeforePodDeletion tells the operator to make a backup before Jenkins master pod deletion

-
-

ConfigMapRef -

-

-(Appears on: -Customization) -

-

-

ConfigMapRef is the reference to Kubernetes ConfigMap

-

- - - - - - - - - - - - - -
FieldDescription
-name
- -string - -
-
-

ConfigurationAsCode -

-

-(Appears on: -JenkinsSpec) -

-

-

ConfigurationAsCode defines configuration of Jenkins customization via the Configuration as Code Jenkins plugin

-

- - - - - - - - - - - - - -
FieldDescription
-Customization
- - -Customization - - -
-
-

Container -

-

-(Appears on: -JenkinsMaster) -

-

-

Container defines the Kubernetes container attributes

-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldDescription
-name
- -string - -
-

Name of the container specified as a DNS_LABEL. -Each container in a pod must have a unique name (DNS_LABEL).

-
-image
- -string - -
-

Docker image name. -More info: https://kubernetes.io/docs/concepts/containers/images

-
-imagePullPolicy
- - -Kubernetes core/v1.PullPolicy - - -
-

Image pull policy. -One of Always, Never, IfNotPresent. -Defaults to Always.

-
-resources
- - -Kubernetes core/v1.ResourceRequirements - - -
-

Compute Resources required by this container. -More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/

-
-command
- -[]string - -
-(Optional) -

Entrypoint array. Not executed within a shell. -The docker image’s ENTRYPOINT is used if this is not provided. -Variable references $(VAR_NAME) are expanded using the container’s environment. If a variable -cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax -can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, -regardless of whether the variable exists or not. -More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell

-
-args
- -[]string - -
-(Optional) -

Arguments to the entrypoint. -The docker image’s CMD is used if this is not provided. -Variable references $(VAR_NAME) are expanded using the container’s environment. If a variable -cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax -can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, -regardless of whether the variable exists or not. -More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell

-
-workingDir
- -string - -
-(Optional) -

Container’s working directory. -If not specified, the container runtime’s default will be used, which -might be configured in the container image.

-
-ports
- - -[]Kubernetes core/v1.ContainerPort - - -
-(Optional) -

List of ports to expose from the container. Exposing a port here gives -the system additional information about the network connections a -container uses, but is primarily informational. Not specifying a port here -DOES NOT prevent that port from being exposed. Any port which is -listening on the default “0.0.0.0” address inside a container will be -accessible from the network.

-
-envFrom
- - -[]Kubernetes core/v1.EnvFromSource - - -
-(Optional) -

List of sources to populate environment variables in the container. -The keys defined within a source must be a C_IDENTIFIER. All invalid keys -will be reported as an event when the container is starting. When a key exists in multiple -sources, the value associated with the last source will take precedence. -Values defined by an Env with a duplicate key will take precedence.

-
-env
- - -[]Kubernetes core/v1.EnvVar - - -
-(Optional) -

List of environment variables to set in the container.

-
-volumeMounts
- - -[]Kubernetes core/v1.VolumeMount - - -
-(Optional) -

Pod volumes to mount into the container’s filesystem.

-
-livenessProbe
- - -Kubernetes core/v1.Probe - - -
-(Optional) -

Periodic probe of container liveness. -Container will be restarted if the probe fails.

-
-readinessProbe
- - -Kubernetes core/v1.Probe - - -
-(Optional) -

Periodic probe of container service readiness. -Container will be removed from service endpoints if the probe fails.

-
-lifecycle
- - -Kubernetes core/v1.Lifecycle - - -
-(Optional) -

Actions that the management system should take in response to container lifecycle events.

-
-securityContext
- - -Kubernetes core/v1.SecurityContext - - -
-(Optional) -

Security options the pod should run with. -More info: https://kubernetes.io/docs/concepts/policy/security-context/ -More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/

-
-

Customization -

-

-(Appears on: -ConfigurationAsCode, -GroovyScripts) -

-

-

Customization defines configuration of Jenkins customization

-

- - - - - - - - - - - - - - - - - -
FieldDescription
-secret
- - -SecretRef - - -
-
-configurations
- - -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.ConfigMapRef - - -
-
-

GroovyScripts -

-

-(Appears on: -JenkinsSpec) -

-

-

GroovyScripts defines configuration of Jenkins customization via groovy scripts

-

- - - - - - - - - - - - - -
FieldDescription
-Customization
- - -Customization - - -
-
-

Handler -

-

-(Appears on: -Backup, -Restore) -

-

-

Handler defines a specific action that should be taken

-

- - - - - - - - - - - - - -
FieldDescription
-exec
- - -Kubernetes core/v1.ExecAction - - -
-

Exec specifies the action to take.

-
-

JenkinsCredentialType -(string alias)

-

-(Appears on: -SeedJob) -

-

-

JenkinsCredentialType defines the type of Jenkins credential used in the seed job mechanism

-

-

JenkinsMaster -

-

-(Appears on: -JenkinsSpec) -

-

-

JenkinsMaster defines the Jenkins master pod attributes and plugins, -every single change requires a Jenkins master pod restart

-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldDescription
-masterAnnotations
- -map[string]string - -
-(Optional) -

Annotations is an unstructured key value map stored with a resource that may be -set by external tools to store and retrieve arbitrary metadata. They are not -queryable and should be preserved when modifying objects. -More info: http://kubernetes.io/docs/user-guide/annotations

-
-nodeSelector
- -map[string]string - -
-(Optional) -

NodeSelector is a selector which must be true for the pod to fit on a node. -Selector which must match a node’s labels for the pod to be scheduled on that node. -More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/

-
-securityContext
- - -Kubernetes core/v1.PodSecurityContext - - -
-(Optional) -

SecurityContext that applies to all the containers of the Jenkins -Master. As per kubernetes specification, it can be overridden -for each container individually. -Defaults to: -runAsUser: 1000 -fsGroup: 1000

-
-containers
- - -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Container - - -
-

List of containers belonging to the pod. -Containers cannot currently be added or removed. -There must be at least one container in a Pod. -Defaults to: -- image: jenkins/jenkins:lts -imagePullPolicy: Always -livenessProbe: -failureThreshold: 12 -httpGet: -path: /login -port: http -scheme: HTTP -initialDelaySeconds: 80 -periodSeconds: 10 -successThreshold: 1 -timeoutSeconds: 5 -name: jenkins-master -readinessProbe: -failureThreshold: 3 -httpGet: -path: /login -port: http -scheme: HTTP -initialDelaySeconds: 30 -periodSeconds: 10 -successThreshold: 1 -timeoutSeconds: 1 -resources: -limits: -cpu: 1500m -memory: 3Gi -requests: -cpu: “1” -memory: 600Mi

-
-imagePullSecrets
- - -[]Kubernetes core/v1.LocalObjectReference - - -
-(Optional) -

ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. -If specified, these secrets will be passed to individual puller implementations for them to use. For example, -in the case of docker, only DockerConfig type secrets are honored. -More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod

-
-volumes
- - -[]Kubernetes core/v1.Volume - - -
-(Optional) -

List of volumes that can be mounted by containers belonging to the pod. -More info: https://kubernetes.io/docs/concepts/storage/volumes

-
-basePlugins
- - -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Plugin - - -
-

BasePlugins contains plugins required by operator -Defaults to : -- name: kubernetes -version: 1.15.7 -- name: workflow-job -version: “2.32” -- name: workflow-aggregator -version: “2.6” -- name: git -version: 3.10.0 -- name: job-dsl -version: “1.74” -- name: configuration-as-code -version: “1.19” -- name: kubernetes-credentials-provider -version: 0.12.1

-
-plugins
- - -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Plugin - - -
-(Optional) -

Plugins contains plugins required by user

-
-

JenkinsSpec -

-

-(Appears on: -Jenkins) -

-

-

JenkinsSpec defines the desired state of the Jenkins

-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldDescription
-master
- - -JenkinsMaster - - -
-

Master represents Jenkins master pod properties and Jenkins plugins. -Every single change here requires a pod restart.

-
-seedJobs
- - -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.SeedJob - - -
-(Optional) -

SeedJobs defines list of Jenkins Seed Job configurations -More info: https://github.com/jenkinsci/kubernetes-operator/blob/master/docs/getting-started.md#configure-seed-jobs-and-pipelines

-
-service
- - -Service - - -
-(Optional) -

Service is Kubernetes service of Jenkins master HTTP pod -Defaults to : -port: 8080 -type: ClusterIP

-
-slaveService
- - -Service - - -
-(Optional) -

Service is Kubernetes service of Jenkins slave pods -Defaults to : -port: 50000 -type: ClusterIP

-
-backup
- - -Backup - - -
-(Optional) -

Backup defines configuration of Jenkins backup -More info: https://github.com/jenkinsci/kubernetes-operator/blob/master/docs/getting-started.md#configure-backup-and-restore

-
-restore
- - -Restore - - -
-(Optional) -

Backup defines configuration of Jenkins backup restore -More info: https://github.com/jenkinsci/kubernetes-operator/blob/master/docs/getting-started.md#configure-backup-and-restore

-
-groovyScripts
- - -GroovyScripts - - -
-(Optional) -

GroovyScripts defines configuration of Jenkins customization via groovy scripts

-
-configurationAsCode
- - -ConfigurationAsCode - - -
-(Optional) -

ConfigurationAsCode defines configuration of Jenkins customization via Configuration as Code Jenkins plugin

-
-

JenkinsStatus -

-

-(Appears on: -Jenkins) -

-

-

JenkinsStatus defines the observed state of Jenkins

-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldDescription
-operatorVersion
- -string - -
-(Optional) -

OperatorVersion is the operator version which manages this CR

-
-provisionStartTime
- - -Kubernetes meta/v1.Time - - -
-(Optional) -

ProvisionStartTime is a time when Jenkins master pod has been created

-
-baseConfigurationCompletedTime
- - -Kubernetes meta/v1.Time - - -
-(Optional) -

BaseConfigurationCompletedTime is a time when Jenkins base configuration phase has been completed

-
-userConfigurationCompletedTime
- - -Kubernetes meta/v1.Time - - -
-(Optional) -

UserConfigurationCompletedTime is a time when Jenkins user configuration phase has been completed

-
-restoredBackup
- -uint64 - -
-(Optional) -

RestoredBackup is the restored backup number after Jenkins master pod restart

-
-lastBackup
- -uint64 - -
-(Optional) -

LastBackup is the latest backup number

-
-pendingBackup
- -uint64 - -
-(Optional) -

PendingBackup is the pending backup number

-
-backupDoneBeforePodDeletion
- -bool - -
-(Optional) -

BackupDoneBeforePodDeletion tells if backup before pod deletion has been made

-
-userAndPasswordHash
- -string - -
-(Optional) -

UserAndPasswordHash is a SHA256 hash made from the username and password

-
-createdSeedJobs
- -[]string - -
-(Optional) -

CreatedSeedJobs contains list of seed job ids already created in Jenkins

-
-appliedGroovyScripts
- - -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.AppliedGroovyScript - - -
-(Optional) -

AppliedGroovyScripts is a list with all applied groovy scripts in Jenkins by the operator

-
-

Mailgun -

-

-(Appears on: -Notification) -

-

-

Mailgun is handler for Mailgun email service notification channel

-

- - - - - - - - - - - - - - - - - - - - - - - - - -
FieldDescription
-domain
- -string - -
-
-apiKeySecretKeySelector
- - -SecretKeySelector - - -
-
-recipient
- -string - -
-
-from
- -string - -
-
-

MicrosoftTeams -

-

-(Appears on: -Notification) -

-

-

MicrosoftTeams is handler for Microsoft MicrosoftTeams notification channel

-

- - - - - - - - - - - - - -
FieldDescription
-webHookURLSecretKeySelector
- - -SecretKeySelector - - -
-

The web hook URL to MicrosoftTeams App

-
-

Notification -

-

-

Notification is a service configuration used to send notifications about Jenkins status

-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldDescription
-loggingLevel
- - -NotificationLogLevel - - -
-
-verbose
- -bool - -
-
-name
- -string - -
-
-slack
- - -github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Slack - - -
-
-teams
- - -github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.MicrosoftTeams - - -
-
-mailgun
- - -github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Mailgun - - -
-
-

NotificationLogLevel -(string alias)

-

-(Appears on: -Notification) -

-

-

NotificationLogLevel defines logging level of Notification

-

-

Plugin -

-

-(Appears on: -JenkinsMaster) -

-

-

Plugin defines Jenkins plugin

-

- - - - - - - - - - - - - - - - - -
FieldDescription
-name
- -string - -
-

Name is the name of Jenkins plugin

-
-version
- -string - -
-

Version is the version of Jenkins plugin

-
-

Restore -

-

-(Appears on: -JenkinsSpec) -

-

-

Restore defines configuration of Jenkins backup restore operation

-

- - - - - - - - - - - - - - - - - - - - - -
FieldDescription
-containerName
- -string - -
-

ContainerName is the container name responsible for restore backup operation

-
-action
- - -Handler - - -
-

Action defines action which performs restore backup in restore container sidecar

-
-recoveryOnce
- -uint64 - -
-(Optional) -

RecoveryOnce if want to restore specific backup set this field and then Jenkins will be restarted and desired backup will be restored

-
-

SecretKeySelector -

-

-(Appears on: -Mailgun, -MicrosoftTeams, -Slack) -

-

-

SecretKeySelector selects a key of a Secret.

-

- - - - - - - - - - - - - - - - - -
FieldDescription
-secret
- - -Kubernetes core/v1.LocalObjectReference - - -
-

The name of the secret in the pod’s namespace to select from.

-
-key
- -string - -
-

The key of the secret to select from. Must be a valid secret key.

-
-

SecretRef -

-

-(Appears on: -Customization) -

-

-

SecretRef is reference to Kubernetes secret

-

- - - - - - - - - - - - - -
FieldDescription
-name
- -string - -
-
-

SeedJob -

-

-(Appears on: -JenkinsSpec) -

-

-

SeedJob defines configuration for seed job -More info: https://github.com/jenkinsci/kubernetes-operator/blob/master/docs/getting-started.md#configure-seed-jobs-and-pipelines

-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldDescription
-id
- -string - -
-

ID is the unique seed job name

-
-credentialID
- -string - -
-

CredentialID is the Kubernetes secret name which stores repository access credentials

-
-description
- -string - -
-(Optional) -

Description is the description of the seed job

-
-targets
- -string - -
-

Targets is the repository path where the seed job definitions are

-
-repositoryBranch
- -string - -
-

RepositoryBranch is the repository branch where the seed job definitions are

-
-repositoryUrl
- -string - -
-

RepositoryURL is the repository access URL. Can be SSH or HTTPS.

-
-credentialType
- - -JenkinsCredentialType - - -
-(Optional) -

JenkinsCredentialType is the https://jenkinsci.github.io/kubernetes-credentials-provider-plugin/ credential type

-
-githubPushTrigger
- -bool - -
-(Optional) -

GitHubPushTrigger is used for GitHub web hooks

-
-buildPeriodically
- -string - -
-(Optional) -

BuildPeriodically is setting for scheduled trigger

-
-pollSCM
- -string - -
-(Optional) -

PollSCM is setting for polling changes in SCM

-
-ignoreMissingFiles
- -bool - -
-(Optional) -

IgnoreMissingFiles is setting for Job DSL API plugin to ignore files that miss

-
-additionalClasspath
- -string - -
-(Optional) -

AdditionalClasspath is setting for Job DSL API plugin to set Additional Classpath

-
-failOnMissingPlugin
- -bool - -
-(Optional) -

FailOnMissingPlugin is setting for Job DSL API plugin that fails job if required plugin is missing

-
-unstableOnDeprecation
- -bool - -
-(Optional) -

UnstableOnDeprecation is setting for Job DSL API plugin that sets build status as unstable if build using deprecated features

-
-

Service -

-

-(Appears on: -JenkinsSpec) -

-

-

Service defines Kubernetes service attributes

-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldDescription
-annotations
- -map[string]string - -
-(Optional) -

Annotations is an unstructured key value map stored with a resource that may be -set by external tools to store and retrieve arbitrary metadata. They are not -queryable and should be preserved when modifying objects. -More info: http://kubernetes.io/docs/user-guide/annotations

-
-labels
- -map[string]string - -
-

Route service traffic to pods with label keys and values matching this -selector. If empty or not present, the service is assumed to have an -external process managing its endpoints, which Kubernetes will not -modify. Only applies to types ClusterIP, NodePort, and LoadBalancer. -Ignored if type is ExternalName. -More info: https://kubernetes.io/docs/concepts/services-networking/service/

-
-type
- - -Kubernetes core/v1.ServiceType - - -
-(Optional) -

Type determines how the Service is exposed. Defaults to ClusterIP. Valid -options are ExternalName, ClusterIP, NodePort, and LoadBalancer. -“ExternalName” maps to the specified externalName. -“ClusterIP” allocates a cluster-internal IP address for load-balancing to -endpoints. Endpoints are determined by the selector or if that is not -specified, by manual construction of an Endpoints object. If clusterIP is -“None”, no virtual IP is allocated and the endpoints are published as a -set of endpoints rather than a stable IP. -“NodePort” builds on ClusterIP and allocates a port on every node which -routes to the clusterIP. -“LoadBalancer” builds on NodePort and creates an -external load-balancer (if supported in the current cloud) which routes -to the clusterIP. -More info: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services—service-types

-
-port
- -int32 - -
-

The port that is exposed by this service. -More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies

-
-nodePort
- -int32 - -
-(Optional) -

The port on each node on which this service is exposed when type=NodePort or LoadBalancer. -Usually assigned by the system. If specified, it will be allocated to the service -if unused, or else creation of the service will fail. -Default is to auto-allocate a port if the ServiceType of this Service requires one. -More info: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport

-
-loadBalancerSourceRanges
- -[]string - -
-(Optional) -

If specified and supported by the platform, this will restrict traffic through the cloud-provider -the load-balancer will be restricted to the specified client IPs. This field will be ignored if the -cloud-provider does not support the feature.” -More info: https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/

-
-loadBalancerIP
- -string - -
-(Optional) -

Only applies to Service Type: LoadBalancer -LoadBalancer will get created with the IP specified in this field. -This feature depends on whether the underlying cloud-provider supports specifying -the loadBalancerIP when a load balancer is created. -This field will be ignored if the cloud-provider does not support the feature.

-
-

Slack -

-

-(Appears on: -Notification) -

-

-

Slack is handler for Slack notification channel

-

- - - - - - - - - - - - - -
FieldDescription
-webHookURLSecretKeySelector
- - -SecretKeySelector - - -
-

The web hook URL to Slack App

-
-
-

-Generated with gen-crd-api-reference-docs -on git commit f4c4235. -

- - - -
Last modified August 5, 2019 -
-
- - -
-
-
- - - - -
- - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/docs/getting-started/v0.3.x/aks/index.html b/docs/docs/getting-started/v0.3.x/aks/index.html deleted file mode 100644 index 62b95042c..000000000 --- a/docs/docs/getting-started/v0.3.x/aks/index.html +++ /dev/null @@ -1,986 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -AKS | Jenkins Operator - - - - - - - - - - - - - - - - - - - - - - - - - - - - AKS | Jenkins Operator - - -
- - - -
-
-
-
-
- - - - - -
- - - - -
- - - - -
-
- - - - - - - - - - - -
-
- - - -
-

AKS

-
Additional configuration for Azure Kubernetes Service
-

Azure AKS managed Kubernetes service adds to every pod the following environment variables:

-
- name: KUBERNETES_PORT_443_TCP_ADDR
-  value:
-- name: KUBERNETES_PORT
-  value: tcp://
-- name: KUBERNETES_PORT_443_TCP
-  value: tcp://
-- name: KUBERNETES_SERVICE_HOST
-  value:
-

The operator is aware of it and omits these environment variables when checking if a Jenkins pod environment has been changed. It prevents the -restart of a Jenkins pod over and over again.

- - - -
Last modified December 20, 2019 -
-
- - -
-
-
- - - - -
- - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/docs/getting-started/v0.3.x/configuration/index.html b/docs/docs/getting-started/v0.3.x/configuration/index.html deleted file mode 100644 index 7ce8bc56e..000000000 --- a/docs/docs/getting-started/v0.3.x/configuration/index.html +++ /dev/null @@ -1,1264 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Configuration | Jenkins Operator - - - - - - - - - - - - - - - - - - - - - - - - - - - - Configuration | Jenkins Operator - - -
- - - -
-
-
-
-
- - - - - -
- - - - -
- - - - -
- -
- - - -
-

Configuration

-
How to configure Jenkins with Operator
- - -

Configure Seed Jobs and Pipelines

- -

Jenkins operator uses job-dsl and kubernetes-credentials-provider plugins for configuring jobs -and deploy keys.

- -

Prepare job definitions and pipelines

- -

First you have to prepare pipelines and job definition in your GitHub repository using the following structure:

-
cicd/
-├── jobs
-│   └── build.jenkins
-└── pipelines
-    └── build.jenkins
-

cicd/jobs/build.jenkins is a job definition:

-
#!/usr/bin/env groovy
-
-pipelineJob('build-jenkins-operator') {
-    displayName('Build jenkins-operator')
-
-    definition {
-        cpsScm {
-            scm {
-                git {
-                    remote {
-                        url('https://github.com/jenkinsci/kubernetes-operator.git')
-                        credentials('jenkins-operator')
-                    }
-                    branches('*/master')
-                }
-            }
-            scriptPath('cicd/pipelines/build.jenkins')
-        }
-    }
-}
-

cicd/pipelines/build.jenkins is an actual Jenkins pipeline:

-
#!/usr/bin/env groovy
-
-def label = "build-jenkins-operator-${UUID.randomUUID().toString()}"
-def home = "/home/jenkins"
-def workspace = "${home}/workspace/build-jenkins-operator"
-def workdir = "${workspace}/src/github.com/jenkinsci/kubernetes-operator/"
-
-podTemplate(label: label,
-        containers: [
-                containerTemplate(name: 'jnlp', image: 'jenkins/inbound-agent:alpine'),
-                containerTemplate(name: 'go', image: 'golang:1-alpine', command: 'cat', ttyEnabled: true),
-        ],
-        envVars: [
-                envVar(key: 'GOPATH', value: workspace),
-        ],
-        ) {
-
-    node(label) {
-        dir(workdir) {
-            stage('Init') {
-                timeout(time: 3, unit: 'MINUTES') {
-                    checkout scm
-                }
-                container('go') {
-                    sh 'apk --no-cache --update add make git gcc libc-dev'
-                }
-            }
-
-            stage('Dep') {
-                container('go') {
-                    sh 'make dep'
-                }
-            }
-
-            stage('Test') {
-                container('go') {
-                    sh 'make test'
-                }
-            }
-
-            stage('Build') {
-                container('go') {
-                    sh 'make build'
-                }
-            }
-        }
-    }
-}
-

Configure Seed Jobs

- -

Jenkins Seed Jobs are configured using Jenkins.spec.seedJobs section from your custom resource manifest:

-
apiVersion: jenkins.io/v1alpha2
-kind: Jenkins
-metadata:
-  name: example
-spec:
-  seedJobs:
-  - id: jenkins-operator
-    targets: "cicd/jobs/*.jenkins"
-    description: "Jenkins Operator repository"
-    repositoryBranch: master
-    repositoryUrl: https://github.com/jenkinsci/kubernetes-operator.git
-

Jenkins Operator will automatically discover and configure all the seed jobs.

- -

You can verify if deploy keys were successfully configured in the Jenkins Credentials tab.

- -

jenkins

- -

You can verify if your pipelines were successfully configured in the Jenkins Seed Job console output.

- -

jenkins

- -

If your GitHub repository is private you have to configure SSH or username/password authentication.

- -

SSH authentication

- -

Generate SSH Keys

- -

There are two methods of SSH private key generation:

-
$ openssl genrsa -out <filename> 2048
-

or

-
$ ssh-keygen -t rsa -b 2048
-$ ssh-keygen -p -f <filename> -m pem
-

Then copy content from generated file.

- -

Public key

- -

If you want to upload your public key to your Git server you need to extract it.

- -

If key was generated by openssl then you need to type this to extract public key:

-
$ openssl rsa -in <filename> -pubout > <filename>.pub
-

If key was generated by ssh-keygen the public key content is located in .pub and there is no need to extract public key

- -

Configure SSH authentication

- -

Configure a seed job like this:

-
apiVersion: jenkins.io/v1alpha2
-kind: Jenkins
-metadata:
-  name: example
-spec:
-  seedJobs:
-  - id: jenkins-operator-ssh
-    credentialType: basicSSHUserPrivateKey
-    credentialID: k8s-ssh
-    targets: "cicd/jobs/*.jenkins"
-    description: "Jenkins Operator repository"
-    repositoryBranch: master
-    repositoryUrl: ssh://git@github.com:jenkinsci/kubernetes-operator.git
-

and create a Kubernetes Secret (name of secret should be the same from credentialID field):

-
apiVersion: v1
-kind: Secret
-metadata:
-  name: k8s-ssh
-stringData:
-  privateKey: |
-    -----BEGIN RSA PRIVATE KEY-----
-    MIIJKAIBAAKCAgEAxxDpleJjMCN5nusfW/AtBAZhx8UVVlhhhIKXvQ+dFODQIdzO
-    oDXybs1zVHWOj31zqbbJnsfsVZ9Uf3p9k6xpJ3WFY9b85WasqTDN1xmSd6swD4N8
-    ...
-  username: github_user_name
-

Username & password authentication

- -

Configure the seed job like:

-
apiVersion: jenkins.io/v1alpha2
-kind: Jenkins
-metadata:
-  name: example
-spec:
-  seedJobs:
-  - id: jenkins-operator-user-pass
-    credentialType: usernamePassword
-    credentialID: k8s-user-pass
-    targets: "cicd/jobs/*.jenkins"
-    description: "Jenkins Operator repository"
-    repositoryBranch: master
-    repositoryUrl: https://github.com/jenkinsci/kubernetes-operator.git
-

and create a Kubernetes Secret (name of secret should be the same from credentialID field):

-
apiVersion: v1
-kind: Secret
-metadata:
-  name: k8s-user-pass
-stringData:
-  username: github_user_name
-  password: password_or_token
-

HTTP Proxy for downloading plugins

- -

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.:

-
spec:
-  master:
-    containers:
-      - name: jenkins-master
-        env:
-          - name: CURL_OPTIONS
-            value: -L -x <proxy_url>
-

In CURL_OPTIONS var you can set additional arguments to curl command.

- -

Pulling Docker images from private repositories

- -

To pull a Docker Image from private repository you can use imagePullSecrets.

- -

Please follow the instructions on creating a secret with a docker config.

- -

Docker Hub Configuration

- -

To use Docker Hub additional steps are required.

- -

Edit the previously created secret:

-
kubectl -n <namespace> edit secret <name>
-

The .dockerconfigjson key’s value needs to be replaced with a modified version.

- -

After modifications, it needs to be encoded as a Base64 value before setting the .dockerconfigjson key.

- -

Example config file to modify and use:

-
{
-    "auths":{
-        "https://index.docker.io/v1/":{
-            "username":"user",
-            "password":"password",
-            "email":"yourdockeremail@gmail.com",
-            "auth":"base64 of string user:password"
-        },
-        "auth.docker.io":{
-            "username":"user",
-            "password":"password",
-            "email":"yourdockeremail@gmail.com",
-            "auth":"base64 of string user:password"
-        },
-        "registry.docker.io":{
-            "username":"user",
-            "password":"password",
-            "email":"yourdockeremail@gmail.com",
-            "auth":"base64 of string user:password"
-        },
-        "docker.io":{
-            "username":"user",
-            "password":"password",
-            "email":"yourdockeremail@gmail.com",
-            "auth":"base64 of string user:password"
-        },
-        "https://registry-1.docker.io/v2/": {
-            "username":"user",
-            "password":"password",
-            "email":"yourdockeremail@gmail.com",
-            "auth":"base64 of string user:password"
-        },
-        "registry-1.docker.io/v2/": {
-            "username":"user",
-            "password":"password",
-            "email":"yourdockeremail@gmail.com",
-            "auth":"base64 of string user:password"
-        },
-        "registry-1.docker.io": {
-            "username":"user",
-            "password":"password",
-            "email":"yourdockeremail@gmail.com",
-            "auth":"base64 of string user:password"
-        },
-        "https://registry-1.docker.io": {
-            "username":"user",
-            "password":"password",
-            "email":"yourdockeremail@gmail.com",
-            "auth":"base64 of string user:password"
-        }
-    }
-}
- - -
Last modified December 20, 2019 -
-
- - -
-
-
- - - - -
- - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/docs/getting-started/v0.3.x/configure-backup-and-restore/index.html b/docs/docs/getting-started/v0.3.x/configure-backup-and-restore/index.html deleted file mode 100644 index 424cc8720..000000000 --- a/docs/docs/getting-started/v0.3.x/configure-backup-and-restore/index.html +++ /dev/null @@ -1,1062 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Configure backup and restore | Jenkins Operator - - - - - - - - - - - - - - - - - - - - - - - - - - - - Configure backup and restore | Jenkins Operator - - -
- - - -
-
-
-
-
- - - - - -
- - - - -
- - - - -
-
- - - - - - - - - - - - - - - -
-
- - - -
-

Configure backup and restore

-
Prevent loss of job history
- - -

Backup and restore is done by a container sidecar.

- -

PVC

- -

Create PVC

- -

Save to the file named pvc.yaml:

-
apiVersion: v1
-kind: PersistentVolumeClaim
-metadata:
-  name: <pvc_name>
-  namespace: <namespace>
-spec:
-  accessModes:
-  - ReadWriteOnce
-  resources:
-    requests:
-      storage: 500Gi
-

Run the following command:

-
$ kubectl -n <namespace> create -f pvc.yaml
-

Configure Jenkins CR

-
apiVersion: jenkins.io/v1alpha2
-kind: Jenkins
-metadata:
-  name: <cr_name>
-  namespace: <namespace>
-spec:
-  master:
-    securityContext:
-      runAsUser: 1000
-      fsGroup: 1000
-    containers:
-    - name: jenkins-master
-      image: jenkins/jenkins:lts
-    - name: backup # container responsible for the backup and restore
-      env:
-      - name: BACKUP_DIR
-        value: /backup
-      - name: JENKINS_HOME
-        value: /jenkins-home
-      - name: BACKUP_COUNT
-        value: "3" # keep only the 2 most recent backups
-      image: virtuslab/jenkins-operator-backup-pvc:v0.0.8 # look at backup/pvc directory
-      imagePullPolicy: IfNotPresent
-      volumeMounts:
-      - mountPath: /jenkins-home # Jenkins home volume
-        name: jenkins-home
-      - mountPath: /backup # backup volume
-        name: backup
-    volumes:
-    - name: backup # PVC volume where backups will be stored
-      persistentVolumeClaim:
-        claimName: <pvc_name>
-  backup:
-    containerName: backup # container name is responsible for backup
-    action:
-      exec:
-        command:
-        - /home/user/bin/backup.sh # this command is invoked on "backup" container to make backup, for example /home/user/bin/backup.sh <backup_number>, <backup_number> is passed by operator
-    interval: 30 # how often make backup in seconds
-    makeBackupBeforePodDeletion: true # make a backup before pod deletion
-  restore:
-    containerName: backup # container name is responsible for restore backup
-    action:
-      exec:
-        command:
-        - /home/user/bin/restore.sh # this command is invoked on "backup" container to make restore backup, for example /home/user/bin/restore.sh <backup_number>, <backup_number> is passed by operator
-    #recoveryOnce: <backup_number> # if want to restore specific backup configure this field and then Jenkins will be restarted and desired backup will be restored
- - -
Last modified December 20, 2019 -
-
- - -
-
-
- - - - -
- - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/docs/getting-started/v0.3.x/custom-backup-and-restore/index.html b/docs/docs/getting-started/v0.3.x/custom-backup-and-restore/index.html deleted file mode 100644 index 3bd012108..000000000 --- a/docs/docs/getting-started/v0.3.x/custom-backup-and-restore/index.html +++ /dev/null @@ -1,1158 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Custom Backup and Restore Providers | Jenkins Operator - - - - - - - - - - - - - - - - - - - - - - - - - - - - Custom Backup and Restore Providers | Jenkins Operator - - -
- - - -
-
-
-
-
- - - - - -
- - - - -
- - - - -
- -
- - - -
-

Custom Backup and Restore Providers

-
Custom backup and restore provider
- - -

With enough effort one can create a custom backup and restore provider -for the Jenkins Operator.

- -

Requirements

- -

Two commands (e.g. scripts) are required:

- -
    -
  • a backup command, e.g. backup.sh that takes one argument, a backup number
  • -
  • a restore command, e.g. backup.sh that takes one argument, a backup number
  • -
- -

Both scripts need to return an exit code of 0 on success and 1 or greater for failure.

- -

One of those scripts (or the entry point of the container) needs to be responsible -for backup cleanup or rotation if required, or an external system.

- -

How it works

- -

The mechanism relies on basic Kubernetes and UNIX functionalities.

- -

The backup (and restore) container runs as a sidecar in the same -Kubernetes pod as the Jenkins master.

- -

Name of the backup and restore containers can be set as necessary using -spec.backup.containerName and spec.restore.containerName. -In most cases it will be the same container, but we allow for less common use cases.

- -

The operator will call a backup or restore commands inside a sidecar container when necessary:

- -
    -
  • backup command (defined in spec.backup.action.exec.command) -will be called every N seconds configurable in: spec.backup.interval -and on pod shutdown (if enabled in spec.backup.makeBackupBeforePodDeletion) -with an integer representing the current backup number as first and only argument
  • -
  • restore command (defined in spec.restore.action.exec.command) -will be called at Jenkins startup -with an integer representing the backup number to restore as first and only argument -(can be overridden using spec.restore.recoveryOnce)
  • -
- -

Example AWS S3 backup using the CLI

- -

This example shows abbreviated version of a simple AWS S3 backup implementation -using: aws-cli, bash and kube2iam.

- -

In addition to your normal Jenkins CustomResource some additional settings -for backup and restore are required, e.g.:

-
kind: Jenkins
-apiVersion: jenkins.io/v1alpha1
-metadata:
-  name: example
-  namespace: jenkins
-spec:
-  master:
-    masterAnnotations:
-      iam.amazonaws.com/role: "my-example-backup-role" # tell kube2iam where the AWS IAM role is
-    containers:
-      - name: jenkins-master
-        ...
-      - name: backup # container responsible for backup and restore
-        image: quay.io/virtuslab/aws-cli:1.16.263-2
-        workingDir: /home/user/bin/
-        command: # our container entry point
-          - sleep
-          - infinity
-        env:
-          - name: BACKUP_BUCKET
-            value: my-example-bucket # the S3 bucket name to use
-          - name: BACKUP_PATH
-            value: my-backup-path # the S3 bucket path prefix to use
-          - name: JENKINS_HOME
-            value: /jenkins-home # the path to mount jenkins home dir in the backup container
-        volumeMounts:
-          - mountPath: /jenkins-home # Jenkins home volume
-            name: jenkins-home
-          - mountPath: /home/user/bin/backup.sh
-            name: backup-scripts
-            subPath: backup.sh
-            readOnly: true
-          - mountPath: /home/user/bin/restore.sh
-            name: backup-scripts
-            subPath: restore.sh
-            readOnly: true
-    volumes:
-      - name: backup-scripts
-        configMap:
-          defaultMode: 0754
-          name: jenkins-operator-backup-s3
-    securityContext: # make sure both containers use the same UID and GUID
-      runAsUser: 1000
-      fsGroup: 1000
-  ...
-  backup:
-    containerName: backup # container name responsible for backup
-    interval: 3600 # how often make a backup in seconds
-    makeBackupBeforePodDeletion: true # trigger backup just before deleting the pod
-    action:
-      exec:
-        command:
-          # this command is invoked on "backup" container to create a backup,
-          # <backup_number> is passed by operator,
-          # for example /home/user/bin/backup.sh <backup_number>
-          - /home/user/bin/backup.sh
-  restore:
-    containerName: backup # container name is responsible for restore backup
-    action:
-      exec:
-        command:
-          # this command is invoked on "backup" container to restore a backup,
-          # <backup_number> is passed by operator
-          # for example /home/user/bin/restore.sh <backup_number>
-          - /home/user/bin/restore.sh
-#    recoveryOnce: <backup_number> # if want to restore specific backup configure this field and then Jenkins will be restarted and desired backup will be restored
-

The actual backup and restore scripts will be provided in a ConfigMap:

-
kind: ConfigMap
-apiVersion: v1
-metadata:
-  name: jenkins-operator-backup-s3
-  namespace: jenkins
-  labels:
-    app: jenkins-operator
-data:
-  backup.sh: |-
-    #!/bin/bash -xeu
-    [[ ! $# -eq 1 ]] && echo "Usage: $0 backup_number" && exit 1;
-    [[ -z "${BACKUP_BUCKET}" ]] && echo "Required 'BACKUP_BUCKET' env not set" && exit 1;
-    [[ -z "${BACKUP_PATH}" ]] && echo "Required 'BACKUP_PATH' env not set" && exit 1;
-    [[ -z "${JENKINS_HOME}" ]] && echo "Required 'JENKINS_HOME' env not set" && exit 1;
-
-    backup_number=$1
-    echo "Running backup #${backup_number}"
-
-    BACKUP_TMP_DIR=$(mktemp -d)
-    tar -C ${JENKINS_HOME} -czf "${BACKUP_TMP_DIR}/${backup_number}.tar.gz" --exclude jobs/*/workspace* -c jobs && \
-
-    aws s3 cp ${BACKUP_TMP_DIR}/${backup_number}.tar.gz s3://${BACKUP_BUCKET}/${BACKUP_PATH}/${backup_number}.tar.gz
-    echo Done
-
-  restore.sh: |-
-    #!/bin/bash -xeu
-    [[ ! $# -eq 1 ]] && echo "Usage: $0 backup_number" && exit 1
-    [[ -z "${BACKUP_BUCKET}" ]] && echo "Required 'BACKUP_BUCKET' env not set" && exit 1;
-    [[ -z "${BACKUP_PATH}" ]] && echo "Required 'BACKUP_PATH' env not set" && exit 1;
-    [[ -z "${JENKINS_HOME}" ]] && echo "Required 'JENKINS_HOME' env not set" && exit 1;
-
-    backup_number=$1
-    echo "Running restore #${backup_number}"
-
-    BACKUP_TMP_DIR=$(mktemp -d)
-    aws s3 cp s3://${BACKUP_BUCKET}/${BACKUP_PATH}/${backup_number}.tar.gz ${BACKUP_TMP_DIR}/${backup_number}.tar.gz
-
-    tar -C ${JENKINS_HOME} -zxf "${BACKUP_TMP_DIR}/${backup_number}.tar.gz"
-    echo Done
-

In our example we will use S3 bucket lifecycle policy to keep -the number of backups under control, e.g. Cloud Formation fragment:

-
    Type: AWS::S3::Bucket
-    Properties:
-      BucketName: my-example-bucket
-      ...
-      LifecycleConfiguration:
-        Rules:
-          - Id: BackupCleanup
-            Status: Enabled
-            Prefix: my-backup-path
-            ExpirationInDays: 7
-            NoncurrentVersionExpirationInDays: 14
-            AbortIncompleteMultipartUpload:
-              DaysAfterInitiation: 3
- - -
Last modified December 20, 2019 -
-
- - -
-
-
- - - - -
- - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/docs/getting-started/v0.3.x/customization/index.html b/docs/docs/getting-started/v0.3.x/customization/index.html deleted file mode 100644 index 2704d77d7..000000000 --- a/docs/docs/getting-started/v0.3.x/customization/index.html +++ /dev/null @@ -1,1138 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Customization | Jenkins Operator - - - - - - - - - - - - - - - - - - - - - - - - - - - - Customization | Jenkins Operator - - -
- - - -
-
-
-
-
- - - - - -
- - - - -
- - - - -
-
- - - - - - - - - - - - - - - -
-
- - - -
-

Customization

-
How to customize Jenkins
- - -

Jenkins can be customized using groovy scripts or the configuration as code plugin. -By using a ConfigMap you can create your own Jenkins customized configuration. -Then you must reference the ConfigMap in the Jenkins pod customization file in spec.groovyScripts or spec.configurationAsCode

- -

For example create a ConfigMap with name jenkins-operator-user-configuration. Then, modify the Jenkins manifest to look like this:

-
apiVersion: jenkins.io/v1alpha2
-kind: Jenkins
-metadata:
-  name: example
-spec:
-  configurationAsCode:
-    configurations: 
-    - name: jenkins-operator-user-configuration
-  groovyScripts:
-    configurations:
-    - name: jenkins-operator-user-configuration
-

Here is an example of jenkins-operator-user-configuration:

-
apiVersion: v1
-kind: ConfigMap
-metadata:
-  name: jenkins-operator-user-configuration
-data:
-  1-configure-theme.groovy: | 
-    import jenkins.*
-    import jenkins.model.*
-    import hudson.*
-    import hudson.model.*
-    import org.jenkinsci.plugins.simpletheme.ThemeElement
-    import org.jenkinsci.plugins.simpletheme.CssTextThemeElement
-    import org.jenkinsci.plugins.simpletheme.CssUrlThemeElement
-
-    Jenkins jenkins = Jenkins.getInstance()
-
-    def decorator = Jenkins.instance.getDescriptorByType(org.codefirst.SimpleThemeDecorator.class)
-
-    List<ThemeElement> configElements = new ArrayList<>();
-    configElements.add(new CssTextThemeElement("DEFAULT"));
-    configElements.add(new CssUrlThemeElement("https://cdn.rawgit.com/afonsof/jenkins-material-theme/gh-pages/dist/material-light-green.css"));
-    decorator.setElements(configElements);
-    decorator.save();
-
-    jenkins.save()
-  1-system-message.yaml: |
-    jenkins:
-      systemMessage: "Configuration as Code integration works!!!"
-
    -
  • *.groovy is Groovy script configuration
  • -
  • *.yaml is configuration as code
  • -
- -

If you want to correct your configuration you can edit it while the Jenkins Operator is running. -Jenkins will reconcile and apply the new configuration.

- -

Using secrets from a Groovy script

- -

If you configured spec.groovyScripts.secret.name, then this secret is available to use from map Groovy scripts. -The secrets are loaded to secrets map.

- -

Create a secret with for example the name jenkins-conf-secrets.

-
kind: Secret
-apiVersion: v1
-type: Opaque
-metadata:
-  name: jenkins-conf-secrets
-  namespace: default
-data:
-  SYSTEM_MESSAGE: SGVsbG8gd29ybGQ=
-

Then modify the Jenkins pod manifest by changing spec.groovyScripts.secret.name to jenkins-conf-secrets.

-
apiVersion: jenkins.io/v1alpha2
-kind: Jenkins
-metadata:
-  name: example
-spec:
-  configurationAsCode:
-    configurations: 
-    - name: jenkins-operator-user-configuration
-    secret:
-      name: jenkins-conf-secrets
-  groovyScripts:
-    configurations:
-    - name: jenkins-operator-user-configuration
-    secret:
-      name: jenkins-conf-secrets
-

Now you can test that the secret is mounted by applying this ConfigMap for Groovy script:

-
apiVersion: v1
-kind: ConfigMap
-metadata:
-  name: jenkins-operator-user-configuration
-data:
-  1-system-message.groovy: | 
-    import jenkins.*
-    import jenkins.model.*
-    import hudson.*
-    import hudson.model.*
-    Jenkins jenkins = Jenkins.getInstance()
-    
-    jenkins.setSystemMessage(secrets["SYSTEM_MESSAGE"])
-    jenkins.save()
-

Or by applying this configuration as code:

-
apiVersion: v1
-kind: ConfigMap
-metadata:
-  name: jenkins-operator-user-configuration
-data:
-  1-system-message.yaml: |
-    jenkins:
-      systemMessage: ${SYSTEM_MESSAGE}
-

After this, you should see the Hello world system message from the Jenkins homepage.

- -

Install Plugins

- -

Edit Custom Resource under spec.master.plugins:

-
apiVersion: jenkins.io/v1alpha2
-kind: Jenkins
-metadata:
-  name: example
-spec:
-  master:
-   plugins:
-   - name: simple-theme-plugin
-     version: 0.5.1
-

Under spec.master.basePlugins you can find plugins for a valid Jenkins Operator:

-
apiVersion: jenkins.io/v1alpha2
-kind: Jenkins
-metadata:
-  name: example
-spec:
-  master:
-    basePlugins:
-    - name: kubernetes
-      version: 1.18.3
-    - name: workflow-job
-      version: "2.34"
-    - name: workflow-aggregator
-      version: "2.6"
-    - name: git
-      version: 3.12.0
-    - name: job-dsl
-      version: "1.76"
-    - name: configuration-as-code
-      version: "1.29"
-    - name: kubernetes-credentials-provider
-      version: 0.12.1
-

You can change their versions.

- -

The Jenkins Operator will then automatically install plugins after the Jenkins master pod restarts.

- - - -
Last modified December 20, 2019 -
-
- - -
-
-
- - - - -
- - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/docs/getting-started/v0.3.x/deploy-jenkins/index.html b/docs/docs/getting-started/v0.3.x/deploy-jenkins/index.html deleted file mode 100644 index 6895fff4e..000000000 --- a/docs/docs/getting-started/v0.3.x/deploy-jenkins/index.html +++ /dev/null @@ -1,1034 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Deploy Jenkins | Jenkins Operator - - - - - - - - - - - - - - - - - - - - - - - - - - - - Deploy Jenkins | Jenkins Operator - - -
- - - -
-
-
-
-
- - - - - -
- - - - -
- - - - -
-
- - - - - - - - - - - -
-
- - - -
-

Deploy Jenkins

-
Deploy production ready Jenkins Operator manifest
-

Once Jenkins Operator is up and running let’s deploy actual Jenkins instance. -Create manifest e.g. jenkins_instance.yaml with following data and save it on drive.

-
apiVersion: jenkins.io/v1alpha2
-kind: Jenkins
-metadata:
-  name: example
-spec:
-  master:
-    containers:
-    - name: jenkins-master
-      image: jenkins/jenkins:lts
-      imagePullPolicy: Always
-      livenessProbe:
-        failureThreshold: 12
-        httpGet:
-          path: /login
-          port: http
-          scheme: HTTP
-        initialDelaySeconds: 80
-        periodSeconds: 10
-        successThreshold: 1
-        timeoutSeconds: 5
-      readinessProbe:
-        failureThreshold: 3
-        httpGet:
-          path: /login
-          port: http
-          scheme: HTTP
-        initialDelaySeconds: 30
-        periodSeconds: 10
-        successThreshold: 1
-        timeoutSeconds: 1
-      resources:
-        limits:
-          cpu: 1500m
-          memory: 3Gi
-        requests:
-          cpu: "1"
-          memory: 500Mi
-  seedJobs:
-  - id: jenkins-operator
-    targets: "cicd/jobs/*.jenkins"
-    description: "Jenkins Operator repository"
-    repositoryBranch: master
-    repositoryUrl: https://github.com/jenkinsci/kubernetes-operator.git
-

Deploy a Jenkins to Kubernetes:

-
kubectl create -f jenkins_instance.yaml
-

Watch the Jenkins instance being created:

-
kubectl get pods -w
-

Get the Jenkins credentials:

-
kubectl get secret jenkins-operator-credentials-<cr_name> -o 'jsonpath={.data.user}' | base64 -d
-kubectl get secret jenkins-operator-credentials-<cr_name> -o 'jsonpath={.data.password}' | base64 -d
-

Connect to the Jenkins instance (minikube):

-
minikube service jenkins-operator-http-<cr_name> --url
-

Connect to the Jenkins instance (actual Kubernetes cluster):

-
kubectl port-forward jenkins-<cr_name> 8080:8080
-

Then open browser with address http://localhost:8080.

- -

jenkins

- - - -
Last modified December 20, 2019 -
-
- - -
-
-
- - - - -
- - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/docs/getting-started/v0.3.x/diagnostics/index.html b/docs/docs/getting-started/v0.3.x/diagnostics/index.html deleted file mode 100644 index 81f251b62..000000000 --- a/docs/docs/getting-started/v0.3.x/diagnostics/index.html +++ /dev/null @@ -1,991 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Diagnostics | Jenkins Operator - - - - - - - - - - - - - - - - - - - - - - - - - - - - Diagnostics | Jenkins Operator - - -
- - - -
-
-
-
-
- - - - - -
- - - - -
- - - - -
-
- - - - - - - - - - - - - -
-
- - - -
-

Diagnostics

-
How to deal with Jenkins Operator problems
- - -

Turn on debug in Jenkins Operator deployment:

-
sed -i 's|\(args:\).*|\1\ ["--debug"\]|' deploy/operator.yaml
-kubectl apply -f deploy/operator.yaml
-

Watch Kubernetes events:

-
kubectl get events --sort-by='{.lastTimestamp}'
-

Verify Jenkins master logs:

-
kubectl logs -f jenkins-<cr_name>
-

Verify the jenkins-operator logs:

-
kubectl logs deployment/jenkins-operator
-

Troubleshooting

- -

Delete the Jenkins master pod and wait for the new one to come up:

-
kubectl delete pod jenkins-<cr_name>
- - -
Last modified December 20, 2019 -
-
- - -
-
-
- - - - -
- - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/docs/getting-started/v0.3.x/index.html b/docs/docs/getting-started/v0.3.x/index.html deleted file mode 100644 index 50e3d1e54..000000000 --- a/docs/docs/getting-started/v0.3.x/index.html +++ /dev/null @@ -1,1234 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - -v0.3.x | Jenkins Operator - - - - - - - - - - - - - - - - - - - - v0.3.x | Jenkins Operator - - -
- - - -
-
-
-
-
- - - - - -
- - - - -
- - - - -
-
- - - - - - - - - - - - - -
-
- - - -
-

v0.3.x

-
How to work with Jenkins Operator 0.3.x version. We recommend migrating to a newer version.
- - - - -
-

This document describes a getting started guide for Jenkins Operator v0.3.x and also additional configuration.

- -
- - -

First Steps

- -

Prepare your Kubernetes cluster and set up your kubectl access.

- -

Once you have running Kubernetes cluster you can focus on installing Jenkins Operator according to the Installation guide.

- -
- - - - -
- - - - - - - - - - - - - - - - - - -
-
- Deploy Jenkins -
-

Deploy production ready Jenkins Operator manifest -

-
- - - - - - - - - - - - - - - - - - - - - -
-
- Configuration -
-

How to configure Jenkins with Operator -

-
- - - - - - - - - - - - - - - - - -
-
- Customization -
-

How to customize Jenkins -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- Migration from v0.2.x -
-

How to migrate from v0.2.x to v0.3.x -

-
- - - -
-
- AKS -
-

Additional configuration for Azure Kubernetes Service -

-
- - - -
-
- Configure backup and restore -
-

Prevent loss of job history -

-
- - - -
-
- Custom Backup and Restore Providers -
-

Custom backup and restore provider -

-
- - - -
-
- Notifications -
-

How to setup operator notifications. -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- Diagnostics -
-

How to deal with Jenkins Operator problems -

-
- - - -
-
- Schema -
-

API Schema definitions for Jenkins CRD -

-
- - - - - - - - - - - - - -
- - - -
Last modified August 19, 2021 -
-
- -
-
-
- - - - -
- - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/docs/getting-started/v0.3.x/index.xml b/docs/docs/getting-started/v0.3.x/index.xml deleted file mode 100644 index 814449ba7..000000000 --- a/docs/docs/getting-started/v0.3.x/index.xml +++ /dev/null @@ -1,3164 +0,0 @@ - - - Jenkins Operator – v0.3.x - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.3.x/ - Recent Hugo news from gohugo.io - Hugo -- gohugo.io - Thu, 19 Aug 2021 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/img/hugo.png - GoHugo.io - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.3.x/ - - - - - - - - - - - - Docs: Deploy Jenkins - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.3.x/deploy-jenkins/ - Fri, 20 Dec 2019 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.3.x/deploy-jenkins/ - - - - <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: - name: example -spec: - master: - containers: - - name: jenkins-master - image: jenkins/jenkins:lts - imagePullPolicy: Always - livenessProbe: - failureThreshold: <span style="color:#0000cf;font-weight:bold">12</span> - httpGet: - path: /login - port: http - scheme: HTTP - initialDelaySeconds: <span style="color:#0000cf;font-weight:bold">80</span> - periodSeconds: <span style="color:#0000cf;font-weight:bold">10</span> - successThreshold: <span style="color:#0000cf;font-weight:bold">1</span> - timeoutSeconds: <span style="color:#0000cf;font-weight:bold">5</span> - readinessProbe: - failureThreshold: <span style="color:#0000cf;font-weight:bold">3</span> - httpGet: - path: /login - port: http - scheme: HTTP - initialDelaySeconds: <span style="color:#0000cf;font-weight:bold">30</span> - periodSeconds: <span style="color:#0000cf;font-weight:bold">10</span> - successThreshold: <span style="color:#0000cf;font-weight:bold">1</span> - timeoutSeconds: <span style="color:#0000cf;font-weight:bold">1</span> - resources: - limits: - cpu: 1500m - memory: 3Gi - requests: - cpu: <span style="color:#4e9a06">&#34;1&#34;</span> - memory: 500Mi - seedJobs: - - id: jenkins-operator - targets: <span style="color:#4e9a06">&#34;cicd/jobs/*.jenkins&#34;</span> - description: <span style="color:#4e9a06">&#34;Jenkins Operator repository&#34;</span> - repositoryBranch: master - repositoryUrl: https://github.com/jenkinsci/kubernetes-operator.git</code></pre></div> -<p>Deploy a Jenkins to 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> -<p>Get the Jenkins credentials:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl get secret jenkins-operator-credentials-&lt;cr_name&gt; -o <span style="color:#4e9a06">&#39;jsonpath={.data.user}&#39;</span> <span style="color:#000;font-weight:bold">|</span> base64 -d -kubectl get secret jenkins-operator-credentials-&lt;cr_name&gt; -o <span style="color:#4e9a06">&#39;jsonpath={.data.password}&#39;</span> <span style="color:#000;font-weight:bold">|</span> base64 -d</code></pre></div> -<p>Connect to the Jenkins instance (minikube):</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">minikube service jenkins-operator-http-&lt;cr_name&gt; --url</code></pre></div> -<p>Connect to the Jenkins instance (actual Kubernetes cluster):</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl port-forward jenkins-&lt;cr_name&gt; 8080:8080</code></pre></div> -<p>Then open browser with address <code>http://localhost:8080</code>.</p> - -<p><img src="https://jenkinsci.github.io/kubernetes-operator/kubernetes-operator/img/jenkins.png" alt="jenkins" /></p> - - - - - - Docs: Configuration - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.3.x/configuration/ - Fri, 20 Dec 2019 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.3.x/configuration/ - - - - - -<h2 id="configure-seed-jobs-and-pipelines">Configure Seed Jobs and Pipelines</h2> - -<p>Jenkins operator uses <a href="https://github.com/jenkinsci/job-dsl-plugin">job-dsl</a> and <a href="https://jenkinsci.github.io/kubernetes-credentials-provider-plugin/">kubernetes-credentials-provider</a> plugins for configuring jobs -and deploy keys.</p> - -<h2 id="prepare-job-definitions-and-pipelines">Prepare job definitions and pipelines</h2> - -<p>First you have to prepare pipelines and job definition in your GitHub repository using the following structure:</p> -<pre><code>cicd/ -├── jobs -│   └── build.jenkins -└── pipelines - └── build.jenkins</code></pre> -<p><strong><code>cicd/jobs/build.jenkins</code></strong> is a job definition:</p> -<pre><code>#!/usr/bin/env groovy - -pipelineJob('build-jenkins-operator') { - displayName('Build jenkins-operator') - - definition { - cpsScm { - scm { - git { - remote { - url('https://github.com/jenkinsci/kubernetes-operator.git') - credentials('jenkins-operator') - } - branches('*/master') - } - } - scriptPath('cicd/pipelines/build.jenkins') - } - } -}</code></pre> -<p><strong><code>cicd/pipelines/build.jenkins</code></strong> is an actual Jenkins pipeline:</p> -<pre><code>#!/usr/bin/env groovy - -def label = "build-jenkins-operator-${UUID.randomUUID().toString()}" -def home = "/home/jenkins" -def workspace = "${home}/workspace/build-jenkins-operator" -def workdir = "${workspace}/src/github.com/jenkinsci/kubernetes-operator/" - -podTemplate(label: label, - containers: [ - containerTemplate(name: 'jnlp', image: 'jenkins/inbound-agent:alpine'), - containerTemplate(name: 'go', image: 'golang:1-alpine', command: 'cat', ttyEnabled: true), - ], - envVars: [ - envVar(key: 'GOPATH', value: workspace), - ], - ) { - - node(label) { - dir(workdir) { - stage('Init') { - timeout(time: 3, unit: 'MINUTES') { - checkout scm - } - container('go') { - sh 'apk --no-cache --update add make git gcc libc-dev' - } - } - - stage('Dep') { - container('go') { - sh 'make dep' - } - } - - stage('Test') { - container('go') { - sh 'make test' - } - } - - stage('Build') { - container('go') { - sh 'make build' - } - } - } - } -}</code></pre> -<h2 id="configure-seed-jobs">Configure Seed Jobs</h2> - -<p>Jenkins Seed Jobs are configured using <code>Jenkins.spec.seedJobs</code> section from your custom resource manifest:</p> -<pre><code>apiVersion: jenkins.io/v1alpha2 -kind: Jenkins -metadata: - name: example -spec: - seedJobs: - - id: jenkins-operator - targets: "cicd/jobs/*.jenkins" - description: "Jenkins Operator repository" - repositoryBranch: master - repositoryUrl: https://github.com/jenkinsci/kubernetes-operator.git</code></pre> -<p><strong>Jenkins Operator</strong> will automatically discover and configure all the seed jobs.</p> - -<p>You can verify if deploy keys were successfully configured in the Jenkins <strong>Credentials</strong> tab.</p> - -<p><img src="https://jenkinsci.github.io/kubernetes-operator/kubernetes-operator/img/jenkins-credentials.png" alt="jenkins" /></p> - -<p>You can verify if your pipelines were successfully configured in the Jenkins Seed Job console output.</p> - -<p><img src="https://jenkinsci.github.io/kubernetes-operator/kubernetes-operator/img/jenkins-seed.png" alt="jenkins" /></p> - -<p>If your GitHub repository is <strong>private</strong> you have to configure SSH or username/password authentication.</p> - -<h3 id="ssh-authentication">SSH authentication</h3> - -<h4 id="generate-ssh-keys">Generate SSH Keys</h4> - -<p>There are two methods of SSH private key generation:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">$ openssl genrsa -out &lt;filename&gt; <span style="color:#0000cf;font-weight:bold">2048</span></code></pre></div> -<p>or</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">$ ssh-keygen -t rsa -b <span style="color:#0000cf;font-weight:bold">2048</span> -$ ssh-keygen -p -f &lt;filename&gt; -m pem</code></pre></div> -<p>Then copy content from generated file.</p> - -<h4 id="public-key">Public key</h4> - -<p>If you want to upload your public key to your Git server you need to extract it.</p> - -<p>If key was generated by <code>openssl</code> then you need to type this to extract public key:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">$ openssl rsa -in &lt;filename&gt; -pubout &gt; &lt;filename&gt;.pub</code></pre></div> -<p>If key was generated by <code>ssh-keygen</code> the public key content is located in <filename>.pub and there is no need to extract public key</p> - -<h4 id="configure-ssh-authentication">Configure SSH authentication</h4> - -<p>Configure a seed job like this:</p> -<pre><code>apiVersion: jenkins.io/v1alpha2 -kind: Jenkins -metadata: - name: example -spec: - seedJobs: - - id: jenkins-operator-ssh - credentialType: basicSSHUserPrivateKey - credentialID: k8s-ssh - targets: "cicd/jobs/*.jenkins" - description: "Jenkins Operator repository" - repositoryBranch: master - repositoryUrl: ssh://git@github.com:jenkinsci/kubernetes-operator.git</code></pre> -<p>and create a Kubernetes Secret (name of secret should be the same from <code>credentialID</code> field):</p> -<pre><code>apiVersion: v1 -kind: Secret -metadata: - name: k8s-ssh -stringData: - privateKey: | - -----BEGIN RSA PRIVATE KEY----- - MIIJKAIBAAKCAgEAxxDpleJjMCN5nusfW/AtBAZhx8UVVlhhhIKXvQ+dFODQIdzO - oDXybs1zVHWOj31zqbbJnsfsVZ9Uf3p9k6xpJ3WFY9b85WasqTDN1xmSd6swD4N8 - ... - username: github_user_name</code></pre> -<h3 id="username-password-authentication">Username &amp; password authentication</h3> - -<p>Configure the seed job like:</p> -<pre><code>apiVersion: jenkins.io/v1alpha2 -kind: Jenkins -metadata: - name: example -spec: - seedJobs: - - id: jenkins-operator-user-pass - credentialType: usernamePassword - credentialID: k8s-user-pass - targets: "cicd/jobs/*.jenkins" - description: "Jenkins Operator repository" - repositoryBranch: master - repositoryUrl: https://github.com/jenkinsci/kubernetes-operator.git</code></pre> -<p>and create a Kubernetes Secret (name of secret should be the same from <code>credentialID</code> field):</p> -<pre><code>apiVersion: v1 -kind: Secret -metadata: - name: k8s-user-pass -stringData: - username: github_user_name - password: password_or_token</code></pre> -<h2 id="http-proxy-for-downloading-plugins">HTTP Proxy for downloading plugins</h2> - -<p>To use forwarding proxy with an operator to download plugins you need to add the following environment variable to Jenkins 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"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-master<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>env<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>CURL_OPTIONS<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-L<span style="color:#f8f8f8;text-decoration:underline"> </span>-x<span style="color:#f8f8f8;text-decoration:underline"> </span>&lt;proxy_url&gt;</code></pre></div> -<p>In <code>CURL_OPTIONS</code> var you can set additional arguments to <code>curl</code> command.</p> - -<h2 id="pulling-docker-images-from-private-repositories">Pulling Docker images from private repositories</h2> - -<p>To pull a Docker Image from private repository you can use <code>imagePullSecrets</code>.</p> - -<p>Please follow the instructions on <a href="https://kubernetes.io/docs/concepts/containers/images/?origin_team=T42NTAGHM#creating-a-secret-with-a-docker-config">creating a secret with a docker config</a>.</p> - -<h3 id="docker-hub-configuration">Docker Hub Configuration</h3> - -<p>To use Docker Hub additional steps are required.</p> - -<p>Edit the previously created secret:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl -n &lt;namespace&gt; edit secret &lt;name&gt;</code></pre></div> -<p>The <code>.dockerconfigjson</code> key&rsquo;s value needs to be replaced with a modified version.</p> - -<p>After modifications, it needs to be encoded as a Base64 value before setting the <code>.dockerconfigjson</code> key.</p> - -<p>Example config file to modify and use:</p> -<pre><code>{ - "auths":{ - "https://index.docker.io/v1/":{ - "username":"user", - "password":"password", - "email":"yourdockeremail@gmail.com", - "auth":"base64 of string user:password" - }, - "auth.docker.io":{ - "username":"user", - "password":"password", - "email":"yourdockeremail@gmail.com", - "auth":"base64 of string user:password" - }, - "registry.docker.io":{ - "username":"user", - "password":"password", - "email":"yourdockeremail@gmail.com", - "auth":"base64 of string user:password" - }, - "docker.io":{ - "username":"user", - "password":"password", - "email":"yourdockeremail@gmail.com", - "auth":"base64 of string user:password" - }, - "https://registry-1.docker.io/v2/": { - "username":"user", - "password":"password", - "email":"yourdockeremail@gmail.com", - "auth":"base64 of string user:password" - }, - "registry-1.docker.io/v2/": { - "username":"user", - "password":"password", - "email":"yourdockeremail@gmail.com", - "auth":"base64 of string user:password" - }, - "registry-1.docker.io": { - "username":"user", - "password":"password", - "email":"yourdockeremail@gmail.com", - "auth":"base64 of string user:password" - }, - "https://registry-1.docker.io": { - "username":"user", - "password":"password", - "email":"yourdockeremail@gmail.com", - "auth":"base64 of string user:password" - } - } -}</code></pre> - - - - - Docs: Customization - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.3.x/customization/ - Fri, 20 Dec 2019 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.3.x/customization/ - - - - - -<p>Jenkins can be customized using groovy scripts or the <a href="https://github.com/jenkinsci/configuration-as-code-plugin">configuration as code plugin</a>. -By using a <a href="https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/">ConfigMap</a> you can create your own <strong>Jenkins</strong> customized configuration. -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 <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"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>example<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurationAsCode<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurations<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-user-configuration<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>groovyScripts<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurations<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-user-configuration</code></pre></div> -<p>Here is an example of <code>jenkins-operator-user-configuration</code>:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>v1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>ConfigMap<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-user-configuration<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>data<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>-configure-theme.groovy<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">| -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">import jenkins.*</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.model.*<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>hudson.*<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>hudson.model.*<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>org.jenkinsci.plugins.simpletheme.ThemeElement<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>org.jenkinsci.plugins.simpletheme.CssTextThemeElement<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>org.jenkinsci.plugins.simpletheme.CssUrlThemeElement<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins<span style="color:#f8f8f8;text-decoration:underline"> </span>=<span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins.getInstance()<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>def<span style="color:#f8f8f8;text-decoration:underline"> </span>decorator<span style="color:#f8f8f8;text-decoration:underline"> </span>=<span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins.instance.getDescriptorByType(org.codefirst.SimpleThemeDecorator.class)<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>List&lt;ThemeElement&gt;<span style="color:#f8f8f8;text-decoration:underline"> </span>configElements<span style="color:#f8f8f8;text-decoration:underline"> </span>=<span style="color:#f8f8f8;text-decoration:underline"> </span>new<span style="color:#f8f8f8;text-decoration:underline"> </span>ArrayList&lt;&gt;();<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configElements.add(new<span style="color:#f8f8f8;text-decoration:underline"> </span>CssTextThemeElement(<span style="color:#4e9a06">&#34;DEFAULT&#34;</span>));<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configElements.add(new<span style="color:#f8f8f8;text-decoration:underline"> </span>CssUrlThemeElement(<span style="color:#4e9a06">&#34;https://cdn.rawgit.com/afonsof/jenkins-material-theme/gh-pages/dist/material-light-green.css&#34;</span>));<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>decorator.setElements(configElements);<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>decorator.save();<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.save()<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>-system-message.yaml<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">| -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">jenkins:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>systemMessage<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Configuration as Code integration works!!!&#34;</span></code></pre></div> -<ul> -<li><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. -Jenkins will reconcile and apply the new configuration.</p> - -<h3 id="using-secrets-from-a-groovy-script">Using secrets from a Groovy script</h3> - -<p>If you configured <code>spec.groovyScripts.secret.name</code>, then this secret is available to use from map Groovy scripts. -The secrets are loaded to <code>secrets</code> map.</p> - -<p>Create a <a href="https://kubernetes.io/docs/concepts/configuration/secret/">secret</a> with for example the name <code>jenkins-conf-secrets</code>.</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Secret<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>v1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>type<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Opaque<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-conf-secrets<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>namespace<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>default<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>data<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>SYSTEM_MESSAGE<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>SGVsbG8gd29ybGQ=</code></pre></div> -<p>Then modify the <strong>Jenkins</strong> pod manifest by changing <code>spec.groovyScripts.secret.name</code> to <code>jenkins-conf-secrets</code>.</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.io/v1alpha2<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>example<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurationAsCode<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurations<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-user-configuration<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>secret<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-conf-secrets<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>groovyScripts<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurations<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-user-configuration<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>secret<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-conf-secrets</code></pre></div> -<p>Now you can test that the secret is mounted by applying this <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"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-user-configuration<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>data<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>-system-message.groovy<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">| -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">import jenkins.*</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.model.*<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>hudson.*<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>hudson.model.*<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins<span style="color:#f8f8f8;text-decoration:underline"> </span>=<span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins.getInstance()<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.setSystemMessage(secrets<span style="color:#000;font-weight:bold">[</span><span style="color:#4e9a06">&#34;SYSTEM_MESSAGE&#34;</span><span style="color:#000;font-weight:bold">]</span>)<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.save()</code></pre></div> -<p>Or by applying this configuration as code:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>v1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>ConfigMap<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-user-configuration<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>data<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>-system-message.yaml<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">| -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">jenkins:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>systemMessage<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>${SYSTEM_MESSAGE}</code></pre></div> -<p>After this, you should see the <code>Hello world</code> system message from the <strong>Jenkins</strong> homepage.</p> - -<h2 id="install-plugins">Install Plugins</h2> - -<p>Edit Custom Resource under <code>spec.master.plugins</code>:</p> -<pre><code>apiVersion: jenkins.io/v1alpha2 -kind: Jenkins -metadata: - name: example -spec: - master: - plugins: - - name: simple-theme-plugin - version: 0.5.1</code></pre> -<p>Under <code>spec.master.basePlugins</code> you can find plugins for a valid <strong>Jenkins Operator</strong>:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.io/v1alpha2<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>example<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>master<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>basePlugins<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>kubernetes<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1.18</span><span style="color:#0000cf;font-weight:bold">.3</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>workflow-job<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;2.34&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>workflow-aggregator<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;2.6&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>git<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">3.12</span><span style="color:#0000cf;font-weight:bold">.0</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>job-dsl<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;1.76&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configuration-as-code<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;1.29&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>kubernetes-credentials-provider<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">0.12</span><span style="color:#0000cf;font-weight:bold">.1</span></code></pre></div> -<p>You can change their versions.</p> - -<p>The <strong>Jenkins Operator</strong> will then automatically install plugins after the Jenkins master pod restarts.</p> - - - - - - Docs: Migration from v0.2.x - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.3.x/migration/ - Fri, 03 Jan 2020 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.3.x/migration/ - - - - - -<h3 id="changes">Changes</h3> - -<ul> -<li>new Jenkins Custom Resource Definition version <code>jenkins.io/v1alpha2</code>: - -<ul> -<li><code>spec.master.masterAnnotations</code> was deprecated, use <code>spec.master.annotations</code></li> -<li>added <code>spec.notifications</code></li> -<li>added <code>spec.master.tolerations</code> (in v0.3.1)</li> -<li>added <code>spec.master.disableCSRFProtection</code></li> -</ul></li> -</ul> - -<h3 id="migration">Migration</h3> - -<ul> -<li>adjust the operator image version, e.g. <code>image: virtuslab/jenkins-operator:v0.3.1</code></li> -<li>migrate your Jenkins Custom Resources to <code>apiVersion: jenkins.io/v1alpha2</code>, adjust content if necessary</li> -</ul> - -<p>The v0.3.x should work fine with <code>jenkins.io/v1alpha1</code>, but we recommend using <code>jenkins.io/v1alpha2</code>.</p> - - - - - - Docs: AKS - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.3.x/aks/ - Fri, 20 Dec 2019 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.3.x/aks/ - - - - <p>Azure AKS managed Kubernetes service adds to every pod the following environment variables:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>KUBERNETES_PORT_443_TCP_ADDR<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>KUBERNETES_PORT<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>tcp<span style="color:#000;font-weight:bold">:</span>//<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>KUBERNETES_PORT_443_TCP<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>tcp<span style="color:#000;font-weight:bold">:</span>//<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>KUBERNETES_SERVICE_HOST<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span></code></pre></div> -<p>The operator is aware of it and omits these environment variables when checking if a Jenkins pod environment has been changed. It prevents the -restart of a Jenkins pod over and over again.</p> - - - - - - Docs: Configure backup and restore - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.3.x/configure-backup-and-restore/ - Fri, 20 Dec 2019 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.3.x/configure-backup-and-restore/ - - - - - -<p>Backup and restore is done by a container sidecar.</p> - -<h3 id="pvc">PVC</h3> - -<h4 id="create-pvc">Create PVC</h4> - -<p>Save to the file named pvc.yaml:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>v1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>PersistentVolumeClaim<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>&lt;pvc_name<span style="color:#8f5902;font-style:italic">&gt; -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">namespace: &lt;namespace&gt;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>accessModes<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>ReadWriteOnce<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>requests<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>storage<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>500Gi</code></pre></div> -<p>Run the following command:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">$ kubectl -n &lt;namespace&gt; create -f pvc.yaml</code></pre></div> -<h4 id="configure-jenkins-cr">Configure Jenkins CR</h4> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.io/v1alpha2<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>&lt;cr_name<span style="color:#8f5902;font-style:italic">&gt; -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">namespace: &lt;namespace&gt;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>master<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>securityContext<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>runAsUser<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1000</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>fsGroup<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1000</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>containers<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-master<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>image<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins/jenkins<span style="color:#000;font-weight:bold">:</span>lts<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># container responsible for the backup and restore</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>env<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>BACKUP_DIR<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/backup<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>JENKINS_HOME<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/jenkins-home<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>BACKUP_COUNT<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;3&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># keep only the 2 most recent backups</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>image<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>virtuslab/jenkins-operator-backup-pvc<span style="color:#000;font-weight:bold">:</span>v0<span style="color:#0000cf;font-weight:bold">.0</span><span style="color:#0000cf;font-weight:bold">.8</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># look at backup/pvc directory</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>imagePullPolicy<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>IfNotPresent<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>volumeMounts<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>mountPath<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/jenkins-home<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># Jenkins home volume</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-home<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>mountPath<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># backup volume</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>volumes<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># PVC volume where backups will be stored</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>persistentVolumeClaim<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>claimName<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>&lt;pvc_name<span style="color:#8f5902;font-style:italic">&gt; -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">backup:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>containerName<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># container name is responsible for backup</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>action<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>command<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>/home/user/bin/backup.sh<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># this command is invoked on &#34;backup&#34; container to make backup, for example /home/user/bin/backup.sh &lt;backup_number&gt;, &lt;backup_number&gt; is passed by operator</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>interval<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">30</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># how often make backup in seconds</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>makeBackupBeforePodDeletion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">true</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># make a backup before pod deletion</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>restore<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>containerName<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># container name is responsible for restore backup</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>action<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>command<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>/home/user/bin/restore.sh<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># this command is invoked on &#34;backup&#34; container to make restore backup, for example /home/user/bin/restore.sh &lt;backup_number&gt;, &lt;backup_number&gt; is passed by operator</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">#recoveryOnce: &lt;backup_number&gt; # if want to restore specific backup configure this field and then Jenkins will be restarted and desired backup will be restored</span></code></pre></div> - - - - - Docs: Custom Backup and Restore Providers - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.3.x/custom-backup-and-restore/ - Fri, 20 Dec 2019 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.3.x/custom-backup-and-restore/ - - - - - -<p>With enough effort one can create a custom backup and restore provider -for the Jenkins Operator.</p> - -<h2 id="requirements">Requirements</h2> - -<p>Two commands (e.g. scripts) are required:</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> - -<p>One of those scripts (or the entry point of the container) needs to be responsible -for backup cleanup or rotation if required, or an external system.</p> - -<h2 id="how-it-works">How it works</h2> - -<p>The mechanism relies on basic Kubernetes and UNIX functionalities.</p> - -<p>The backup (and restore) container runs as a sidecar in the same -Kubernetes pod as the Jenkins master.</p> - -<p>Name of the backup and restore containers can be set as necessary using -<code>spec.backup.containerName</code> and <code>spec.restore.containerName</code>. -In most cases it will be the same container, but we allow for less common use cases.</p> - -<p>The operator will call a backup or restore commands inside a sidecar container when necessary:</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> - -<p>This example shows abbreviated version of a simple AWS S3 backup implementation -using: <code>aws-cli</code>, <code>bash</code> and <code>kube2iam</code>.</p> - -<p>In addition to your normal <code>Jenkins</code> <code>CustomResource</code> some additional settings -for backup and restore are required, e.g.:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.io/v1alpha1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>example<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>namespace<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>master<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>masterAnnotations<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>iam.amazonaws.com/role<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;my-example-backup-role&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># tell kube2iam where the AWS IAM role is</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>containers<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-master<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>...<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># container responsible for backup and restore</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>image<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>quay.io/virtuslab/aws-cli<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.16</span><span style="color:#0000cf;font-weight:bold">.263</span><span style="color:#0000cf;font-weight:bold">-2</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>workingDir<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/home/user/bin/<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>command<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># our container entry point</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>sleep<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>infinity<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>env<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>BACKUP_BUCKET<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>my-example-bucket<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># the S3 bucket name to use</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>BACKUP_PATH<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>my-backup-path<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># the S3 bucket path prefix to use</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>JENKINS_HOME<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/jenkins-home<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># the path to mount jenkins home dir in the backup container</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>volumeMounts<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>mountPath<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/jenkins-home<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># Jenkins home volume</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-home<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>mountPath<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/home/user/bin/backup.sh<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup-scripts<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>subPath<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup.sh<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>readOnly<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">true</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>mountPath<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/home/user/bin/restore.sh<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup-scripts<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>subPath<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>restore.sh<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>readOnly<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">true</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>volumes<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup-scripts<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configMap<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>defaultMode<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">0754</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-backup-s3<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>securityContext<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># make sure both containers use the same UID and GUID</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>runAsUser<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1000</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>fsGroup<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1000</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>...<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>containerName<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># container name responsible for backup</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>interval<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">3600</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># how often make a backup in seconds</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>makeBackupBeforePodDeletion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">true</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># trigger backup just before deleting the pod</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>action<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>command<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># this command is invoked on &#34;backup&#34; container to create a backup,</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># &lt;backup_number&gt; is passed by operator,</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># for example /home/user/bin/backup.sh &lt;backup_number&gt;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>/home/user/bin/backup.sh<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>restore<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>containerName<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># container name is responsible for restore backup</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>action<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>command<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># this command is invoked on &#34;backup&#34; container to restore a backup,</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># &lt;backup_number&gt; is passed by operator</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># for example /home/user/bin/restore.sh &lt;backup_number&gt;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>/home/user/bin/restore.sh<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#8f5902;font-style:italic"># recoveryOnce: &lt;backup_number&gt; # if want to restore specific backup configure this field and then Jenkins will be restarted and desired backup will be restored</span></code></pre></div> -<p>The actual backup and restore scripts will be provided in a <code>ConfigMap</code>:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>ConfigMap<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>v1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-backup-s3<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>namespace<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>labels<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>app<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>data<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup.sh<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>|<span style="color:#8f5902;font-style:italic">- -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">#!/bin/bash -xeu</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">[</span><span style="color:#f8f8f8;text-decoration:underline"> </span>!<span style="color:#f8f8f8;text-decoration:underline"> </span>$<span style="color:#8f5902;font-style:italic"># -eq 1 ]] &amp;&amp; echo &#34;Usage: $0 backup_number&#34; &amp;&amp; exit 1;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">[</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-z<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;${BACKUP_BUCKET}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">]</span><span style="color:#000;font-weight:bold">]</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Required &#39;BACKUP_BUCKET&#39; env not set&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exit<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>;<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">[</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-z<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;${BACKUP_PATH}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">]</span><span style="color:#000;font-weight:bold">]</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Required &#39;BACKUP_PATH&#39; env not set&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exit<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>;<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">[</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-z<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;${JENKINS_HOME}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">]</span><span style="color:#000;font-weight:bold">]</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Required &#39;JENKINS_HOME&#39; env not set&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exit<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>;<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup_number=$<span style="color:#0000cf;font-weight:bold">1</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Running backup #${backup_number}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>BACKUP_TMP_DIR=$(mktemp<span style="color:#f8f8f8;text-decoration:underline"> </span>-d)<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>tar<span style="color:#f8f8f8;text-decoration:underline"> </span>-C<span style="color:#f8f8f8;text-decoration:underline"> </span>${JENKINS_HOME}<span style="color:#f8f8f8;text-decoration:underline"> </span>-czf<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;${BACKUP_TMP_DIR}/${backup_number}.tar.gz&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>--exclude<span style="color:#f8f8f8;text-decoration:underline"> </span>jobs/<span style="color:#8f5902;font-style:italic">*/workspace*</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-c<span style="color:#f8f8f8;text-decoration:underline"> </span>jobs<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>\<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>aws<span style="color:#f8f8f8;text-decoration:underline"> </span>s3<span style="color:#f8f8f8;text-decoration:underline"> </span>cp<span style="color:#f8f8f8;text-decoration:underline"> </span>${BACKUP_TMP_DIR}/${backup_number}.tar.gz<span style="color:#f8f8f8;text-decoration:underline"> </span>s3<span style="color:#000;font-weight:bold">:</span>//${BACKUP_BUCKET}/${BACKUP_PATH}/${backup_number}.tar.gz<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span>Done<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>restore.sh<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>|<span style="color:#8f5902;font-style:italic">- -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">#!/bin/bash -xeu</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">[</span><span style="color:#f8f8f8;text-decoration:underline"> </span>!<span style="color:#f8f8f8;text-decoration:underline"> </span>$<span style="color:#8f5902;font-style:italic"># -eq 1 ]] &amp;&amp; echo &#34;Usage: $0 backup_number&#34; &amp;&amp; exit 1</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">[</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-z<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;${BACKUP_BUCKET}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">]</span><span style="color:#000;font-weight:bold">]</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Required &#39;BACKUP_BUCKET&#39; env not set&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exit<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>;<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">[</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-z<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;${BACKUP_PATH}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">]</span><span style="color:#000;font-weight:bold">]</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Required &#39;BACKUP_PATH&#39; env not set&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exit<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>;<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">[</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-z<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;${JENKINS_HOME}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">]</span><span style="color:#000;font-weight:bold">]</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Required &#39;JENKINS_HOME&#39; env not set&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exit<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>;<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup_number=$<span style="color:#0000cf;font-weight:bold">1</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Running restore #${backup_number}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>BACKUP_TMP_DIR=$(mktemp<span style="color:#f8f8f8;text-decoration:underline"> </span>-d)<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>aws<span style="color:#f8f8f8;text-decoration:underline"> </span>s3<span style="color:#f8f8f8;text-decoration:underline"> </span>cp<span style="color:#f8f8f8;text-decoration:underline"> </span>s3<span style="color:#000;font-weight:bold">:</span>//${BACKUP_BUCKET}/${BACKUP_PATH}/${backup_number}.tar.gz<span style="color:#f8f8f8;text-decoration:underline"> </span>${BACKUP_TMP_DIR}/${backup_number}.tar.gz<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>tar<span style="color:#f8f8f8;text-decoration:underline"> </span>-C<span style="color:#f8f8f8;text-decoration:underline"> </span>${JENKINS_HOME}<span style="color:#f8f8f8;text-decoration:underline"> </span>-zxf<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;${BACKUP_TMP_DIR}/${backup_number}.tar.gz&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span>Done</code></pre></div> -<p>In our example we will use S3 bucket lifecycle policy to keep -the number of backups under control, e.g. Cloud Formation fragment:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#f8f8f8;text-decoration:underline"> </span>Type<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>AWS<span style="color:#000;font-weight:bold">:</span><span style="color:#000;font-weight:bold">:</span>S3<span style="color:#000;font-weight:bold">:</span><span style="color:#000;font-weight:bold">:</span>Bucket<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Properties<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>BucketName<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>my-example-bucket<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>...<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>LifecycleConfiguration<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Rules<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>Id<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>BackupCleanup<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Status<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Enabled<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Prefix<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>my-backup-path<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>ExpirationInDays<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">7</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>NoncurrentVersionExpirationInDays<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">14</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>AbortIncompleteMultipartUpload<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>DaysAfterInitiation<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">3</span></code></pre></div> - - - - - Docs: Notifications - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.3.x/notifications/ - Fri, 20 Dec 2019 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.3.x/notifications/ - - - - - -<h2 id="slack">Slack</h2> - -<p>Please follow <a href="https://api.slack.com/incoming-webhooks">this</a> instructions to get web hook URL.</p> - -<p>Create web hook secret with name <code>jenkins-operator-notification-data</code>. Contains key <code>url</code> with provided web hook URL.</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">$ kubectl create secret generic jenkins-operator-notification-data --from-literal<span style="color:#ce5c00;font-weight:bold">=</span><span style="color:#000">url</span><span style="color:#ce5c00;font-weight:bold">=</span>&lt;webhook_url&gt;</code></pre></div> -<p>Example configuration for Slack:</p> -<pre><code>kind: Jenkins -spec: - master: - notifications: - - loggingLevel: info - verbose: true - name: <name> - slack: - webHookURLSecretKeySelector: - secret: - name: <secret_name> - key: <key></code></pre> -<h2 id="microsoft-teams">Microsoft Teams</h2> - -<p>Please follow <a href="https://docs.microsoft.com/en-gb/outlook/actionable-messages/send-via-connectors">this</a> instructions to get web hook URL.</p> - -<p>Example configuration for Microsoft Teams:</p> -<pre><code>kind: Jenkins -spec: - master: - notifications: - - loggingLevel: info - verbose: true - name: <name> - teams: - webHookURLSecretKeySelector: - secret: - name: <secret_name> - key: <key></code></pre> -<h2 id="mailgun">Mailgun</h2> - -<p>Example configuration for Mailgun:</p> -<pre><code>kind: Jenkins -spec: - master: - notifications: - - loggingLevel: info - verbose: true - name: <name> - mailgun: - domain: <domain> - apiKeySecretKeySelector: - secret: - name: <secret_name> - key: <key> - recipient: <your_email> - from: <mailgun_email></code></pre> -<h2 id="debug-options">Debug options</h2> - -<p>As you see there is two debugging options:</p> - -<ul> -<li><p><code>loggingLevel</code> (warning/info) - Set level of messages to send.</p></li> - -<li><p><code>verbose</code> - Print stacktrace and additional error messages</p></li> -</ul> - -<h2 id="multiple-providers">Multiple providers</h2> - -<p>You can use multiple providers to send notification to another communication channels at the same time. -For example you will send notifications to Slack and Teams.</p> -<pre><code>kind: Jenkins -spec: - master: - notifications: - - loggingLevel: info - verbose: true - name: nslack - slack: - webHookURLSecretKeySelector: - secret: - name: <secret_name> - key: <key> - - loggingLevel: info - verbose: true - name: nteams - teams: - webHookURLSecretKeySelector: - secret: - name: <secret_name> - key: <key></code></pre> - - - - - Docs: Diagnostics - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.3.x/diagnostics/ - Fri, 20 Dec 2019 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.3.x/diagnostics/ - - - - - -<p>Turn on debug in <strong>Jenkins Operator</strong> deployment:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">sed -i <span style="color:#4e9a06">&#39;s|\(args:\).*|\1\ [&#34;--debug&#34;\]|&#39;</span> deploy/operator.yaml -kubectl apply -f deploy/operator.yaml</code></pre></div> -<p>Watch Kubernetes events:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl get events --sort-by<span style="color:#ce5c00;font-weight:bold">=</span><span style="color:#4e9a06">&#39;{.lastTimestamp}&#39;</span></code></pre></div> -<p>Verify Jenkins master logs:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl logs -f jenkins-&lt;cr_name&gt;</code></pre></div> -<p>Verify 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> - -<p>Delete the Jenkins master pod and wait for the new one to come up:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl delete pod jenkins-&lt;cr_name&gt;</code></pre></div> - - - - - Docs: Schema - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.3.x/schema/ - Fri, 20 Dec 2019 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.3.x/schema/ - - - - - -<div class="pageinfo pageinfo-primary"> -<p>This document contains API scheme for <code>jenkins-operator</code> Custom Resource Definition manifest</p> - -</div> - - -<p>Packages:</p> -<ul> -<li> -<a href="#jenkins.io">jenkins.io</a> -</li> -</ul> -<h2 id="jenkins.io">jenkins.io</h2> -<p> -<p>Package v1alpha2 contains API Schema definitions for the jenkins.io v1alpha2 API group</p> -</p> -Resource Types: -<ul><li> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.Jenkins">Jenkins</a> -</li></ul> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Jenkins">Jenkins -</h3> -<p> -<p>Jenkins is the Schema for the jenkins API</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>apiVersion</code></br> -string</td> -<td> -<code> -jenkins.io/v1alpha2 -</code> -</td> -</tr> -<tr> -<td> -<code>kind</code></br> -string -</td> -<td><code>Jenkins</code></td> -</tr> -<tr> -<td> -<code>metadata</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.12/#objectmeta-v1-meta"> -Kubernetes meta/v1.ObjectMeta -</a> -</em> -</td> -<td> -Refer to the Kubernetes API documentation for the fields of the -<code>metadata</code> field. -</td> -</tr> -<tr> -<td> -<code>spec</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsSpec"> -JenkinsSpec -</a> -</em> -</td> -<td> -<p>Spec defines the desired state of the Jenkins</p> -<br/> -<br/> -<table> -<tr> -<td> -<code>master</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsMaster"> -JenkinsMaster -</a> -</em> -</td> -<td> -<p>Master represents Jenkins master pod properties and Jenkins plugins. -Every single change here requires a pod restart.</p> -</td> -</tr> -<tr> -<td> -<code>seedJobs</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.SeedJob"> -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.SeedJob -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>SeedJobs defines list of Jenkins Seed Job configurations -More info: <a href="https://github.com/jenkinsci/kubernetes-operator/blob/master/docs/getting-started.md#configure-seed-jobs-and-pipelines">https://github.com/jenkinsci/kubernetes-operator/blob/master/docs/getting-started.md#configure-seed-jobs-and-pipelines</a></p> -</td> -</tr> -<tr> -<td> -<code>notifications</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Notification"> -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Notification -</a> -</em> -</td> -<td> -<p>Notifications defines list of a services which are used to inform about Jenkins status -Can be used to integrate chat services like Slack, Microsoft Teams or Mailgun</p> -</td> -</tr> -<tr> -<td> -<code>service</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Service"> -Service -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Service is Kubernetes service of Jenkins master HTTP pod -Defaults to : -port: 8080 -type: ClusterIP</p> -</td> -</tr> -<tr> -<td> -<code>slaveService</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Service"> -Service -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Service is Kubernetes service of Jenkins slave pods -Defaults to : -port: 50000 -type: ClusterIP</p> -</td> -</tr> -<tr> -<td> -<code>backup</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Backup"> -Backup -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Backup defines configuration of Jenkins backup -More info: <a href="https://github.com/jenkinsci/kubernetes-operator/blob/master/docs/getting-started.md#configure-backup-and-restore">https://github.com/jenkinsci/kubernetes-operator/blob/master/docs/getting-started.md#configure-backup-and-restore</a></p> -</td> -</tr> -<tr> -<td> -<code>restore</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Restore"> -Restore -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Backup defines configuration of Jenkins backup restore -More info: <a href="https://github.com/jenkinsci/kubernetes-operator/blob/master/docs/getting-started.md#configure-backup-and-restore">https://github.com/jenkinsci/kubernetes-operator/blob/master/docs/getting-started.md#configure-backup-and-restore</a></p> -</td> -</tr> -<tr> -<td> -<code>groovyScripts</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.GroovyScripts"> -GroovyScripts -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>GroovyScripts defines configuration of Jenkins customization via groovy scripts</p> -</td> -</tr> -<tr> -<td> -<code>configurationAsCode</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.ConfigurationAsCode"> -ConfigurationAsCode -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>ConfigurationAsCode defines configuration of Jenkins customization via Configuration as Code Jenkins plugin</p> -</td> -</tr> -</table> -</td> -</tr> -<tr> -<td> -<code>status</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsStatus"> -JenkinsStatus -</a> -</em> -</td> -<td> -<p>Status defines the observed state of Jenkins</p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.AppliedGroovyScript">AppliedGroovyScript -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.JenkinsStatus">JenkinsStatus</a>) -</p> -<p> -<p>AppliedGroovyScript is the applied groovy script in Jenkins by the operator</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>configurationType</code></br> -<em> -string -</em> -</td> -<td> -<p>ConfigurationType is the name of the configuration type(base-groovy, user-groovy, user-casc)</p> -</td> -</tr> -<tr> -<td> -<code>source</code></br> -<em> -string -</em> -</td> -<td> -<p>Source is the name of source where is located groovy script</p> -</td> -</tr> -<tr> -<td> -<code>name</code></br> -<em> -string -</em> -</td> -<td> -<p>Name is the name of the groovy script</p> -</td> -</tr> -<tr> -<td> -<code>Hash</code></br> -<em> -string -</em> -</td> -<td> -<p>Hash is the hash of the groovy script and secrets which it uses</p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Backup">Backup -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.JenkinsSpec">JenkinsSpec</a>) -</p> -<p> -<p>Backup defines configuration of Jenkins backup</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>containerName</code></br> -<em> -string -</em> -</td> -<td> -<p>ContainerName is the container name responsible for backup operation</p> -</td> -</tr> -<tr> -<td> -<code>action</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Handler"> -Handler -</a> -</em> -</td> -<td> -<p>Action defines action which performs backup in backup container sidecar</p> -</td> -</tr> -<tr> -<td> -<code>interval</code></br> -<em> -uint64 -</em> -</td> -<td> -<p>Interval tells how often make backup in seconds -Defaults to 30.</p> -</td> -</tr> -<tr> -<td> -<code>makeBackupBeforePodDeletion</code></br> -<em> -bool -</em> -</td> -<td> -<p>MakeBackupBeforePodDeletion tells operator to make backup before Jenkins master pod deletion</p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.ConfigMapRef">ConfigMapRef -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.Customization">Customization</a>) -</p> -<p> -<p>ConfigMapRef is reference to Kubernetes ConfigMap</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>name</code></br> -<em> -string -</em> -</td> -<td> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.ConfigurationAsCode">ConfigurationAsCode -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.JenkinsSpec">JenkinsSpec</a>) -</p> -<p> -<p>ConfigurationAsCode defines configuration of Jenkins customization via Configuration as Code Jenkins plugin</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>Customization</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Customization"> -Customization -</a> -</em> -</td> -<td> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Container">Container -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.JenkinsMaster">JenkinsMaster</a>) -</p> -<p> -<p>Container defines Kubernetes container attributes</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>name</code></br> -<em> -string -</em> -</td> -<td> -<p>Name of the container specified as a DNS_LABEL. -Each container in a pod must have a unique name (DNS_LABEL).</p> -</td> -</tr> -<tr> -<td> -<code>image</code></br> -<em> -string -</em> -</td> -<td> -<p>Docker image name. -More info: <a href="https://kubernetes.io/docs/concepts/containers/images">https://kubernetes.io/docs/concepts/containers/images</a></p> -</td> -</tr> -<tr> -<td> -<code>imagePullPolicy</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.12/#pullpolicy-v1-core"> -Kubernetes core/v1.PullPolicy -</a> -</em> -</td> -<td> -<p>Image pull policy. -One of Always, Never, IfNotPresent. -Defaults to Always.</p> -</td> -</tr> -<tr> -<td> -<code>resources</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.12/#resourcerequirements-v1-core"> -Kubernetes core/v1.ResourceRequirements -</a> -</em> -</td> -<td> -<p>Compute Resources required by this container. -More info: <a href="https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/">https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/</a></p> -</td> -</tr> -<tr> -<td> -<code>command</code></br> -<em> -[]string -</em> -</td> -<td> -<em>(Optional)</em> -<p>Entrypoint array. Not executed within a shell. -The docker image&rsquo;s ENTRYPOINT is used if this is not provided. -Variable references $(VAR_NAME) are expanded using the container&rsquo;s environment. If a variable -cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax -can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, -regardless of whether the variable exists or not. -More info: <a href="https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell">https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell</a></p> -</td> -</tr> -<tr> -<td> -<code>args</code></br> -<em> -[]string -</em> -</td> -<td> -<em>(Optional)</em> -<p>Arguments to the entrypoint. -The docker image&rsquo;s CMD is used if this is not provided. -Variable references $(VAR_NAME) are expanded using the container&rsquo;s environment. If a variable -cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax -can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, -regardless of whether the variable exists or not. -More info: <a href="https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell">https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell</a></p> -</td> -</tr> -<tr> -<td> -<code>workingDir</code></br> -<em> -string -</em> -</td> -<td> -<em>(Optional)</em> -<p>Container&rsquo;s working directory. -If not specified, the container runtime&rsquo;s default will be used, which -might be configured in the container image.</p> -</td> -</tr> -<tr> -<td> -<code>ports</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.12/#containerport-v1-core"> -[]Kubernetes core/v1.ContainerPort -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>List of ports to expose from the container. Exposing a port here gives -the system additional information about the network connections a -container uses, but is primarily informational. Not specifying a port here -DOES NOT prevent that port from being exposed. Any port which is -listening on the default &ldquo;0.0.0.0&rdquo; address inside a container will be -accessible from the network.</p> -</td> -</tr> -<tr> -<td> -<code>envFrom</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.12/#envfromsource-v1-core"> -[]Kubernetes core/v1.EnvFromSource -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>List of sources to populate environment variables in the container. -The keys defined within a source must be a C_IDENTIFIER. All invalid keys -will be reported as an event when the container is starting. When a key exists in multiple -sources, the value associated with the last source will take precedence. -Values defined by an Env with a duplicate key will take precedence.</p> -</td> -</tr> -<tr> -<td> -<code>env</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.12/#envvar-v1-core"> -[]Kubernetes core/v1.EnvVar -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>List of environment variables to set in the container.</p> -</td> -</tr> -<tr> -<td> -<code>volumeMounts</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.12/#volumemount-v1-core"> -[]Kubernetes core/v1.VolumeMount -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Pod volumes to mount into the container&rsquo;s filesystem.</p> -</td> -</tr> -<tr> -<td> -<code>livenessProbe</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.12/#probe-v1-core"> -Kubernetes core/v1.Probe -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Periodic probe of container liveness. -Container will be restarted if the probe fails.</p> -</td> -</tr> -<tr> -<td> -<code>readinessProbe</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.12/#probe-v1-core"> -Kubernetes core/v1.Probe -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Periodic probe of container service readiness. -Container will be removed from service endpoints if the probe fails.</p> -</td> -</tr> -<tr> -<td> -<code>lifecycle</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.12/#lifecycle-v1-core"> -Kubernetes core/v1.Lifecycle -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Actions that the management system should take in response to container lifecycle events.</p> -</td> -</tr> -<tr> -<td> -<code>securityContext</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.12/#securitycontext-v1-core"> -Kubernetes core/v1.SecurityContext -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Security options the pod should run with. -More info: <a href="https://kubernetes.io/docs/concepts/policy/security-context/">https://kubernetes.io/docs/concepts/policy/security-context/</a> -More info: <a href="https://kubernetes.io/docs/tasks/configure-pod-container/security-context/">https://kubernetes.io/docs/tasks/configure-pod-container/security-context/</a></p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Customization">Customization -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.ConfigurationAsCode">ConfigurationAsCode</a>, -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.GroovyScripts">GroovyScripts</a>) -</p> -<p> -<p>Customization defines configuration of Jenkins customization</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>secret</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.SecretRef"> -SecretRef -</a> -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>configurations</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.ConfigMapRef"> -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.ConfigMapRef -</a> -</em> -</td> -<td> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.GroovyScripts">GroovyScripts -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.JenkinsSpec">JenkinsSpec</a>) -</p> -<p> -<p>GroovyScripts defines configuration of Jenkins customization via groovy scripts</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>Customization</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Customization"> -Customization -</a> -</em> -</td> -<td> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Handler">Handler -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.Backup">Backup</a>, -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.Restore">Restore</a>) -</p> -<p> -<p>Handler defines a specific action that should be taken</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>exec</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.12/#execaction-v1-core"> -Kubernetes core/v1.ExecAction -</a> -</em> -</td> -<td> -<p>Exec specifies the action to take.</p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsCredentialType">JenkinsCredentialType -(<code>string</code> alias)</p></h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.SeedJob">SeedJob</a>) -</p> -<p> -<p>JenkinsCredentialType defines type of Jenkins credential used to seed job mechanism</p> -</p> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsMaster">JenkinsMaster -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.JenkinsSpec">JenkinsSpec</a>) -</p> -<p> -<p>JenkinsMaster defines the Jenkins master pod attributes and plugins, -every single change requires a Jenkins master pod restart</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>annotations</code></br> -<em> -map[string]string -</em> -</td> -<td> -<em>(Optional)</em> -<p>Annotations is an unstructured key value map stored with a resource that may be -set by external tools to store and retrieve arbitrary metadata. They are not -queryable and should be preserved when modifying objects. -More info: <a href="http://kubernetes.io/docs/user-guide/annotations">http://kubernetes.io/docs/user-guide/annotations</a></p> -</td> -</tr> -<tr> -<td> -<code>masterAnnotations</code></br> -<em> -map[string]string -</em> -</td> -<td> -<em>(Optional)</em> -<p>Annotations is an unstructured key value map stored with a resource that may be -set by external tools to store and retrieve arbitrary metadata. They are not -queryable and should be preserved when modifying objects. -More info: <a href="http://kubernetes.io/docs/user-guide/annotations">http://kubernetes.io/docs/user-guide/annotations</a> -Deprecated: will be removed in the future, please use Annotations(annotations)</p> -</td> -</tr> -<tr> -<td> -<code>labels</code></br> -<em> -map[string]string -</em> -</td> -<td> -<em>(Optional)</em> -<p>Map of string keys and values that can be used to organize and categorize -(scope and select) objects. May match selectors of replication controllers -and services. -More info: <a href="http://kubernetes.io/docs/user-guide/labels">http://kubernetes.io/docs/user-guide/labels</a></p> -</td> -</tr> -<tr> -<td> -<code>nodeSelector</code></br> -<em> -map[string]string -</em> -</td> -<td> -<em>(Optional)</em> -<p>NodeSelector is a selector which must be true for the pod to fit on a node. -Selector which must match a node&rsquo;s labels for the pod to be scheduled on that node. -More info: <a href="https://kubernetes.io/docs/concepts/configuration/assign-pod-node/">https://kubernetes.io/docs/concepts/configuration/assign-pod-node/</a></p> -</td> -</tr> -<tr> -<td> -<code>securityContext</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.12/#podsecuritycontext-v1-core"> -Kubernetes core/v1.PodSecurityContext -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>SecurityContext that applies to all the containers of the Jenkins -Master. As per kubernetes specification, it can be overridden -for each container individually. -Defaults to: -runAsUser: 1000 -fsGroup: 1000</p> -</td> -</tr> -<tr> -<td> -<code>containers</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Container"> -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Container -</a> -</em> -</td> -<td> -<p>List of containers belonging to the pod. -Containers cannot currently be added or removed. -There must be at least one container in a Pod. -Defaults to: -- image: jenkins/jenkins:lts -imagePullPolicy: Always -livenessProbe: -failureThreshold: 12 -httpGet: -path: /login -port: http -scheme: HTTP -initialDelaySeconds: 80 -periodSeconds: 10 -successThreshold: 1 -timeoutSeconds: 5 -name: jenkins-master -readinessProbe: -failureThreshold: 3 -httpGet: -path: /login -port: http -scheme: HTTP -initialDelaySeconds: 30 -periodSeconds: 10 -successThreshold: 1 -timeoutSeconds: 1 -resources: -limits: -cpu: 1500m -memory: 3Gi -requests: -cpu: &ldquo;1&rdquo; -memory: 600Mi</p> -</td> -</tr> -<tr> -<td> -<code>imagePullSecrets</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.12/#localobjectreference-v1-core"> -[]Kubernetes core/v1.LocalObjectReference -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. -If specified, these secrets will be passed to individual puller implementations for them to use. For example, -in the case of docker, only DockerConfig type secrets are honored. -More info: <a href="https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod">https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod</a></p> -</td> -</tr> -<tr> -<td> -<code>volumes</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.12/#volume-v1-core"> -[]Kubernetes core/v1.Volume -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>List of volumes that can be mounted by containers belonging to the pod. -More info: <a href="https://kubernetes.io/docs/concepts/storage/volumes">https://kubernetes.io/docs/concepts/storage/volumes</a></p> -</td> -</tr> -<tr> -<td> -<code>tolerations</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.12/#toleration-v1-core"> -[]Kubernetes core/v1.Toleration -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>If specified, the pod&rsquo;s tolerations.</p> -</td> -</tr> -<tr> -<td> -<code>basePlugins</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Plugin"> -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Plugin -</a> -</em> -</td> -<td> -<p>BasePlugins contains plugins required by operator -Defaults to : -- name: kubernetes -version: 1.15.7 -- name: workflow-job -version: &ldquo;2.32&rdquo; -- name: workflow-aggregator -version: &ldquo;2.6&rdquo; -- name: git -version: 3.10.0 -- name: job-dsl -version: &ldquo;1.74&rdquo; -- name: configuration-as-code -version: &ldquo;1.19&rdquo; -- name: kubernetes-credentials-provider -version: 0.12.1</p> -</td> -</tr> -<tr> -<td> -<code>plugins</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Plugin"> -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Plugin -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Plugins contains plugins required by user</p> -</td> -</tr> -<tr> -<td> -<code>disableCSRFProtection</code></br> -<em> -bool -</em> -</td> -<td> -<p>DisableCSRFProtection allows you to toggle CSRF Protection on Jenkins</p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsSpec">JenkinsSpec -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.Jenkins">Jenkins</a>) -</p> -<p> -<p>JenkinsSpec defines the desired state of the Jenkins</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>master</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsMaster"> -JenkinsMaster -</a> -</em> -</td> -<td> -<p>Master represents Jenkins master pod properties and Jenkins plugins. -Every single change here requires a pod restart.</p> -</td> -</tr> -<tr> -<td> -<code>seedJobs</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.SeedJob"> -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.SeedJob -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>SeedJobs defines list of Jenkins Seed Job configurations -More info: <a href="https://github.com/jenkinsci/kubernetes-operator/blob/master/docs/getting-started.md#configure-seed-jobs-and-pipelines">https://github.com/jenkinsci/kubernetes-operator/blob/master/docs/getting-started.md#configure-seed-jobs-and-pipelines</a></p> -</td> -</tr> -<tr> -<td> -<code>notifications</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Notification"> -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Notification -</a> -</em> -</td> -<td> -<p>Notifications defines list of a services which are used to inform about Jenkins status -Can be used to integrate chat services like Slack, Microsoft Teams or Mailgun</p> -</td> -</tr> -<tr> -<td> -<code>service</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Service"> -Service -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Service is Kubernetes service of Jenkins master HTTP pod -Defaults to : -port: 8080 -type: ClusterIP</p> -</td> -</tr> -<tr> -<td> -<code>slaveService</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Service"> -Service -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Service is Kubernetes service of Jenkins slave pods -Defaults to : -port: 50000 -type: ClusterIP</p> -</td> -</tr> -<tr> -<td> -<code>backup</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Backup"> -Backup -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Backup defines configuration of Jenkins backup -More info: <a href="https://github.com/jenkinsci/kubernetes-operator/blob/master/docs/getting-started.md#configure-backup-and-restore">https://github.com/jenkinsci/kubernetes-operator/blob/master/docs/getting-started.md#configure-backup-and-restore</a></p> -</td> -</tr> -<tr> -<td> -<code>restore</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Restore"> -Restore -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Backup defines configuration of Jenkins backup restore -More info: <a href="https://github.com/jenkinsci/kubernetes-operator/blob/master/docs/getting-started.md#configure-backup-and-restore">https://github.com/jenkinsci/kubernetes-operator/blob/master/docs/getting-started.md#configure-backup-and-restore</a></p> -</td> -</tr> -<tr> -<td> -<code>groovyScripts</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.GroovyScripts"> -GroovyScripts -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>GroovyScripts defines configuration of Jenkins customization via groovy scripts</p> -</td> -</tr> -<tr> -<td> -<code>configurationAsCode</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.ConfigurationAsCode"> -ConfigurationAsCode -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>ConfigurationAsCode defines configuration of Jenkins customization via Configuration as Code Jenkins plugin</p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsStatus">JenkinsStatus -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.Jenkins">Jenkins</a>) -</p> -<p> -<p>JenkinsStatus defines the observed state of Jenkins</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>operatorVersion</code></br> -<em> -string -</em> -</td> -<td> -<em>(Optional)</em> -<p>OperatorVersion is the operator version which manages this CR</p> -</td> -</tr> -<tr> -<td> -<code>provisionStartTime</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.12/#time-v1-meta"> -Kubernetes meta/v1.Time -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>ProvisionStartTime is a time when Jenkins master pod has been created</p> -</td> -</tr> -<tr> -<td> -<code>baseConfigurationCompletedTime</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.12/#time-v1-meta"> -Kubernetes meta/v1.Time -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>BaseConfigurationCompletedTime is a time when Jenkins base configuration phase has been completed</p> -</td> -</tr> -<tr> -<td> -<code>userConfigurationCompletedTime</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.12/#time-v1-meta"> -Kubernetes meta/v1.Time -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>UserConfigurationCompletedTime is a time when Jenkins user configuration phase has been completed</p> -</td> -</tr> -<tr> -<td> -<code>restoredBackup</code></br> -<em> -uint64 -</em> -</td> -<td> -<em>(Optional)</em> -<p>RestoredBackup is the restored backup number after Jenkins master pod restart</p> -</td> -</tr> -<tr> -<td> -<code>lastBackup</code></br> -<em> -uint64 -</em> -</td> -<td> -<em>(Optional)</em> -<p>LastBackup is the latest backup number</p> -</td> -</tr> -<tr> -<td> -<code>pendingBackup</code></br> -<em> -uint64 -</em> -</td> -<td> -<em>(Optional)</em> -<p>PendingBackup is the pending backup number</p> -</td> -</tr> -<tr> -<td> -<code>backupDoneBeforePodDeletion</code></br> -<em> -bool -</em> -</td> -<td> -<em>(Optional)</em> -<p>BackupDoneBeforePodDeletion tells if backup before pod deletion has been made</p> -</td> -</tr> -<tr> -<td> -<code>userAndPasswordHash</code></br> -<em> -string -</em> -</td> -<td> -<em>(Optional)</em> -<p>UserAndPasswordHash is a SHA256 hash made from user and password</p> -</td> -</tr> -<tr> -<td> -<code>createdSeedJobs</code></br> -<em> -[]string -</em> -</td> -<td> -<em>(Optional)</em> -<p>CreatedSeedJobs contains list of seed job id already created in Jenkins</p> -</td> -</tr> -<tr> -<td> -<code>appliedGroovyScripts</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.AppliedGroovyScript"> -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.AppliedGroovyScript -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>AppliedGroovyScripts is a list with all applied groovy scripts in Jenkins by the operator</p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Mailgun">Mailgun -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.Notification">Notification</a>) -</p> -<p> -<p>Mailgun is handler for Mailgun email service notification channel</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>domain</code></br> -<em> -string -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>apiKeySecretKeySelector</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.SecretKeySelector"> -SecretKeySelector -</a> -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>recipient</code></br> -<em> -string -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>from</code></br> -<em> -string -</em> -</td> -<td> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.MicrosoftTeams">MicrosoftTeams -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.Notification">Notification</a>) -</p> -<p> -<p>MicrosoftTeams is handler for Microsoft MicrosoftTeams notification channel</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>webHookURLSecretKeySelector</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.SecretKeySelector"> -SecretKeySelector -</a> -</em> -</td> -<td> -<p>The web hook URL to MicrosoftTeams App</p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Notification">Notification -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.JenkinsSpec">JenkinsSpec</a>) -</p> -<p> -<p>Notification is a service configuration used to send notifications about Jenkins status</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>level</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.NotificationLevel"> -NotificationLevel -</a> -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>verbose</code></br> -<em> -bool -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>name</code></br> -<em> -string -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>slack</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Slack"> -github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Slack -</a> -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>teams</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.MicrosoftTeams"> -github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.MicrosoftTeams -</a> -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>mailgun</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Mailgun"> -github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Mailgun -</a> -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>smtp</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.SMTP"> -github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.SMTP -</a> -</em> -</td> -<td> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.NotificationLevel">NotificationLevel -(<code>string</code> alias)</p></h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.Notification">Notification</a>) -</p> -<p> -<p>NotificationLevel defines the level of a Notification</p> -</p> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Plugin">Plugin -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.JenkinsMaster">JenkinsMaster</a>) -</p> -<p> -<p>Plugin defines Jenkins plugin</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>name</code></br> -<em> -string -</em> -</td> -<td> -<p>Name is the name of Jenkins plugin</p> -</td> -</tr> -<tr> -<td> -<code>version</code></br> -<em> -string -</em> -</td> -<td> -<p>Version is the version of Jenkins plugin</p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Restore">Restore -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.JenkinsSpec">JenkinsSpec</a>) -</p> -<p> -<p>Restore defines configuration of Jenkins backup restore operation</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>containerName</code></br> -<em> -string -</em> -</td> -<td> -<p>ContainerName is the container name responsible for restore backup operation</p> -</td> -</tr> -<tr> -<td> -<code>action</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Handler"> -Handler -</a> -</em> -</td> -<td> -<p>Action defines action which performs restore backup in restore container sidecar</p> -</td> -</tr> -<tr> -<td> -<code>recoveryOnce</code></br> -<em> -uint64 -</em> -</td> -<td> -<em>(Optional)</em> -<p>RecoveryOnce if want to restore specific backup set this field and then Jenkins will be restarted and desired backup will be restored</p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.SMTP">SMTP -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.Notification">Notification</a>) -</p> -<p> -<p>SMTP is handler for sending emails via this protocol</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>usernameSecretKeySelector</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.SecretKeySelector"> -SecretKeySelector -</a> -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>passwordSecretKeySelector</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.SecretKeySelector"> -SecretKeySelector -</a> -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>port</code></br> -<em> -int -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>server</code></br> -<em> -string -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>tlsInsecureSkipVerify</code></br> -<em> -bool -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>from</code></br> -<em> -string -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>to</code></br> -<em> -string -</em> -</td> -<td> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.SecretKeySelector">SecretKeySelector -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.Mailgun">Mailgun</a>, -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.MicrosoftTeams">MicrosoftTeams</a>, -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.SMTP">SMTP</a>, -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.Slack">Slack</a>) -</p> -<p> -<p>SecretKeySelector selects a key of a Secret.</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>secret</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.12/#localobjectreference-v1-core"> -Kubernetes core/v1.LocalObjectReference -</a> -</em> -</td> -<td> -<p>The name of the secret in the pod&rsquo;s namespace to select from.</p> -</td> -</tr> -<tr> -<td> -<code>key</code></br> -<em> -string -</em> -</td> -<td> -<p>The key of the secret to select from. Must be a valid secret key.</p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.SecretRef">SecretRef -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.Customization">Customization</a>) -</p> -<p> -<p>SecretRef is reference to Kubernetes secret</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>name</code></br> -<em> -string -</em> -</td> -<td> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.SeedJob">SeedJob -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.JenkinsSpec">JenkinsSpec</a>) -</p> -<p> -<p>SeedJob defines configuration for seed job -More info: <a href="https://github.com/jenkinsci/kubernetes-operator/blob/master/docs/getting-started.md#configure-seed-jobs-and-pipelines">https://github.com/jenkinsci/kubernetes-operator/blob/master/docs/getting-started.md#configure-seed-jobs-and-pipelines</a></p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>id</code></br> -<em> -string -</em> -</td> -<td> -<p>ID is the unique seed job name</p> -</td> -</tr> -<tr> -<td> -<code>credentialID</code></br> -<em> -string -</em> -</td> -<td> -<p>CredentialID is the Kubernetes secret name which stores repository access credentials</p> -</td> -</tr> -<tr> -<td> -<code>description</code></br> -<em> -string -</em> -</td> -<td> -<em>(Optional)</em> -<p>Description is the description of the seed job</p> -</td> -</tr> -<tr> -<td> -<code>targets</code></br> -<em> -string -</em> -</td> -<td> -<p>Targets is the repository path where are seed job definitions</p> -</td> -</tr> -<tr> -<td> -<code>repositoryBranch</code></br> -<em> -string -</em> -</td> -<td> -<p>RepositoryBranch is the repository branch where are seed job definitions</p> -</td> -</tr> -<tr> -<td> -<code>repositoryUrl</code></br> -<em> -string -</em> -</td> -<td> -<p>RepositoryURL is the repository access URL. Can be SSH or HTTPS.</p> -</td> -</tr> -<tr> -<td> -<code>credentialType</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsCredentialType"> -JenkinsCredentialType -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>JenkinsCredentialType is the <a href="https://jenkinsci.github.io/kubernetes-credentials-provider-plugin/">https://jenkinsci.github.io/kubernetes-credentials-provider-plugin/</a> credential type</p> -</td> -</tr> -<tr> -<td> -<code>githubPushTrigger</code></br> -<em> -bool -</em> -</td> -<td> -<em>(Optional)</em> -<p>GitHubPushTrigger is used for GitHub web hooks</p> -</td> -</tr> -<tr> -<td> -<code>buildPeriodically</code></br> -<em> -string -</em> -</td> -<td> -<em>(Optional)</em> -<p>BuildPeriodically is setting for scheduled trigger</p> -</td> -</tr> -<tr> -<td> -<code>pollSCM</code></br> -<em> -string -</em> -</td> -<td> -<em>(Optional)</em> -<p>PollSCM is setting for polling changes in SCM</p> -</td> -</tr> -<tr> -<td> -<code>ignoreMissingFiles</code></br> -<em> -bool -</em> -</td> -<td> -<em>(Optional)</em> -<p>IgnoreMissingFiles is setting for Job DSL API plugin to ignore files that miss</p> -</td> -</tr> -<tr> -<td> -<code>additionalClasspath</code></br> -<em> -string -</em> -</td> -<td> -<em>(Optional)</em> -<p>AdditionalClasspath is setting for Job DSL API plugin to set Additional Classpath</p> -</td> -</tr> -<tr> -<td> -<code>failOnMissingPlugin</code></br> -<em> -bool -</em> -</td> -<td> -<em>(Optional)</em> -<p>FailOnMissingPlugin is setting for Job DSL API plugin that fails job if required plugin is missing</p> -</td> -</tr> -<tr> -<td> -<code>unstableOnDeprecation</code></br> -<em> -bool -</em> -</td> -<td> -<em>(Optional)</em> -<p>UnstableOnDeprecation is setting for Job DSL API plugin that sets build status as unstable if build using deprecated features</p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Service">Service -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.JenkinsSpec">JenkinsSpec</a>) -</p> -<p> -<p>Service defines Kubernetes service attributes</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>annotations</code></br> -<em> -map[string]string -</em> -</td> -<td> -<em>(Optional)</em> -<p>Annotations is an unstructured key value map stored with a resource that may be -set by external tools to store and retrieve arbitrary metadata. They are not -queryable and should be preserved when modifying objects. -More info: <a href="http://kubernetes.io/docs/user-guide/annotations">http://kubernetes.io/docs/user-guide/annotations</a></p> -</td> -</tr> -<tr> -<td> -<code>labels</code></br> -<em> -map[string]string -</em> -</td> -<td> -<p>Route service traffic to pods with label keys and values matching this -selector. If empty or not present, the service is assumed to have an -external process managing its endpoints, which Kubernetes will not -modify. Only applies to types ClusterIP, NodePort, and LoadBalancer. -Ignored if type is ExternalName. -More info: <a href="https://kubernetes.io/docs/concepts/services-networking/service/">https://kubernetes.io/docs/concepts/services-networking/service/</a></p> -</td> -</tr> -<tr> -<td> -<code>type</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.12/#servicetype-v1-core"> -Kubernetes core/v1.ServiceType -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Type determines how the Service is exposed. Defaults to ClusterIP. Valid -options are ExternalName, ClusterIP, NodePort, and LoadBalancer. -&ldquo;ExternalName&rdquo; maps to the specified externalName. -&ldquo;ClusterIP&rdquo; allocates a cluster-internal IP address for load-balancing to -endpoints. Endpoints are determined by the selector or if that is not -specified, by manual construction of an Endpoints object. If clusterIP is -&ldquo;None&rdquo;, no virtual IP is allocated and the endpoints are published as a -set of endpoints rather than a stable IP. -&ldquo;NodePort&rdquo; builds on ClusterIP and allocates a port on every node which -routes to the clusterIP. -&ldquo;LoadBalancer&rdquo; builds on NodePort and creates an -external load-balancer (if supported in the current cloud) which routes -to the clusterIP. -More info: <a href="https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services---service-types">https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services&mdash;service-types</a></p> -</td> -</tr> -<tr> -<td> -<code>port</code></br> -<em> -int32 -</em> -</td> -<td> -<p>The port that are exposed by this service. -More info: <a href="https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies">https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies</a></p> -</td> -</tr> -<tr> -<td> -<code>nodePort</code></br> -<em> -int32 -</em> -</td> -<td> -<em>(Optional)</em> -<p>The port on each node on which this service is exposed when type=NodePort or LoadBalancer. -Usually assigned by the system. If specified, it will be allocated to the service -if unused or else creation of the service will fail. -Default is to auto-allocate a port if the ServiceType of this Service requires one. -More info: <a href="https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport">https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport</a></p> -</td> -</tr> -<tr> -<td> -<code>loadBalancerSourceRanges</code></br> -<em> -[]string -</em> -</td> -<td> -<em>(Optional)</em> -<p>If specified and supported by the platform, this will restrict traffic through the cloud-provider -load-balancer will be restricted to the specified client IPs. This field will be ignored if the -cloud-provider does not support the feature.&rdquo; -More info: <a href="https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/">https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/</a></p> -</td> -</tr> -<tr> -<td> -<code>loadBalancerIP</code></br> -<em> -string -</em> -</td> -<td> -<em>(Optional)</em> -<p>Only applies to Service Type: LoadBalancer -LoadBalancer will get created with the IP specified in this field. -This feature depends on whether the underlying cloud-provider supports specifying -the loadBalancerIP when a load balancer is created. -This field will be ignored if the cloud-provider does not support the feature.</p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Slack">Slack -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.Notification">Notification</a>) -</p> -<p> -<p>Slack is handler for Slack notification channel</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>webHookURLSecretKeySelector</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.SecretKeySelector"> -SecretKeySelector -</a> -</em> -</td> -<td> -<p>The web hook URL to Slack App</p> -</td> -</tr> -</tbody> -</table> -<hr/> -<p><em> -Generated with <code>gen-crd-api-reference-docs</code> -on git commit <code>4b89360</code>. -</em></p> - - - - - - \ No newline at end of file diff --git a/docs/docs/getting-started/v0.3.x/migration/index.html b/docs/docs/getting-started/v0.3.x/migration/index.html deleted file mode 100644 index de9bda31e..000000000 --- a/docs/docs/getting-started/v0.3.x/migration/index.html +++ /dev/null @@ -1,1000 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Migration from v0.2.x | Jenkins Operator - - - - - - - - - - - - - - - - - - - - - - - - - - - - Migration from v0.2.x | Jenkins Operator - - -
- - - -
-
-
-
-
- - - - - -
- - - - -
- - - - -
-
- - - - - - - - - - - - - -
-
- - - -
-

Migration from v0.2.x

-
How to migrate from v0.2.x to v0.3.x
- - -

Changes

- -
    -
  • new Jenkins Custom Resource Definition version jenkins.io/v1alpha2: - -
      -
    • spec.master.masterAnnotations was deprecated, use spec.master.annotations
    • -
    • added spec.notifications
    • -
    • added spec.master.tolerations (in v0.3.1)
    • -
    • added spec.master.disableCSRFProtection
    • -
  • -
- -

Migration

- -
    -
  • adjust the operator image version, e.g. image: virtuslab/jenkins-operator:v0.3.1
  • -
  • migrate your Jenkins Custom Resources to apiVersion: jenkins.io/v1alpha2, adjust content if necessary
  • -
- -

The v0.3.x should work fine with jenkins.io/v1alpha1, but we recommend using jenkins.io/v1alpha2.

- - - -
Last modified January 3, 2020 -
-
- - -
-
-
- - - - -
- - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/docs/getting-started/v0.3.x/notifications/index.html b/docs/docs/getting-started/v0.3.x/notifications/index.html deleted file mode 100644 index 1569b9d6c..000000000 --- a/docs/docs/getting-started/v0.3.x/notifications/index.html +++ /dev/null @@ -1,1079 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Notifications | Jenkins Operator - - - - - - - - - - - - - - - - - - - - - - - - - - - - Notifications | Jenkins Operator - - -
- - - -
-
-
-
-
- - - - - -
- - - - -
- - - - -
- -
- - - -
-

Notifications

-
How to setup operator notifications.
- - -

Slack

- -

Please follow this instructions to get web hook URL.

- -

Create web hook secret with name jenkins-operator-notification-data. Contains key url with provided web hook URL.

-
$ kubectl create secret generic jenkins-operator-notification-data --from-literal=url=<webhook_url>
-

Example configuration for Slack:

-
kind: Jenkins
-spec:
-  master:
-    notifications:
-    - loggingLevel: info
-      verbose: true
-      name: 
-      slack:
-        webHookURLSecretKeySelector:
-          secret:
-            name: 
-          key: 
-

Microsoft Teams

- -

Please follow this instructions to get web hook URL.

- -

Example configuration for Microsoft Teams:

-
kind: Jenkins
-spec:
-  master:
-    notifications:
-    - loggingLevel: info
-      verbose: true
-      name: 
-      teams:
-        webHookURLSecretKeySelector:
-          secret:
-            name: 
-          key: 
-

Mailgun

- -

Example configuration for Mailgun:

-
kind: Jenkins
-spec:
-  master:
-    notifications:
-    - loggingLevel: info
-      verbose: true
-      name: 
-      mailgun:
-        domain: 
-        apiKeySecretKeySelector:
-          secret:
-            name: 
-          key: 
-        recipient: 
-        from: 
-

Debug options

- -

As you see there is two debugging options:

- -
    -
  • loggingLevel (warning/info) - Set level of messages to send.

  • - -
  • verbose - Print stacktrace and additional error messages

  • -
- -

Multiple providers

- -

You can use multiple providers to send notification to another communication channels at the same time. -For example you will send notifications to Slack and Teams.

-
kind: Jenkins
-spec:
-  master:
-    notifications:
-    - loggingLevel: info
-      verbose: true
-      name: nslack
-      slack:
-        webHookURLSecretKeySelector:
-          secret:
-            name: 
-          key: 
-    - loggingLevel: info
-      verbose: true
-      name: nteams
-      teams:
-        webHookURLSecretKeySelector:
-          secret:
-            name: 
-          key: 
- - -
Last modified December 20, 2019 -
-
- - -
-
-
- - - - -
- - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/docs/getting-started/v0.3.x/schema/index.html b/docs/docs/getting-started/v0.3.x/schema/index.html deleted file mode 100644 index 349d55829..000000000 --- a/docs/docs/getting-started/v0.3.x/schema/index.html +++ /dev/null @@ -1,3141 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Schema | Jenkins Operator - - - - - - - - - - - - - - - - - - - - - - - - - - - - Schema | Jenkins Operator - - -
- - - -
-
-
-
-
- - - - - -
- - - - -
- - - - -
-
- - - - - - - - - - - -
-
- - - -
-

Schema

-
API Schema definitions for Jenkins CRD
- - -
-

This document contains API scheme for jenkins-operator Custom Resource Definition manifest

- -
- - -

Packages:

- -

jenkins.io

-

-

Package v1alpha2 contains API Schema definitions for the jenkins.io v1alpha2 API group

-

-Resource Types: - -

Jenkins -

-

-

Jenkins is the Schema for the jenkins API

-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldDescription
-apiVersion
-string
- -jenkins.io/v1alpha2 - -
-kind
-string -
Jenkins
-metadata
- - -Kubernetes meta/v1.ObjectMeta - - -
-Refer to the Kubernetes API documentation for the fields of the -metadata field. -
-spec
- - -JenkinsSpec - - -
-

Spec defines the desired state of the Jenkins

-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-master
- - -JenkinsMaster - - -
-

Master represents Jenkins master pod properties and Jenkins plugins. -Every single change here requires a pod restart.

-
-seedJobs
- - -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.SeedJob - - -
-(Optional) -

SeedJobs defines list of Jenkins Seed Job configurations -More info: https://github.com/jenkinsci/kubernetes-operator/blob/master/docs/getting-started.md#configure-seed-jobs-and-pipelines

-
-notifications
- - -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Notification - - -
-

Notifications defines list of a services which are used to inform about Jenkins status -Can be used to integrate chat services like Slack, Microsoft Teams or Mailgun

-
-service
- - -Service - - -
-(Optional) -

Service is Kubernetes service of Jenkins master HTTP pod -Defaults to : -port: 8080 -type: ClusterIP

-
-slaveService
- - -Service - - -
-(Optional) -

Service is Kubernetes service of Jenkins slave pods -Defaults to : -port: 50000 -type: ClusterIP

-
-backup
- - -Backup - - -
-(Optional) -

Backup defines configuration of Jenkins backup -More info: https://github.com/jenkinsci/kubernetes-operator/blob/master/docs/getting-started.md#configure-backup-and-restore

-
-restore
- - -Restore - - -
-(Optional) -

Backup defines configuration of Jenkins backup restore -More info: https://github.com/jenkinsci/kubernetes-operator/blob/master/docs/getting-started.md#configure-backup-and-restore

-
-groovyScripts
- - -GroovyScripts - - -
-(Optional) -

GroovyScripts defines configuration of Jenkins customization via groovy scripts

-
-configurationAsCode
- - -ConfigurationAsCode - - -
-(Optional) -

ConfigurationAsCode defines configuration of Jenkins customization via Configuration as Code Jenkins plugin

-
-
-status
- - -JenkinsStatus - - -
-

Status defines the observed state of Jenkins

-
-

AppliedGroovyScript -

-

-(Appears on: -JenkinsStatus) -

-

-

AppliedGroovyScript is the applied groovy script in Jenkins by the operator

-

- - - - - - - - - - - - - - - - - - - - - - - - - -
FieldDescription
-configurationType
- -string - -
-

ConfigurationType is the name of the configuration type(base-groovy, user-groovy, user-casc)

-
-source
- -string - -
-

Source is the name of source where is located groovy script

-
-name
- -string - -
-

Name is the name of the groovy script

-
-Hash
- -string - -
-

Hash is the hash of the groovy script and secrets which it uses

-
-

Backup -

-

-(Appears on: -JenkinsSpec) -

-

-

Backup defines configuration of Jenkins backup

-

- - - - - - - - - - - - - - - - - - - - - - - - - -
FieldDescription
-containerName
- -string - -
-

ContainerName is the container name responsible for backup operation

-
-action
- - -Handler - - -
-

Action defines action which performs backup in backup container sidecar

-
-interval
- -uint64 - -
-

Interval tells how often make backup in seconds -Defaults to 30.

-
-makeBackupBeforePodDeletion
- -bool - -
-

MakeBackupBeforePodDeletion tells operator to make backup before Jenkins master pod deletion

-
-

ConfigMapRef -

-

-(Appears on: -Customization) -

-

-

ConfigMapRef is reference to Kubernetes ConfigMap

-

- - - - - - - - - - - - - -
FieldDescription
-name
- -string - -
-
-

ConfigurationAsCode -

-

-(Appears on: -JenkinsSpec) -

-

-

ConfigurationAsCode defines configuration of Jenkins customization via Configuration as Code Jenkins plugin

-

- - - - - - - - - - - - - -
FieldDescription
-Customization
- - -Customization - - -
-
-

Container -

-

-(Appears on: -JenkinsMaster) -

-

-

Container defines Kubernetes container attributes

-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldDescription
-name
- -string - -
-

Name of the container specified as a DNS_LABEL. -Each container in a pod must have a unique name (DNS_LABEL).

-
-image
- -string - -
-

Docker image name. -More info: https://kubernetes.io/docs/concepts/containers/images

-
-imagePullPolicy
- - -Kubernetes core/v1.PullPolicy - - -
-

Image pull policy. -One of Always, Never, IfNotPresent. -Defaults to Always.

-
-resources
- - -Kubernetes core/v1.ResourceRequirements - - -
-

Compute Resources required by this container. -More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/

-
-command
- -[]string - -
-(Optional) -

Entrypoint array. Not executed within a shell. -The docker image’s ENTRYPOINT is used if this is not provided. -Variable references $(VAR_NAME) are expanded using the container’s environment. If a variable -cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax -can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, -regardless of whether the variable exists or not. -More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell

-
-args
- -[]string - -
-(Optional) -

Arguments to the entrypoint. -The docker image’s CMD is used if this is not provided. -Variable references $(VAR_NAME) are expanded using the container’s environment. If a variable -cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax -can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, -regardless of whether the variable exists or not. -More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell

-
-workingDir
- -string - -
-(Optional) -

Container’s working directory. -If not specified, the container runtime’s default will be used, which -might be configured in the container image.

-
-ports
- - -[]Kubernetes core/v1.ContainerPort - - -
-(Optional) -

List of ports to expose from the container. Exposing a port here gives -the system additional information about the network connections a -container uses, but is primarily informational. Not specifying a port here -DOES NOT prevent that port from being exposed. Any port which is -listening on the default “0.0.0.0” address inside a container will be -accessible from the network.

-
-envFrom
- - -[]Kubernetes core/v1.EnvFromSource - - -
-(Optional) -

List of sources to populate environment variables in the container. -The keys defined within a source must be a C_IDENTIFIER. All invalid keys -will be reported as an event when the container is starting. When a key exists in multiple -sources, the value associated with the last source will take precedence. -Values defined by an Env with a duplicate key will take precedence.

-
-env
- - -[]Kubernetes core/v1.EnvVar - - -
-(Optional) -

List of environment variables to set in the container.

-
-volumeMounts
- - -[]Kubernetes core/v1.VolumeMount - - -
-(Optional) -

Pod volumes to mount into the container’s filesystem.

-
-livenessProbe
- - -Kubernetes core/v1.Probe - - -
-(Optional) -

Periodic probe of container liveness. -Container will be restarted if the probe fails.

-
-readinessProbe
- - -Kubernetes core/v1.Probe - - -
-(Optional) -

Periodic probe of container service readiness. -Container will be removed from service endpoints if the probe fails.

-
-lifecycle
- - -Kubernetes core/v1.Lifecycle - - -
-(Optional) -

Actions that the management system should take in response to container lifecycle events.

-
-securityContext
- - -Kubernetes core/v1.SecurityContext - - -
-(Optional) -

Security options the pod should run with. -More info: https://kubernetes.io/docs/concepts/policy/security-context/ -More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/

-
-

Customization -

-

-(Appears on: -ConfigurationAsCode, -GroovyScripts) -

-

-

Customization defines configuration of Jenkins customization

-

- - - - - - - - - - - - - - - - - -
FieldDescription
-secret
- - -SecretRef - - -
-
-configurations
- - -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.ConfigMapRef - - -
-
-

GroovyScripts -

-

-(Appears on: -JenkinsSpec) -

-

-

GroovyScripts defines configuration of Jenkins customization via groovy scripts

-

- - - - - - - - - - - - - -
FieldDescription
-Customization
- - -Customization - - -
-
-

Handler -

-

-(Appears on: -Backup, -Restore) -

-

-

Handler defines a specific action that should be taken

-

- - - - - - - - - - - - - -
FieldDescription
-exec
- - -Kubernetes core/v1.ExecAction - - -
-

Exec specifies the action to take.

-
-

JenkinsCredentialType -(string alias)

-

-(Appears on: -SeedJob) -

-

-

JenkinsCredentialType defines type of Jenkins credential used to seed job mechanism

-

-

JenkinsMaster -

-

-(Appears on: -JenkinsSpec) -

-

-

JenkinsMaster defines the Jenkins master pod attributes and plugins, -every single change requires a Jenkins master pod restart

-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldDescription
-annotations
- -map[string]string - -
-(Optional) -

Annotations is an unstructured key value map stored with a resource that may be -set by external tools to store and retrieve arbitrary metadata. They are not -queryable and should be preserved when modifying objects. -More info: http://kubernetes.io/docs/user-guide/annotations

-
-masterAnnotations
- -map[string]string - -
-(Optional) -

Annotations is an unstructured key value map stored with a resource that may be -set by external tools to store and retrieve arbitrary metadata. They are not -queryable and should be preserved when modifying objects. -More info: http://kubernetes.io/docs/user-guide/annotations -Deprecated: will be removed in the future, please use Annotations(annotations)

-
-labels
- -map[string]string - -
-(Optional) -

Map of string keys and values that can be used to organize and categorize -(scope and select) objects. May match selectors of replication controllers -and services. -More info: http://kubernetes.io/docs/user-guide/labels

-
-nodeSelector
- -map[string]string - -
-(Optional) -

NodeSelector is a selector which must be true for the pod to fit on a node. -Selector which must match a node’s labels for the pod to be scheduled on that node. -More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/

-
-securityContext
- - -Kubernetes core/v1.PodSecurityContext - - -
-(Optional) -

SecurityContext that applies to all the containers of the Jenkins -Master. As per kubernetes specification, it can be overridden -for each container individually. -Defaults to: -runAsUser: 1000 -fsGroup: 1000

-
-containers
- - -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Container - - -
-

List of containers belonging to the pod. -Containers cannot currently be added or removed. -There must be at least one container in a Pod. -Defaults to: -- image: jenkins/jenkins:lts -imagePullPolicy: Always -livenessProbe: -failureThreshold: 12 -httpGet: -path: /login -port: http -scheme: HTTP -initialDelaySeconds: 80 -periodSeconds: 10 -successThreshold: 1 -timeoutSeconds: 5 -name: jenkins-master -readinessProbe: -failureThreshold: 3 -httpGet: -path: /login -port: http -scheme: HTTP -initialDelaySeconds: 30 -periodSeconds: 10 -successThreshold: 1 -timeoutSeconds: 1 -resources: -limits: -cpu: 1500m -memory: 3Gi -requests: -cpu: “1” -memory: 600Mi

-
-imagePullSecrets
- - -[]Kubernetes core/v1.LocalObjectReference - - -
-(Optional) -

ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. -If specified, these secrets will be passed to individual puller implementations for them to use. For example, -in the case of docker, only DockerConfig type secrets are honored. -More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod

-
-volumes
- - -[]Kubernetes core/v1.Volume - - -
-(Optional) -

List of volumes that can be mounted by containers belonging to the pod. -More info: https://kubernetes.io/docs/concepts/storage/volumes

-
-tolerations
- - -[]Kubernetes core/v1.Toleration - - -
-(Optional) -

If specified, the pod’s tolerations.

-
-basePlugins
- - -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Plugin - - -
-

BasePlugins contains plugins required by operator -Defaults to : -- name: kubernetes -version: 1.15.7 -- name: workflow-job -version: “2.32” -- name: workflow-aggregator -version: “2.6” -- name: git -version: 3.10.0 -- name: job-dsl -version: “1.74” -- name: configuration-as-code -version: “1.19” -- name: kubernetes-credentials-provider -version: 0.12.1

-
-plugins
- - -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Plugin - - -
-(Optional) -

Plugins contains plugins required by user

-
-disableCSRFProtection
- -bool - -
-

DisableCSRFProtection allows you to toggle CSRF Protection on Jenkins

-
-

JenkinsSpec -

-

-(Appears on: -Jenkins) -

-

-

JenkinsSpec defines the desired state of the Jenkins

-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldDescription
-master
- - -JenkinsMaster - - -
-

Master represents Jenkins master pod properties and Jenkins plugins. -Every single change here requires a pod restart.

-
-seedJobs
- - -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.SeedJob - - -
-(Optional) -

SeedJobs defines list of Jenkins Seed Job configurations -More info: https://github.com/jenkinsci/kubernetes-operator/blob/master/docs/getting-started.md#configure-seed-jobs-and-pipelines

-
-notifications
- - -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Notification - - -
-

Notifications defines list of a services which are used to inform about Jenkins status -Can be used to integrate chat services like Slack, Microsoft Teams or Mailgun

-
-service
- - -Service - - -
-(Optional) -

Service is Kubernetes service of Jenkins master HTTP pod -Defaults to : -port: 8080 -type: ClusterIP

-
-slaveService
- - -Service - - -
-(Optional) -

Service is Kubernetes service of Jenkins slave pods -Defaults to : -port: 50000 -type: ClusterIP

-
-backup
- - -Backup - - -
-(Optional) -

Backup defines configuration of Jenkins backup -More info: https://github.com/jenkinsci/kubernetes-operator/blob/master/docs/getting-started.md#configure-backup-and-restore

-
-restore
- - -Restore - - -
-(Optional) -

Backup defines configuration of Jenkins backup restore -More info: https://github.com/jenkinsci/kubernetes-operator/blob/master/docs/getting-started.md#configure-backup-and-restore

-
-groovyScripts
- - -GroovyScripts - - -
-(Optional) -

GroovyScripts defines configuration of Jenkins customization via groovy scripts

-
-configurationAsCode
- - -ConfigurationAsCode - - -
-(Optional) -

ConfigurationAsCode defines configuration of Jenkins customization via Configuration as Code Jenkins plugin

-
-

JenkinsStatus -

-

-(Appears on: -Jenkins) -

-

-

JenkinsStatus defines the observed state of Jenkins

-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldDescription
-operatorVersion
- -string - -
-(Optional) -

OperatorVersion is the operator version which manages this CR

-
-provisionStartTime
- - -Kubernetes meta/v1.Time - - -
-(Optional) -

ProvisionStartTime is a time when Jenkins master pod has been created

-
-baseConfigurationCompletedTime
- - -Kubernetes meta/v1.Time - - -
-(Optional) -

BaseConfigurationCompletedTime is a time when Jenkins base configuration phase has been completed

-
-userConfigurationCompletedTime
- - -Kubernetes meta/v1.Time - - -
-(Optional) -

UserConfigurationCompletedTime is a time when Jenkins user configuration phase has been completed

-
-restoredBackup
- -uint64 - -
-(Optional) -

RestoredBackup is the restored backup number after Jenkins master pod restart

-
-lastBackup
- -uint64 - -
-(Optional) -

LastBackup is the latest backup number

-
-pendingBackup
- -uint64 - -
-(Optional) -

PendingBackup is the pending backup number

-
-backupDoneBeforePodDeletion
- -bool - -
-(Optional) -

BackupDoneBeforePodDeletion tells if backup before pod deletion has been made

-
-userAndPasswordHash
- -string - -
-(Optional) -

UserAndPasswordHash is a SHA256 hash made from user and password

-
-createdSeedJobs
- -[]string - -
-(Optional) -

CreatedSeedJobs contains list of seed job id already created in Jenkins

-
-appliedGroovyScripts
- - -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.AppliedGroovyScript - - -
-(Optional) -

AppliedGroovyScripts is a list with all applied groovy scripts in Jenkins by the operator

-
-

Mailgun -

-

-(Appears on: -Notification) -

-

-

Mailgun is handler for Mailgun email service notification channel

-

- - - - - - - - - - - - - - - - - - - - - - - - - -
FieldDescription
-domain
- -string - -
-
-apiKeySecretKeySelector
- - -SecretKeySelector - - -
-
-recipient
- -string - -
-
-from
- -string - -
-
-

MicrosoftTeams -

-

-(Appears on: -Notification) -

-

-

MicrosoftTeams is handler for Microsoft MicrosoftTeams notification channel

-

- - - - - - - - - - - - - -
FieldDescription
-webHookURLSecretKeySelector
- - -SecretKeySelector - - -
-

The web hook URL to MicrosoftTeams App

-
-

Notification -

-

-(Appears on: -JenkinsSpec) -

-

-

Notification is a service configuration used to send notifications about Jenkins status

-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldDescription
-level
- - -NotificationLevel - - -
-
-verbose
- -bool - -
-
-name
- -string - -
-
-slack
- - -github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Slack - - -
-
-teams
- - -github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.MicrosoftTeams - - -
-
-mailgun
- - -github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Mailgun - - -
-
-smtp
- - -github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.SMTP - - -
-
-

NotificationLevel -(string alias)

-

-(Appears on: -Notification) -

-

-

NotificationLevel defines the level of a Notification

-

-

Plugin -

-

-(Appears on: -JenkinsMaster) -

-

-

Plugin defines Jenkins plugin

-

- - - - - - - - - - - - - - - - - -
FieldDescription
-name
- -string - -
-

Name is the name of Jenkins plugin

-
-version
- -string - -
-

Version is the version of Jenkins plugin

-
-

Restore -

-

-(Appears on: -JenkinsSpec) -

-

-

Restore defines configuration of Jenkins backup restore operation

-

- - - - - - - - - - - - - - - - - - - - - -
FieldDescription
-containerName
- -string - -
-

ContainerName is the container name responsible for restore backup operation

-
-action
- - -Handler - - -
-

Action defines action which performs restore backup in restore container sidecar

-
-recoveryOnce
- -uint64 - -
-(Optional) -

RecoveryOnce if want to restore specific backup set this field and then Jenkins will be restarted and desired backup will be restored

-
-

SMTP -

-

-(Appears on: -Notification) -

-

-

SMTP is handler for sending emails via this protocol

-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldDescription
-usernameSecretKeySelector
- - -SecretKeySelector - - -
-
-passwordSecretKeySelector
- - -SecretKeySelector - - -
-
-port
- -int - -
-
-server
- -string - -
-
-tlsInsecureSkipVerify
- -bool - -
-
-from
- -string - -
-
-to
- -string - -
-
-

SecretKeySelector -

-

-(Appears on: -Mailgun, -MicrosoftTeams, -SMTP, -Slack) -

-

-

SecretKeySelector selects a key of a Secret.

-

- - - - - - - - - - - - - - - - - -
FieldDescription
-secret
- - -Kubernetes core/v1.LocalObjectReference - - -
-

The name of the secret in the pod’s namespace to select from.

-
-key
- -string - -
-

The key of the secret to select from. Must be a valid secret key.

-
-

SecretRef -

-

-(Appears on: -Customization) -

-

-

SecretRef is reference to Kubernetes secret

-

- - - - - - - - - - - - - -
FieldDescription
-name
- -string - -
-
-

SeedJob -

-

-(Appears on: -JenkinsSpec) -

-

-

SeedJob defines configuration for seed job -More info: https://github.com/jenkinsci/kubernetes-operator/blob/master/docs/getting-started.md#configure-seed-jobs-and-pipelines

-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldDescription
-id
- -string - -
-

ID is the unique seed job name

-
-credentialID
- -string - -
-

CredentialID is the Kubernetes secret name which stores repository access credentials

-
-description
- -string - -
-(Optional) -

Description is the description of the seed job

-
-targets
- -string - -
-

Targets is the repository path where are seed job definitions

-
-repositoryBranch
- -string - -
-

RepositoryBranch is the repository branch where are seed job definitions

-
-repositoryUrl
- -string - -
-

RepositoryURL is the repository access URL. Can be SSH or HTTPS.

-
-credentialType
- - -JenkinsCredentialType - - -
-(Optional) -

JenkinsCredentialType is the https://jenkinsci.github.io/kubernetes-credentials-provider-plugin/ credential type

-
-githubPushTrigger
- -bool - -
-(Optional) -

GitHubPushTrigger is used for GitHub web hooks

-
-buildPeriodically
- -string - -
-(Optional) -

BuildPeriodically is setting for scheduled trigger

-
-pollSCM
- -string - -
-(Optional) -

PollSCM is setting for polling changes in SCM

-
-ignoreMissingFiles
- -bool - -
-(Optional) -

IgnoreMissingFiles is setting for Job DSL API plugin to ignore files that miss

-
-additionalClasspath
- -string - -
-(Optional) -

AdditionalClasspath is setting for Job DSL API plugin to set Additional Classpath

-
-failOnMissingPlugin
- -bool - -
-(Optional) -

FailOnMissingPlugin is setting for Job DSL API plugin that fails job if required plugin is missing

-
-unstableOnDeprecation
- -bool - -
-(Optional) -

UnstableOnDeprecation is setting for Job DSL API plugin that sets build status as unstable if build using deprecated features

-
-

Service -

-

-(Appears on: -JenkinsSpec) -

-

-

Service defines Kubernetes service attributes

-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldDescription
-annotations
- -map[string]string - -
-(Optional) -

Annotations is an unstructured key value map stored with a resource that may be -set by external tools to store and retrieve arbitrary metadata. They are not -queryable and should be preserved when modifying objects. -More info: http://kubernetes.io/docs/user-guide/annotations

-
-labels
- -map[string]string - -
-

Route service traffic to pods with label keys and values matching this -selector. If empty or not present, the service is assumed to have an -external process managing its endpoints, which Kubernetes will not -modify. Only applies to types ClusterIP, NodePort, and LoadBalancer. -Ignored if type is ExternalName. -More info: https://kubernetes.io/docs/concepts/services-networking/service/

-
-type
- - -Kubernetes core/v1.ServiceType - - -
-(Optional) -

Type determines how the Service is exposed. Defaults to ClusterIP. Valid -options are ExternalName, ClusterIP, NodePort, and LoadBalancer. -“ExternalName” maps to the specified externalName. -“ClusterIP” allocates a cluster-internal IP address for load-balancing to -endpoints. Endpoints are determined by the selector or if that is not -specified, by manual construction of an Endpoints object. If clusterIP is -“None”, no virtual IP is allocated and the endpoints are published as a -set of endpoints rather than a stable IP. -“NodePort” builds on ClusterIP and allocates a port on every node which -routes to the clusterIP. -“LoadBalancer” builds on NodePort and creates an -external load-balancer (if supported in the current cloud) which routes -to the clusterIP. -More info: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services—service-types

-
-port
- -int32 - -
-

The port that are exposed by this service. -More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies

-
-nodePort
- -int32 - -
-(Optional) -

The port on each node on which this service is exposed when type=NodePort or LoadBalancer. -Usually assigned by the system. If specified, it will be allocated to the service -if unused or else creation of the service will fail. -Default is to auto-allocate a port if the ServiceType of this Service requires one. -More info: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport

-
-loadBalancerSourceRanges
- -[]string - -
-(Optional) -

If specified and supported by the platform, this will restrict traffic through the cloud-provider -load-balancer will be restricted to the specified client IPs. This field will be ignored if the -cloud-provider does not support the feature.” -More info: https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/

-
-loadBalancerIP
- -string - -
-(Optional) -

Only applies to Service Type: LoadBalancer -LoadBalancer will get created with the IP specified in this field. -This feature depends on whether the underlying cloud-provider supports specifying -the loadBalancerIP when a load balancer is created. -This field will be ignored if the cloud-provider does not support the feature.

-
-

Slack -

-

-(Appears on: -Notification) -

-

-

Slack is handler for Slack notification channel

-

- - - - - - - - - - - - - -
FieldDescription
-webHookURLSecretKeySelector
- - -SecretKeySelector - - -
-

The web hook URL to Slack App

-
-
-

-Generated with gen-crd-api-reference-docs -on git commit 4b89360. -

- - - -
Last modified December 20, 2019 -
-
- - -
-
-
- - - - -
- - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/docs/getting-started/v0.4.x/aks/index.html b/docs/docs/getting-started/v0.4.x/aks/index.html deleted file mode 100644 index bcc7f000b..000000000 --- a/docs/docs/getting-started/v0.4.x/aks/index.html +++ /dev/null @@ -1,986 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -AKS | Jenkins Operator - - - - - - - - - - - - - - - - - - - - - - - - - - - - AKS | Jenkins Operator - - -
- - - -
-
-
-
-
- - - - - -
- - - - -
- - - - -
-
- - - - - - - - - - - -
-
- - - -
-

AKS

-
Additional configuration for Azure Kubernetes Service
-

Azure AKS managed Kubernetes service adds to every pod the following environment variables:

-
- name: KUBERNETES_PORT_443_TCP_ADDR
-  value:
-- name: KUBERNETES_PORT
-  value: tcp://
-- name: KUBERNETES_PORT_443_TCP
-  value: tcp://
-- name: KUBERNETES_SERVICE_HOST
-  value:
-

The operator is aware of it and omits these environment variables when checking if a Jenkins pod environment has been changed. It prevents the -restart of a Jenkins pod over and over again.

- - - -
Last modified April 13, 2020 -
-
- - -
-
-
- - - - -
- - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/docs/getting-started/v0.4.x/configuration/index.html b/docs/docs/getting-started/v0.4.x/configuration/index.html deleted file mode 100644 index 70dc6fb82..000000000 --- a/docs/docs/getting-started/v0.4.x/configuration/index.html +++ /dev/null @@ -1,1273 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Configuration | Jenkins Operator - - - - - - - - - - - - - - - - - - - - - - - - - - - - Configuration | Jenkins Operator - - -
- - - -
-
-
-
-
- - - - - -
- - - - -
- - - - -
- -
- - - -
-

Configuration

-
How to configure Jenkins with Operator
- - -

Configure Seed Jobs and Pipelines

- -

Jenkins operator uses job-dsl and kubernetes-credentials-provider plugins for configuring jobs -and deploy keys.

- -

Prepare job definitions and pipelines

- -

First you have to prepare pipelines and job definition in your GitHub repository using the following structure:

-
cicd/
-├── jobs
-│   └── build.jenkins
-└── pipelines
-    └── build.jenkins
-

cicd/jobs/build.jenkins is a job definition:

-
#!/usr/bin/env groovy
-
-pipelineJob('build-jenkins-operator') {
-    displayName('Build jenkins-operator')
-
-    definition {
-        cpsScm {
-            scm {
-                git {
-                    remote {
-                        url('https://github.com/jenkinsci/kubernetes-operator.git')
-                        credentials('jenkins-operator')
-                    }
-                    branches('*/master')
-                }
-            }
-            scriptPath('cicd/pipelines/build.jenkins')
-        }
-    }
-}
-

cicd/pipelines/build.jenkins is an actual Jenkins pipeline:

-
#!/usr/bin/env groovy
-
-def label = "build-jenkins-operator-${UUID.randomUUID().toString()}"
-def home = "/home/jenkins"
-def workspace = "${home}/workspace/build-jenkins-operator"
-def workdir = "${workspace}/src/github.com/jenkinsci/kubernetes-operator/"
-
-podTemplate(label: label,
-        containers: [
-                containerTemplate(name: 'jnlp', image: 'jenkins/inbound-agent:alpine'),
-                containerTemplate(name: 'go', image: 'golang:1-alpine', command: 'cat', ttyEnabled: true),
-        ],
-        envVars: [
-                envVar(key: 'GOPATH', value: workspace),
-        ],
-        ) {
-
-    node(label) {
-        dir(workdir) {
-            stage('Init') {
-                timeout(time: 3, unit: 'MINUTES') {
-                    checkout scm
-                }
-                container('go') {
-                    sh 'apk --no-cache --update add make git gcc libc-dev'
-                }
-            }
-
-            stage('Dep') {
-                container('go') {
-                    sh 'make dep'
-                }
-            }
-
-            stage('Test') {
-                container('go') {
-                    sh 'make test'
-                }
-            }
-
-            stage('Build') {
-                container('go') {
-                    sh 'make build'
-                }
-            }
-        }
-    }
-}
-

Configure Seed Jobs

- -

Jenkins Seed Jobs are configured using Jenkins.spec.seedJobs section from your custom resource manifest:

-
apiVersion: jenkins.io/v1alpha2
-kind: Jenkins
-metadata:
-  name: example
-spec:
-  seedJobs:
-  - id: jenkins-operator
-    targets: "cicd/jobs/*.jenkins"
-    description: "Jenkins Operator repository"
-    repositoryBranch: master
-    repositoryUrl: https://github.com/jenkinsci/kubernetes-operator.git
-

Jenkins Operator will automatically discover and configure all the seed jobs.

- -

You can verify if deploy keys were successfully configured in the Jenkins Credentials tab.

- -

jenkins

- -

You can verify if your pipelines were successfully configured in the Jenkins Seed Job console output.

- -

jenkins

- -

If your GitHub repository is private you have to configure SSH or username/password authentication.

- -

SSH authentication

- -

Generate SSH Keys

- -

There are two methods of SSH private key generation:

-
$ openssl genrsa -out <filename> 2048
-

or

-
$ ssh-keygen -t rsa -b 2048
-$ ssh-keygen -p -f <filename> -m pem
-

Then copy content from generated file.

- -

Public key

- -

If you want to upload your public key to your Git server you need to extract it.

- -

If key was generated by openssl then you need to type this to extract public key:

-
$ openssl rsa -in <filename> -pubout > <filename>.pub
-

If key was generated by ssh-keygen the public key content is located in .pub and there is no need to extract public key

- -

Configure SSH authentication

- -

Configure a seed job like this:

-
apiVersion: jenkins.io/v1alpha2
-kind: Jenkins
-metadata:
-  name: example
-spec:
-  seedJobs:
-  - id: jenkins-operator-ssh
-    credentialType: basicSSHUserPrivateKey
-    credentialID: k8s-ssh
-    targets: "cicd/jobs/*.jenkins"
-    description: "Jenkins Operator repository"
-    repositoryBranch: master
-    repositoryUrl: ssh://git@github.com:jenkinsci/kubernetes-operator.git
-

and create a Kubernetes Secret (name of secret should be the same from credentialID field):

-
apiVersion: v1
-kind: Secret
-metadata:
-  name: k8s-ssh
-  labels:
-    "jenkins.io/credentials-type": "basicSSHUserPrivateKey"
-  annotations:
-    "jenkins.io/credentials-description" : "ssh github.com:jenkinsci/kubernetes-operator"
-stringData:
-  privateKey: |
-    -----BEGIN RSA PRIVATE KEY-----
-    MIIJKAIBAAKCAgEAxxDpleJjMCN5nusfW/AtBAZhx8UVVlhhhIKXvQ+dFODQIdzO
-    oDXybs1zVHWOj31zqbbJnsfsVZ9Uf3p9k6xpJ3WFY9b85WasqTDN1xmSd6swD4N8
-    ...
-  username: github_user_name
-

Username & password authentication

- -

Configure the seed job like:

-
apiVersion: jenkins.io/v1alpha2
-kind: Jenkins
-metadata:
-  name: example
-spec:
-  seedJobs:
-  - id: jenkins-operator-user-pass
-    credentialType: usernamePassword
-    credentialID: k8s-user-pass
-    targets: "cicd/jobs/*.jenkins"
-    description: "Jenkins Operator repository"
-    repositoryBranch: master
-    repositoryUrl: https://github.com/jenkinsci/kubernetes-operator.git
-

and create a Kubernetes Secret (name of secret should be the same from credentialID field):

-
apiVersion: v1
-kind: Secret
-metadata:
-  name: k8s-user-pass
-stringData:
-  username: github_user_name
-  password: password_or_token
-

External authentication

- -

You can use external credential type if you want to configure authentication using Configuration As Code or Groovy Script.

- -

HTTP Proxy for downloading plugins

- -

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.:

-
spec:
-  master:
-    containers:
-      - name: jenkins-master
-        env:
-          - name: CURL_OPTIONS
-            value: -L -x <proxy_url>
-

In CURL_OPTIONS var you can set additional arguments to curl command.

- -

Pulling Docker images from private repositories

- -

To pull a Docker Image from private repository you can use imagePullSecrets.

- -

Please follow the instructions on creating a secret with a docker config.

- -

Docker Hub Configuration

- -

To use Docker Hub additional steps are required.

- -

Edit the previously created secret:

-
kubectl -n <namespace> edit secret <name>
-

The .dockerconfigjson key’s value needs to be replaced with a modified version.

- -

After modifications, it needs to be encoded as a Base64 value before setting the .dockerconfigjson key.

- -

Example config file to modify and use:

-
{
-    "auths":{
-        "https://index.docker.io/v1/":{
-            "username":"user",
-            "password":"password",
-            "email":"yourdockeremail@gmail.com",
-            "auth":"base64 of string user:password"
-        },
-        "auth.docker.io":{
-            "username":"user",
-            "password":"password",
-            "email":"yourdockeremail@gmail.com",
-            "auth":"base64 of string user:password"
-        },
-        "registry.docker.io":{
-            "username":"user",
-            "password":"password",
-            "email":"yourdockeremail@gmail.com",
-            "auth":"base64 of string user:password"
-        },
-        "docker.io":{
-            "username":"user",
-            "password":"password",
-            "email":"yourdockeremail@gmail.com",
-            "auth":"base64 of string user:password"
-        },
-        "https://registry-1.docker.io/v2/": {
-            "username":"user",
-            "password":"password",
-            "email":"yourdockeremail@gmail.com",
-            "auth":"base64 of string user:password"
-        },
-        "registry-1.docker.io/v2/": {
-            "username":"user",
-            "password":"password",
-            "email":"yourdockeremail@gmail.com",
-            "auth":"base64 of string user:password"
-        },
-        "registry-1.docker.io": {
-            "username":"user",
-            "password":"password",
-            "email":"yourdockeremail@gmail.com",
-            "auth":"base64 of string user:password"
-        },
-        "https://registry-1.docker.io": {
-            "username":"user",
-            "password":"password",
-            "email":"yourdockeremail@gmail.com",
-            "auth":"base64 of string user:password"
-        }
-    }
-}
- - -
Last modified April 13, 2020 -
-
- - -
-
-
- - - - -
- - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/docs/getting-started/v0.4.x/configure-backup-and-restore/index.html b/docs/docs/getting-started/v0.4.x/configure-backup-and-restore/index.html deleted file mode 100644 index daef67a03..000000000 --- a/docs/docs/getting-started/v0.4.x/configure-backup-and-restore/index.html +++ /dev/null @@ -1,1062 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Configure backup and restore | Jenkins Operator - - - - - - - - - - - - - - - - - - - - - - - - - - - - Configure backup and restore | Jenkins Operator - - -
- - - -
-
-
-
-
- - - - - -
- - - - -
- - - - -
-
- - - - - - - - - - - - - - - -
-
- - - -
-

Configure backup and restore

-
Prevent loss of job history
- - -

Backup and restore is done by a container sidecar.

- -

PVC

- -

Create PVC

- -

Save to the file named pvc.yaml:

-
apiVersion: v1
-kind: PersistentVolumeClaim
-metadata:
-  name: <pvc_name>
-  namespace: <namespace>
-spec:
-  accessModes:
-  - ReadWriteOnce
-  resources:
-    requests:
-      storage: 500Gi
-

Run the following command:

-
$ kubectl -n <namespace> create -f pvc.yaml
-

Configure Jenkins CR

-
apiVersion: jenkins.io/v1alpha2
-kind: Jenkins
-metadata:
-  name: <cr_name>
-  namespace: <namespace>
-spec:
-  master:
-    securityContext:
-      runAsUser: 1000
-      fsGroup: 1000
-    containers:
-    - name: jenkins-master
-      image: jenkins/jenkins:lts
-    - name: backup # container responsible for the backup and restore
-      env:
-      - name: BACKUP_DIR
-        value: /backup
-      - name: JENKINS_HOME
-        value: /jenkins-home
-      - name: BACKUP_COUNT
-        value: "3" # keep only the 2 most recent backups
-      image: virtuslab/jenkins-operator-backup-pvc:v0.0.8 # look at backup/pvc directory
-      imagePullPolicy: IfNotPresent
-      volumeMounts:
-      - mountPath: /jenkins-home # Jenkins home volume
-        name: jenkins-home
-      - mountPath: /backup # backup volume
-        name: backup
-    volumes:
-    - name: backup # PVC volume where backups will be stored
-      persistentVolumeClaim:
-        claimName: <pvc_name>
-  backup:
-    containerName: backup # container name is responsible for backup
-    action:
-      exec:
-        command:
-        - /home/user/bin/backup.sh # this command is invoked on "backup" container to make backup, for example /home/user/bin/backup.sh <backup_number>, <backup_number> is passed by operator
-    interval: 30 # how often make backup in seconds
-    makeBackupBeforePodDeletion: true # make a backup before pod deletion
-  restore:
-    containerName: backup # container name is responsible for restore backup
-    action:
-      exec:
-        command:
-        - /home/user/bin/restore.sh # this command is invoked on "backup" container to make restore backup, for example /home/user/bin/restore.sh <backup_number>, <backup_number> is passed by operator
-    #recoveryOnce: <backup_number> # if want to restore specific backup configure this field and then Jenkins will be restarted and desired backup will be restored
- - -
Last modified April 13, 2020 -
-
- - -
-
-
- - - - -
- - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/docs/getting-started/v0.4.x/custom-backup-and-restore/index.html b/docs/docs/getting-started/v0.4.x/custom-backup-and-restore/index.html deleted file mode 100644 index fc32efde2..000000000 --- a/docs/docs/getting-started/v0.4.x/custom-backup-and-restore/index.html +++ /dev/null @@ -1,1158 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Custom Backup and Restore Providers | Jenkins Operator - - - - - - - - - - - - - - - - - - - - - - - - - - - - Custom Backup and Restore Providers | Jenkins Operator - - -
- - - -
-
-
-
-
- - - - - -
- - - - -
- - - - -
- -
- - - -
-

Custom Backup and Restore Providers

-
Custom backup and restore provider
- - -

With enough effort one can create a custom backup and restore provider -for the Jenkins Operator.

- -

Requirements

- -

Two commands (e.g. scripts) are required:

- -
    -
  • a backup command, e.g. backup.sh that takes one argument, a backup number
  • -
  • a restore command, e.g. backup.sh that takes one argument, a backup number
  • -
- -

Both scripts need to return an exit code of 0 on success and 1 or greater for failure.

- -

One of those scripts (or the entry point of the container) needs to be responsible -for backup cleanup or rotation if required, or an external system.

- -

How it works

- -

The mechanism relies on basic Kubernetes and UNIX functionalities.

- -

The backup (and restore) container runs as a sidecar in the same -Kubernetes pod as the Jenkins master.

- -

Name of the backup and restore containers can be set as necessary using -spec.backup.containerName and spec.restore.containerName. -In most cases it will be the same container, but we allow for less common use cases.

- -

The operator will call a backup or restore commands inside a sidecar container when necessary:

- -
    -
  • backup command (defined in spec.backup.action.exec.command) -will be called every N seconds configurable in: spec.backup.interval -and on pod shutdown (if enabled in spec.backup.makeBackupBeforePodDeletion) -with an integer representing the current backup number as first and only argument
  • -
  • restore command (defined in spec.restore.action.exec.command) -will be called at Jenkins startup -with an integer representing the backup number to restore as first and only argument -(can be overridden using spec.restore.recoveryOnce)
  • -
- -

Example AWS S3 backup using the CLI

- -

This example shows abbreviated version of a simple AWS S3 backup implementation -using: aws-cli, bash and kube2iam.

- -

In addition to your normal Jenkins CustomResource some additional settings -for backup and restore are required, e.g.:

-
kind: Jenkins
-apiVersion: jenkins.io/v1alpha1
-metadata:
-  name: example
-  namespace: jenkins
-spec:
-  master:
-    masterAnnotations:
-      iam.amazonaws.com/role: "my-example-backup-role" # tell kube2iam where the AWS IAM role is
-    containers:
-      - name: jenkins-master
-        ...
-      - name: backup # container responsible for backup and restore
-        image: quay.io/virtuslab/aws-cli:1.16.263-2
-        workingDir: /home/user/bin/
-        command: # our container entry point
-          - sleep
-          - infinity
-        env:
-          - name: BACKUP_BUCKET
-            value: my-example-bucket # the S3 bucket name to use
-          - name: BACKUP_PATH
-            value: my-backup-path # the S3 bucket path prefix to use
-          - name: JENKINS_HOME
-            value: /jenkins-home # the path to mount jenkins home dir in the backup container
-        volumeMounts:
-          - mountPath: /jenkins-home # Jenkins home volume
-            name: jenkins-home
-          - mountPath: /home/user/bin/backup.sh
-            name: backup-scripts
-            subPath: backup.sh
-            readOnly: true
-          - mountPath: /home/user/bin/restore.sh
-            name: backup-scripts
-            subPath: restore.sh
-            readOnly: true
-    volumes:
-      - name: backup-scripts
-        configMap:
-          defaultMode: 0754
-          name: jenkins-operator-backup-s3
-    securityContext: # make sure both containers use the same UID and GUID
-      runAsUser: 1000
-      fsGroup: 1000
-  ...
-  backup:
-    containerName: backup # container name responsible for backup
-    interval: 3600 # how often make a backup in seconds
-    makeBackupBeforePodDeletion: true # trigger backup just before deleting the pod
-    action:
-      exec:
-        command:
-          # this command is invoked on "backup" container to create a backup,
-          # <backup_number> is passed by operator,
-          # for example /home/user/bin/backup.sh <backup_number>
-          - /home/user/bin/backup.sh
-  restore:
-    containerName: backup # container name is responsible for restore backup
-    action:
-      exec:
-        command:
-          # this command is invoked on "backup" container to restore a backup,
-          # <backup_number> is passed by operator
-          # for example /home/user/bin/restore.sh <backup_number>
-          - /home/user/bin/restore.sh
-#    recoveryOnce: <backup_number> # if want to restore specific backup configure this field and then Jenkins will be restarted and desired backup will be restored
-

The actual backup and restore scripts will be provided in a ConfigMap:

-
kind: ConfigMap
-apiVersion: v1
-metadata:
-  name: jenkins-operator-backup-s3
-  namespace: jenkins
-  labels:
-    app: jenkins-operator
-data:
-  backup.sh: |-
-    #!/bin/bash -xeu
-    [[ ! $# -eq 1 ]] && echo "Usage: $0 backup_number" && exit 1;
-    [[ -z "${BACKUP_BUCKET}" ]] && echo "Required 'BACKUP_BUCKET' env not set" && exit 1;
-    [[ -z "${BACKUP_PATH}" ]] && echo "Required 'BACKUP_PATH' env not set" && exit 1;
-    [[ -z "${JENKINS_HOME}" ]] && echo "Required 'JENKINS_HOME' env not set" && exit 1;
-
-    backup_number=$1
-    echo "Running backup #${backup_number}"
-
-    BACKUP_TMP_DIR=$(mktemp -d)
-    tar -C ${JENKINS_HOME} -czf "${BACKUP_TMP_DIR}/${backup_number}.tar.gz" --exclude jobs/*/workspace* -c jobs && \
-
-    aws s3 cp ${BACKUP_TMP_DIR}/${backup_number}.tar.gz s3://${BACKUP_BUCKET}/${BACKUP_PATH}/${backup_number}.tar.gz
-    echo Done
-
-  restore.sh: |-
-    #!/bin/bash -xeu
-    [[ ! $# -eq 1 ]] && echo "Usage: $0 backup_number" && exit 1
-    [[ -z "${BACKUP_BUCKET}" ]] && echo "Required 'BACKUP_BUCKET' env not set" && exit 1;
-    [[ -z "${BACKUP_PATH}" ]] && echo "Required 'BACKUP_PATH' env not set" && exit 1;
-    [[ -z "${JENKINS_HOME}" ]] && echo "Required 'JENKINS_HOME' env not set" && exit 1;
-
-    backup_number=$1
-    echo "Running restore #${backup_number}"
-
-    BACKUP_TMP_DIR=$(mktemp -d)
-    aws s3 cp s3://${BACKUP_BUCKET}/${BACKUP_PATH}/${backup_number}.tar.gz ${BACKUP_TMP_DIR}/${backup_number}.tar.gz
-
-    tar -C ${JENKINS_HOME} -zxf "${BACKUP_TMP_DIR}/${backup_number}.tar.gz"
-    echo Done
-

In our example we will use S3 bucket lifecycle policy to keep -the number of backups under control, e.g. Cloud Formation fragment:

-
    Type: AWS::S3::Bucket
-    Properties:
-      BucketName: my-example-bucket
-      ...
-      LifecycleConfiguration:
-        Rules:
-          - Id: BackupCleanup
-            Status: Enabled
-            Prefix: my-backup-path
-            ExpirationInDays: 7
-            NoncurrentVersionExpirationInDays: 14
-            AbortIncompleteMultipartUpload:
-              DaysAfterInitiation: 3
- - -
Last modified April 13, 2020 -
-
- - -
-
-
- - - - -
- - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/docs/getting-started/v0.4.x/customization/index.html b/docs/docs/getting-started/v0.4.x/customization/index.html deleted file mode 100644 index 1794c21ae..000000000 --- a/docs/docs/getting-started/v0.4.x/customization/index.html +++ /dev/null @@ -1,1160 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Customization | Jenkins Operator - - - - - - - - - - - - - - - - - - - - - - - - - - - - Customization | Jenkins Operator - - -
- - - -
-
-
-
-
- - - - - -
- - - - -
- - - - -
- -
- - - -
-

Customization

-
How to customize Jenkins
- - -

How to customize Jenkins

- -

Jenkins can be customized with plugins. -Plugin’s configuration is applied as groovy scripts or the configuration as code plugin. -Any plugin working for Jenkins can be installed by the Jenkins Operator.

- -

Pre-installed plugins: -* configuration-as-code v1.38 -* git v4.2.2 -* job-dsl v1.77 -* kubernetes-credentials-provider v0.13 -* kubernetes v1.25.2 -* workflow-aggregator v2.6 -* workflow-job v2.38

- -

Rest of the plugins can be found in plugins repository.

- -

Install plugins

- -

Edit Custom Resource under spec.master.plugins:

-
apiVersion: jenkins.io/v1alpha2
-kind: Jenkins
-metadata:
-  name: example
-spec:
-  master:
-   plugins:
-   - name: simple-theme-plugin
-     version: 0.5.1
-

Under spec.master.basePlugins you can find plugins for a valid Jenkins Operator:

-
apiVersion: jenkins.io/v1alpha2
-kind: Jenkins
-metadata:
-  name: example
-spec:
-  master:
-    basePlugins:
-    - name: kubernetes
-      version: 1.18.3
-    - name: workflow-job
-      version: "2.34"
-    - name: workflow-aggregator
-      version: "2.6"
-    - name: git
-      version: 3.12.0
-    - name: job-dsl
-      version: "1.76"
-    - name: configuration-as-code
-      version: "1.29"
-    - name: kubernetes-credentials-provider
-      version: 0.12.1
-

You can change their versions.

- -

The Jenkins Operator will then automatically install plugins after the Jenkins master pod restart.

- -

Apply plugin’s config

- -

By using a ConfigMap you can create your own Jenkins customized configuration. -Then you must reference the ConfigMap in the Jenkins pod customization file in spec.groovyScripts or spec.configurationAsCode

- -

Create a ConfigMap with specific name (eg. jenkins-operator-user-configuration). Then, modify the Jenkins manifest:

-
apiVersion: jenkins.io/v1alpha2
-kind: Jenkins
-metadata:
-  name: example
-spec:
-  configurationAsCode:
-    configurations: 
-    - name: jenkins-operator-user-configuration
-  groovyScripts:
-    configurations:
-    - name: jenkins-operator-user-configuration
-

Here is an example of jenkins-operator-user-configuration:

-
apiVersion: v1
-kind: ConfigMap
-metadata:
-  name: jenkins-operator-user-configuration
-data:
-  1-configure-theme.groovy: | 
-    import jenkins.*
-    import jenkins.model.*
-    import hudson.*
-    import hudson.model.*
-    import org.jenkinsci.plugins.simpletheme.ThemeElement
-    import org.jenkinsci.plugins.simpletheme.CssTextThemeElement
-    import org.jenkinsci.plugins.simpletheme.CssUrlThemeElement
-
-    Jenkins jenkins = Jenkins.getInstance()
-
-    def decorator = Jenkins.instance.getDescriptorByType(org.codefirst.SimpleThemeDecorator.class)
-
-    List<ThemeElement> configElements = new ArrayList<>();
-    configElements.add(new CssTextThemeElement("DEFAULT"));
-    configElements.add(new CssUrlThemeElement("https://cdn.rawgit.com/afonsof/jenkins-material-theme/gh-pages/dist/material-light-green.css"));
-    decorator.setElements(configElements);
-    decorator.save();
-
-    jenkins.save()
-  1-system-message.yaml: |
-    jenkins:
-      systemMessage: "Configuration as Code integration works!!!"
-
    -
  • *.groovy is Groovy script configuration
  • -
  • *.yaml is configuration as code
  • -
- -

If you want to correct your configuration you can edit it while the Jenkins Operator is running. -Jenkins will reconcile and apply the new configuration.

- -

How to use secrets from a Groovy scripts

- -

If you configured spec.groovyScripts.secret.name, then this secret is available to use from map Groovy scripts. -The secrets are loaded to secrets map.

- -

Create a secret with for example the name jenkins-conf-secrets.

-
kind: Secret
-apiVersion: v1
-type: Opaque
-metadata:
-  name: jenkins-conf-secrets
-  namespace: default
-data:
-  SYSTEM_MESSAGE: SGVsbG8gd29ybGQ=
-

Then modify the Jenkins pod manifest by changing spec.groovyScripts.secret.name to jenkins-conf-secrets.

-
apiVersion: jenkins.io/v1alpha2
-kind: Jenkins
-metadata:
-  name: example
-spec:
-  configurationAsCode:
-    configurations: 
-    - name: jenkins-operator-user-configuration
-    secret:
-      name: jenkins-conf-secrets
-  groovyScripts:
-    configurations:
-    - name: jenkins-operator-user-configuration
-    secret:
-      name: jenkins-conf-secrets
-

Now you can test that the secret is mounted by applying this ConfigMap for Groovy script:

-
apiVersion: v1
-kind: ConfigMap
-metadata:
-  name: jenkins-operator-user-configuration
-data:
-  1-system-message.groovy: | 
-    import jenkins.*
-    import jenkins.model.*
-    import hudson.*
-    import hudson.model.*
-    Jenkins jenkins = Jenkins.getInstance()
-    
-    jenkins.setSystemMessage(secrets["SYSTEM_MESSAGE"])
-    jenkins.save()
-

Or by applying this configuration as code:

-
apiVersion: v1
-kind: ConfigMap
-metadata:
-  name: jenkins-operator-user-configuration
-data:
-  1-system-message.yaml: |
-    jenkins:
-      systemMessage: ${SYSTEM_MESSAGE}
-

After this, you should see the Hello world system message from the Jenkins homepage.

- - - -
Last modified April 13, 2020 -
-
- - -
-
-
- - - - -
- - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/docs/getting-started/v0.4.x/deploy-jenkins/index.html b/docs/docs/getting-started/v0.4.x/deploy-jenkins/index.html deleted file mode 100644 index 9734399d5..000000000 --- a/docs/docs/getting-started/v0.4.x/deploy-jenkins/index.html +++ /dev/null @@ -1,1034 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Deploy Jenkins | Jenkins Operator - - - - - - - - - - - - - - - - - - - - - - - - - - - - Deploy Jenkins | Jenkins Operator - - -
- - - -
-
-
-
-
- - - - - -
- - - - -
- - - - -
-
- - - - - - - - - - - -
-
- - - -
-

Deploy Jenkins

-
Deploy production ready Jenkins Operator manifest
-

Once Jenkins Operator is up and running let’s deploy actual Jenkins instance. -Create manifest e.g. jenkins_instance.yaml with following data and save it on drive.

-
apiVersion: jenkins.io/v1alpha2
-kind: Jenkins
-metadata:
-  name: example
-spec:
-  master:
-    containers:
-    - name: jenkins-master
-      image: jenkins/jenkins:lts
-      imagePullPolicy: Always
-      livenessProbe:
-        failureThreshold: 12
-        httpGet:
-          path: /login
-          port: http
-          scheme: HTTP
-        initialDelaySeconds: 80
-        periodSeconds: 10
-        successThreshold: 1
-        timeoutSeconds: 5
-      readinessProbe:
-        failureThreshold: 3
-        httpGet:
-          path: /login
-          port: http
-          scheme: HTTP
-        initialDelaySeconds: 30
-        periodSeconds: 10
-        successThreshold: 1
-        timeoutSeconds: 1
-      resources:
-        limits:
-          cpu: 1500m
-          memory: 3Gi
-        requests:
-          cpu: "1"
-          memory: 500Mi
-  seedJobs:
-  - id: jenkins-operator
-    targets: "cicd/jobs/*.jenkins"
-    description: "Jenkins Operator repository"
-    repositoryBranch: master
-    repositoryUrl: https://github.com/jenkinsci/kubernetes-operator.git
-

Deploy a Jenkins to Kubernetes:

-
kubectl create -f jenkins_instance.yaml
-

Watch the Jenkins instance being created:

-
kubectl get pods -w
-

Get the Jenkins credentials:

-
kubectl get secret jenkins-operator-credentials-<cr_name> -o 'jsonpath={.data.user}' | base64 -d
-kubectl get secret jenkins-operator-credentials-<cr_name> -o 'jsonpath={.data.password}' | base64 -d
-

Connect to the Jenkins instance (minikube):

-
minikube service jenkins-operator-http-<cr_name> --url
-

Connect to the Jenkins instance (actual Kubernetes cluster):

-
kubectl port-forward jenkins-<cr_name> 8080:8080
-

Then open browser with address http://localhost:8080.

- -

jenkins

- - - -
Last modified April 13, 2020 -
-
- - -
-
-
- - - - -
- - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/docs/getting-started/v0.4.x/diagnostics/index.html b/docs/docs/getting-started/v0.4.x/diagnostics/index.html deleted file mode 100644 index 2d356c514..000000000 --- a/docs/docs/getting-started/v0.4.x/diagnostics/index.html +++ /dev/null @@ -1,991 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Diagnostics | Jenkins Operator - - - - - - - - - - - - - - - - - - - - - - - - - - - - Diagnostics | Jenkins Operator - - -
- - - -
-
-
-
-
- - - - - -
- - - - -
- - - - -
-
- - - - - - - - - - - - - -
-
- - - -
-

Diagnostics

-
How to deal with Jenkins Operator problems
- - -

Turn on debug in Jenkins Operator deployment:

-
sed -i 's|\(args:\).*|\1\ ["--debug"\]|' deploy/operator.yaml
-kubectl apply -f deploy/operator.yaml
-

Watch Kubernetes events:

-
kubectl get events --sort-by='{.lastTimestamp}'
-

Verify Jenkins master logs:

-
kubectl logs -f jenkins-<cr_name>
-

Verify the jenkins-operator logs:

-
kubectl logs deployment/jenkins-operator
-

Troubleshooting

- -

Delete the Jenkins master pod and wait for the new one to come up:

-
kubectl delete pod jenkins-<cr_name>
- - -
Last modified April 13, 2020 -
-
- - -
-
-
- - - - -
- - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/docs/getting-started/v0.4.x/index.html b/docs/docs/getting-started/v0.4.x/index.html deleted file mode 100644 index 95d2c8a65..000000000 --- a/docs/docs/getting-started/v0.4.x/index.html +++ /dev/null @@ -1,1234 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - -v0.4.x | Jenkins Operator - - - - - - - - - - - - - - - - - - - - v0.4.x | Jenkins Operator - - -
- - - -
-
-
-
-
- - - - - -
- - - - -
- - - - -
-
- - - - - - - - - - - - - -
-
- - - -
-

v0.4.x

-
How to work with Jenkins Operator 0.4.x version. We recommend migrating to a newer version.
- - - - -
-

This document describes a getting started guide for Jenkins Operator v0.4.x and also additional configuration.

- -
- - -

First Steps

- -

Prepare your Kubernetes cluster and set up your kubectl access.

- -

Once you have running Kubernetes cluster you can focus on installing Jenkins Operator according to the Installation guide.

- -
- - - - -
- - - - - - - - - - - - - - - - -
-
- Deploy Jenkins -
-

Deploy production ready Jenkins Operator manifest -

-
- - - - - - - - - - - - - - - - - - - - - -
-
- Configuration -
-

How to configure Jenkins with Operator -

-
- - - - - - - - - - - - - - - - - -
-
- Customization -
-

How to customize Jenkins -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- AKS -
-

Additional configuration for Azure Kubernetes Service -

-
- - - -
-
- Configure backup and restore -
-

Prevent loss of job history -

-
- - - -
-
- Custom Backup and Restore Providers -
-

Custom backup and restore provider -

-
- - - -
-
- Notifications -
-

How to setup operator notifications. -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- OpenShift -
-

Additional configuration for OpenShift -

-
- - - - - - - - - - - -
-
- Diagnostics -
-

How to deal with Jenkins Operator problems -

-
- - - -
-
- Schema -
-

API Schema definitions for Jenkins CRD -

-
- - - - - - - - - - - - - - - - - -
- - - -
Last modified August 19, 2021 -
-
- -
-
-
- - - - -
- - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/docs/getting-started/v0.4.x/index.xml b/docs/docs/getting-started/v0.4.x/index.xml deleted file mode 100644 index 2845329c2..000000000 --- a/docs/docs/getting-started/v0.4.x/index.xml +++ /dev/null @@ -1,3713 +0,0 @@ - - - Jenkins Operator – v0.4.x - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.4.x/ - Recent Hugo news from gohugo.io - Hugo -- gohugo.io - Thu, 19 Aug 2021 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/img/hugo.png - GoHugo.io - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.4.x/ - - - - - - - - - - - - Docs: Deploy Jenkins - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.4.x/deploy-jenkins/ - Mon, 13 Apr 2020 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.4.x/deploy-jenkins/ - - - - <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: - name: example -spec: - master: - containers: - - name: jenkins-master - image: jenkins/jenkins:lts - imagePullPolicy: Always - livenessProbe: - failureThreshold: <span style="color:#0000cf;font-weight:bold">12</span> - httpGet: - path: /login - port: http - scheme: HTTP - initialDelaySeconds: <span style="color:#0000cf;font-weight:bold">80</span> - periodSeconds: <span style="color:#0000cf;font-weight:bold">10</span> - successThreshold: <span style="color:#0000cf;font-weight:bold">1</span> - timeoutSeconds: <span style="color:#0000cf;font-weight:bold">5</span> - readinessProbe: - failureThreshold: <span style="color:#0000cf;font-weight:bold">3</span> - httpGet: - path: /login - port: http - scheme: HTTP - initialDelaySeconds: <span style="color:#0000cf;font-weight:bold">30</span> - periodSeconds: <span style="color:#0000cf;font-weight:bold">10</span> - successThreshold: <span style="color:#0000cf;font-weight:bold">1</span> - timeoutSeconds: <span style="color:#0000cf;font-weight:bold">1</span> - resources: - limits: - cpu: 1500m - memory: 3Gi - requests: - cpu: <span style="color:#4e9a06">&#34;1&#34;</span> - memory: 500Mi - seedJobs: - - id: jenkins-operator - targets: <span style="color:#4e9a06">&#34;cicd/jobs/*.jenkins&#34;</span> - description: <span style="color:#4e9a06">&#34;Jenkins Operator repository&#34;</span> - repositoryBranch: master - repositoryUrl: https://github.com/jenkinsci/kubernetes-operator.git</code></pre></div> -<p>Deploy a Jenkins to 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> -<p>Get the Jenkins credentials:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl get secret jenkins-operator-credentials-&lt;cr_name&gt; -o <span style="color:#4e9a06">&#39;jsonpath={.data.user}&#39;</span> <span style="color:#000;font-weight:bold">|</span> base64 -d -kubectl get secret jenkins-operator-credentials-&lt;cr_name&gt; -o <span style="color:#4e9a06">&#39;jsonpath={.data.password}&#39;</span> <span style="color:#000;font-weight:bold">|</span> base64 -d</code></pre></div> -<p>Connect to the Jenkins instance (minikube):</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">minikube service jenkins-operator-http-&lt;cr_name&gt; --url</code></pre></div> -<p>Connect to the Jenkins instance (actual Kubernetes cluster):</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl port-forward jenkins-&lt;cr_name&gt; 8080:8080</code></pre></div> -<p>Then open browser with address <code>http://localhost:8080</code>.</p> - -<p><img src="https://jenkinsci.github.io/kubernetes-operator/kubernetes-operator/img/jenkins.png" alt="jenkins" /></p> - - - - - - Docs: Configuration - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.4.x/configuration/ - Mon, 13 Apr 2020 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.4.x/configuration/ - - - - - -<h2 id="configure-seed-jobs-and-pipelines">Configure Seed Jobs and Pipelines</h2> - -<p>Jenkins operator uses <a href="https://github.com/jenkinsci/job-dsl-plugin">job-dsl</a> and <a href="https://jenkinsci.github.io/kubernetes-credentials-provider-plugin/">kubernetes-credentials-provider</a> plugins for configuring jobs -and deploy keys.</p> - -<h2 id="prepare-job-definitions-and-pipelines">Prepare job definitions and pipelines</h2> - -<p>First you have to prepare pipelines and job definition in your GitHub repository using the following structure:</p> -<pre><code>cicd/ -├── jobs -│   └── build.jenkins -└── pipelines - └── build.jenkins</code></pre> -<p><strong><code>cicd/jobs/build.jenkins</code></strong> is a job definition:</p> -<pre><code>#!/usr/bin/env groovy - -pipelineJob('build-jenkins-operator') { - displayName('Build jenkins-operator') - - definition { - cpsScm { - scm { - git { - remote { - url('https://github.com/jenkinsci/kubernetes-operator.git') - credentials('jenkins-operator') - } - branches('*/master') - } - } - scriptPath('cicd/pipelines/build.jenkins') - } - } -}</code></pre> -<p><strong><code>cicd/pipelines/build.jenkins</code></strong> is an actual Jenkins pipeline:</p> -<pre><code>#!/usr/bin/env groovy - -def label = "build-jenkins-operator-${UUID.randomUUID().toString()}" -def home = "/home/jenkins" -def workspace = "${home}/workspace/build-jenkins-operator" -def workdir = "${workspace}/src/github.com/jenkinsci/kubernetes-operator/" - -podTemplate(label: label, - containers: [ - containerTemplate(name: 'jnlp', image: 'jenkins/inbound-agent:alpine'), - containerTemplate(name: 'go', image: 'golang:1-alpine', command: 'cat', ttyEnabled: true), - ], - envVars: [ - envVar(key: 'GOPATH', value: workspace), - ], - ) { - - node(label) { - dir(workdir) { - stage('Init') { - timeout(time: 3, unit: 'MINUTES') { - checkout scm - } - container('go') { - sh 'apk --no-cache --update add make git gcc libc-dev' - } - } - - stage('Dep') { - container('go') { - sh 'make dep' - } - } - - stage('Test') { - container('go') { - sh 'make test' - } - } - - stage('Build') { - container('go') { - sh 'make build' - } - } - } - } -}</code></pre> -<h2 id="configure-seed-jobs">Configure Seed Jobs</h2> - -<p>Jenkins Seed Jobs are configured using <code>Jenkins.spec.seedJobs</code> section from your custom resource manifest:</p> -<pre><code>apiVersion: jenkins.io/v1alpha2 -kind: Jenkins -metadata: - name: example -spec: - seedJobs: - - id: jenkins-operator - targets: "cicd/jobs/*.jenkins" - description: "Jenkins Operator repository" - repositoryBranch: master - repositoryUrl: https://github.com/jenkinsci/kubernetes-operator.git</code></pre> -<p><strong>Jenkins Operator</strong> will automatically discover and configure all the seed jobs.</p> - -<p>You can verify if deploy keys were successfully configured in the Jenkins <strong>Credentials</strong> tab.</p> - -<p><img src="https://jenkinsci.github.io/kubernetes-operator/kubernetes-operator/img/jenkins-credentials.png" alt="jenkins" /></p> - -<p>You can verify if your pipelines were successfully configured in the Jenkins Seed Job console output.</p> - -<p><img src="https://jenkinsci.github.io/kubernetes-operator/kubernetes-operator/img/jenkins-seed.png" alt="jenkins" /></p> - -<p>If your GitHub repository is <strong>private</strong> you have to configure SSH or username/password authentication.</p> - -<h3 id="ssh-authentication">SSH authentication</h3> - -<h4 id="generate-ssh-keys">Generate SSH Keys</h4> - -<p>There are two methods of SSH private key generation:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">$ openssl genrsa -out &lt;filename&gt; <span style="color:#0000cf;font-weight:bold">2048</span></code></pre></div> -<p>or</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">$ ssh-keygen -t rsa -b <span style="color:#0000cf;font-weight:bold">2048</span> -$ ssh-keygen -p -f &lt;filename&gt; -m pem</code></pre></div> -<p>Then copy content from generated file.</p> - -<h4 id="public-key">Public key</h4> - -<p>If you want to upload your public key to your Git server you need to extract it.</p> - -<p>If key was generated by <code>openssl</code> then you need to type this to extract public key:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">$ openssl rsa -in &lt;filename&gt; -pubout &gt; &lt;filename&gt;.pub</code></pre></div> -<p>If key was generated by <code>ssh-keygen</code> the public key content is located in <filename>.pub and there is no need to extract public key</p> - -<h4 id="configure-ssh-authentication">Configure SSH authentication</h4> - -<p>Configure a seed job like this:</p> -<pre><code>apiVersion: jenkins.io/v1alpha2 -kind: Jenkins -metadata: - name: example -spec: - seedJobs: - - id: jenkins-operator-ssh - credentialType: basicSSHUserPrivateKey - credentialID: k8s-ssh - targets: "cicd/jobs/*.jenkins" - description: "Jenkins Operator repository" - repositoryBranch: master - repositoryUrl: ssh://git@github.com:jenkinsci/kubernetes-operator.git</code></pre> -<p>and create a Kubernetes Secret (name of secret should be the same from <code>credentialID</code> field):</p> -<pre><code>apiVersion: v1 -kind: Secret -metadata: - name: k8s-ssh - labels: - "jenkins.io/credentials-type": "basicSSHUserPrivateKey" - annotations: - "jenkins.io/credentials-description" : "ssh github.com:jenkinsci/kubernetes-operator" -stringData: - privateKey: | - -----BEGIN RSA PRIVATE KEY----- - MIIJKAIBAAKCAgEAxxDpleJjMCN5nusfW/AtBAZhx8UVVlhhhIKXvQ+dFODQIdzO - oDXybs1zVHWOj31zqbbJnsfsVZ9Uf3p9k6xpJ3WFY9b85WasqTDN1xmSd6swD4N8 - ... - username: github_user_name</code></pre> -<h3 id="username-password-authentication">Username &amp; password authentication</h3> - -<p>Configure the seed job like:</p> -<pre><code>apiVersion: jenkins.io/v1alpha2 -kind: Jenkins -metadata: - name: example -spec: - seedJobs: - - id: jenkins-operator-user-pass - credentialType: usernamePassword - credentialID: k8s-user-pass - targets: "cicd/jobs/*.jenkins" - description: "Jenkins Operator repository" - repositoryBranch: master - repositoryUrl: https://github.com/jenkinsci/kubernetes-operator.git</code></pre> -<p>and create a Kubernetes Secret (name of secret should be the same from <code>credentialID</code> field):</p> -<pre><code>apiVersion: v1 -kind: Secret -metadata: - name: k8s-user-pass -stringData: - username: github_user_name - password: password_or_token</code></pre> -<h3 id="external-authentication">External authentication</h3> - -<p>You can use <code>external</code> credential type if you want to configure authentication using Configuration As Code or Groovy Script.</p> - -<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 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"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-master<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>env<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>CURL_OPTIONS<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-L<span style="color:#f8f8f8;text-decoration:underline"> </span>-x<span style="color:#f8f8f8;text-decoration:underline"> </span>&lt;proxy_url&gt;</code></pre></div> -<p>In <code>CURL_OPTIONS</code> var you can set additional arguments to <code>curl</code> command.</p> - -<h2 id="pulling-docker-images-from-private-repositories">Pulling Docker images from private repositories</h2> - -<p>To pull a Docker Image from private repository you can use <code>imagePullSecrets</code>.</p> - -<p>Please follow the instructions on <a href="https://kubernetes.io/docs/concepts/containers/images/?origin_team=T42NTAGHM#creating-a-secret-with-a-docker-config">creating a secret with a docker config</a>.</p> - -<h3 id="docker-hub-configuration">Docker Hub Configuration</h3> - -<p>To use Docker Hub additional steps are required.</p> - -<p>Edit the previously created secret:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl -n &lt;namespace&gt; edit secret &lt;name&gt;</code></pre></div> -<p>The <code>.dockerconfigjson</code> key&rsquo;s value needs to be replaced with a modified version.</p> - -<p>After modifications, it needs to be encoded as a Base64 value before setting the <code>.dockerconfigjson</code> key.</p> - -<p>Example config file to modify and use:</p> -<pre><code>{ - "auths":{ - "https://index.docker.io/v1/":{ - "username":"user", - "password":"password", - "email":"yourdockeremail@gmail.com", - "auth":"base64 of string user:password" - }, - "auth.docker.io":{ - "username":"user", - "password":"password", - "email":"yourdockeremail@gmail.com", - "auth":"base64 of string user:password" - }, - "registry.docker.io":{ - "username":"user", - "password":"password", - "email":"yourdockeremail@gmail.com", - "auth":"base64 of string user:password" - }, - "docker.io":{ - "username":"user", - "password":"password", - "email":"yourdockeremail@gmail.com", - "auth":"base64 of string user:password" - }, - "https://registry-1.docker.io/v2/": { - "username":"user", - "password":"password", - "email":"yourdockeremail@gmail.com", - "auth":"base64 of string user:password" - }, - "registry-1.docker.io/v2/": { - "username":"user", - "password":"password", - "email":"yourdockeremail@gmail.com", - "auth":"base64 of string user:password" - }, - "registry-1.docker.io": { - "username":"user", - "password":"password", - "email":"yourdockeremail@gmail.com", - "auth":"base64 of string user:password" - }, - "https://registry-1.docker.io": { - "username":"user", - "password":"password", - "email":"yourdockeremail@gmail.com", - "auth":"base64 of string user:password" - } - } -}</code></pre> - - - - - Docs: Customization - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.4.x/customization/ - Mon, 13 Apr 2020 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.4.x/customization/ - - - - - -<h2 id="how-to-customize-jenkins">How to customize Jenkins</h2> - -<p>Jenkins can be customized with plugins. -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.38 -* git v4.2.2 -* job-dsl v1.77 -* kubernetes-credentials-provider v0.13 -* kubernetes v1.25.2 -* workflow-aggregator v2.6 -* workflow-job v2.38</p> - -<p>Rest of the plugins can be found in <a href="https://plugins.jenkins.io/">plugins repository</a>.</p> - -<h4 id="install-plugins">Install plugins</h4> - -<p>Edit Custom Resource under <code>spec.master.plugins</code>:</p> -<pre><code>apiVersion: jenkins.io/v1alpha2 -kind: Jenkins -metadata: - name: example -spec: - master: - plugins: - - name: simple-theme-plugin - version: 0.5.1</code></pre> -<p>Under <code>spec.master.basePlugins</code> you can find plugins for a valid <strong>Jenkins Operator</strong>:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.io/v1alpha2<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>example<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>master<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>basePlugins<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>kubernetes<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1.18</span><span style="color:#0000cf;font-weight:bold">.3</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>workflow-job<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;2.34&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>workflow-aggregator<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;2.6&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>git<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">3.12</span><span style="color:#0000cf;font-weight:bold">.0</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>job-dsl<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;1.76&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configuration-as-code<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;1.29&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>kubernetes-credentials-provider<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">0.12</span><span style="color:#0000cf;font-weight:bold">.1</span></code></pre></div> -<p>You can change their versions.</p> - -<p>The <strong>Jenkins Operator</strong> will then automatically install plugins after the Jenkins master pod restart.</p> - -<h4 id="apply-plugin-s-config">Apply plugin&rsquo;s config</h4> - -<p>By using a <a href="https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/">ConfigMap</a> you can create your own <strong>Jenkins</strong> customized configuration. -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>Create a <strong><code>ConfigMap</code></strong> with specific name (eg. <code>jenkins-operator-user-configuration</code>). Then, modify the <strong>Jenkins</strong> manifest:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.io/v1alpha2<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>example<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurationAsCode<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurations<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-user-configuration<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>groovyScripts<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurations<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-user-configuration</code></pre></div> -<p>Here is an example of <code>jenkins-operator-user-configuration</code>:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>v1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>ConfigMap<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-user-configuration<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>data<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>-configure-theme.groovy<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">| -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">import jenkins.*</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.model.*<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>hudson.*<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>hudson.model.*<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>org.jenkinsci.plugins.simpletheme.ThemeElement<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>org.jenkinsci.plugins.simpletheme.CssTextThemeElement<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>org.jenkinsci.plugins.simpletheme.CssUrlThemeElement<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins<span style="color:#f8f8f8;text-decoration:underline"> </span>=<span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins.getInstance()<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>def<span style="color:#f8f8f8;text-decoration:underline"> </span>decorator<span style="color:#f8f8f8;text-decoration:underline"> </span>=<span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins.instance.getDescriptorByType(org.codefirst.SimpleThemeDecorator.class)<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>List&lt;ThemeElement&gt;<span style="color:#f8f8f8;text-decoration:underline"> </span>configElements<span style="color:#f8f8f8;text-decoration:underline"> </span>=<span style="color:#f8f8f8;text-decoration:underline"> </span>new<span style="color:#f8f8f8;text-decoration:underline"> </span>ArrayList&lt;&gt;();<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configElements.add(new<span style="color:#f8f8f8;text-decoration:underline"> </span>CssTextThemeElement(<span style="color:#4e9a06">&#34;DEFAULT&#34;</span>));<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configElements.add(new<span style="color:#f8f8f8;text-decoration:underline"> </span>CssUrlThemeElement(<span style="color:#4e9a06">&#34;https://cdn.rawgit.com/afonsof/jenkins-material-theme/gh-pages/dist/material-light-green.css&#34;</span>));<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>decorator.setElements(configElements);<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>decorator.save();<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.save()<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>-system-message.yaml<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">| -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">jenkins:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>systemMessage<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Configuration as Code integration works!!!&#34;</span></code></pre></div> -<ul> -<li><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. -Jenkins will reconcile and apply the new configuration.</p> - -<h2 id="how-to-use-secrets-from-a-groovy-scripts">How to use secrets from a Groovy scripts</h2> - -<p>If you configured <code>spec.groovyScripts.secret.name</code>, then this secret is available to use from map Groovy scripts. -The secrets are loaded to <code>secrets</code> map.</p> - -<p>Create a <a href="https://kubernetes.io/docs/concepts/configuration/secret/">secret</a> with for example the name <code>jenkins-conf-secrets</code>.</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Secret<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>v1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>type<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Opaque<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-conf-secrets<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>namespace<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>default<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>data<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>SYSTEM_MESSAGE<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>SGVsbG8gd29ybGQ=</code></pre></div> -<p>Then modify the <strong>Jenkins</strong> pod manifest by changing <code>spec.groovyScripts.secret.name</code> to <code>jenkins-conf-secrets</code>.</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.io/v1alpha2<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>example<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurationAsCode<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurations<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-user-configuration<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>secret<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-conf-secrets<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>groovyScripts<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurations<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-user-configuration<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>secret<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-conf-secrets</code></pre></div> -<p>Now you can test that the secret is mounted by applying this <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"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-user-configuration<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>data<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>-system-message.groovy<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">| -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">import jenkins.*</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.model.*<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>hudson.*<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>hudson.model.*<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins<span style="color:#f8f8f8;text-decoration:underline"> </span>=<span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins.getInstance()<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.setSystemMessage(secrets<span style="color:#000;font-weight:bold">[</span><span style="color:#4e9a06">&#34;SYSTEM_MESSAGE&#34;</span><span style="color:#000;font-weight:bold">]</span>)<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.save()</code></pre></div> -<p>Or by applying this configuration as code:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>v1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>ConfigMap<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-user-configuration<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>data<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>-system-message.yaml<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">| -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">jenkins:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>systemMessage<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>${SYSTEM_MESSAGE}</code></pre></div> -<p>After this, you should see the <code>Hello world</code> system message from the <strong>Jenkins</strong> homepage.</p> - - - - - - Docs: AKS - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.4.x/aks/ - Mon, 13 Apr 2020 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.4.x/aks/ - - - - <p>Azure AKS managed Kubernetes service adds to every pod the following environment variables:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>KUBERNETES_PORT_443_TCP_ADDR<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>KUBERNETES_PORT<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>tcp<span style="color:#000;font-weight:bold">:</span>//<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>KUBERNETES_PORT_443_TCP<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>tcp<span style="color:#000;font-weight:bold">:</span>//<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>KUBERNETES_SERVICE_HOST<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span></code></pre></div> -<p>The operator is aware of it and omits these environment variables when checking if a Jenkins pod environment has been changed. It prevents the -restart of a Jenkins pod over and over again.</p> - - - - - - Docs: Configure backup and restore - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.4.x/configure-backup-and-restore/ - Mon, 13 Apr 2020 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.4.x/configure-backup-and-restore/ - - - - - -<p>Backup and restore is done by a container sidecar.</p> - -<h3 id="pvc">PVC</h3> - -<h4 id="create-pvc">Create PVC</h4> - -<p>Save to the file named pvc.yaml:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>v1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>PersistentVolumeClaim<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>&lt;pvc_name<span style="color:#8f5902;font-style:italic">&gt; -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">namespace: &lt;namespace&gt;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>accessModes<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>ReadWriteOnce<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>requests<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>storage<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>500Gi</code></pre></div> -<p>Run the following command:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">$ kubectl -n &lt;namespace&gt; create -f pvc.yaml</code></pre></div> -<h4 id="configure-jenkins-cr">Configure Jenkins CR</h4> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.io/v1alpha2<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>&lt;cr_name<span style="color:#8f5902;font-style:italic">&gt; -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">namespace: &lt;namespace&gt;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>master<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>securityContext<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>runAsUser<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1000</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>fsGroup<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1000</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>containers<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-master<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>image<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins/jenkins<span style="color:#000;font-weight:bold">:</span>lts<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># container responsible for the backup and restore</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>env<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>BACKUP_DIR<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/backup<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>JENKINS_HOME<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/jenkins-home<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>BACKUP_COUNT<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;3&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># keep only the 2 most recent backups</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>image<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>virtuslab/jenkins-operator-backup-pvc<span style="color:#000;font-weight:bold">:</span>v0<span style="color:#0000cf;font-weight:bold">.0</span><span style="color:#0000cf;font-weight:bold">.8</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># look at backup/pvc directory</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>imagePullPolicy<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>IfNotPresent<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>volumeMounts<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>mountPath<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/jenkins-home<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># Jenkins home volume</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-home<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>mountPath<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># backup volume</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>volumes<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># PVC volume where backups will be stored</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>persistentVolumeClaim<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>claimName<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>&lt;pvc_name<span style="color:#8f5902;font-style:italic">&gt; -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">backup:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>containerName<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># container name is responsible for backup</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>action<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>command<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>/home/user/bin/backup.sh<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># this command is invoked on &#34;backup&#34; container to make backup, for example /home/user/bin/backup.sh &lt;backup_number&gt;, &lt;backup_number&gt; is passed by operator</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>interval<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">30</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># how often make backup in seconds</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>makeBackupBeforePodDeletion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">true</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># make a backup before pod deletion</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>restore<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>containerName<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># container name is responsible for restore backup</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>action<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>command<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>/home/user/bin/restore.sh<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># this command is invoked on &#34;backup&#34; container to make restore backup, for example /home/user/bin/restore.sh &lt;backup_number&gt;, &lt;backup_number&gt; is passed by operator</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">#recoveryOnce: &lt;backup_number&gt; # if want to restore specific backup configure this field and then Jenkins will be restarted and desired backup will be restored</span></code></pre></div> - - - - - Docs: Custom Backup and Restore Providers - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.4.x/custom-backup-and-restore/ - Mon, 13 Apr 2020 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.4.x/custom-backup-and-restore/ - - - - - -<p>With enough effort one can create a custom backup and restore provider -for the Jenkins Operator.</p> - -<h2 id="requirements">Requirements</h2> - -<p>Two commands (e.g. scripts) are required:</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> - -<p>One of those scripts (or the entry point of the container) needs to be responsible -for backup cleanup or rotation if required, or an external system.</p> - -<h2 id="how-it-works">How it works</h2> - -<p>The mechanism relies on basic Kubernetes and UNIX functionalities.</p> - -<p>The backup (and restore) container runs as a sidecar in the same -Kubernetes pod as the Jenkins master.</p> - -<p>Name of the backup and restore containers can be set as necessary using -<code>spec.backup.containerName</code> and <code>spec.restore.containerName</code>. -In most cases it will be the same container, but we allow for less common use cases.</p> - -<p>The operator will call a backup or restore commands inside a sidecar container when necessary:</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> - -<p>This example shows abbreviated version of a simple AWS S3 backup implementation -using: <code>aws-cli</code>, <code>bash</code> and <code>kube2iam</code>.</p> - -<p>In addition to your normal <code>Jenkins</code> <code>CustomResource</code> some additional settings -for backup and restore are required, e.g.:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.io/v1alpha1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>example<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>namespace<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>master<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>masterAnnotations<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>iam.amazonaws.com/role<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;my-example-backup-role&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># tell kube2iam where the AWS IAM role is</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>containers<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-master<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>...<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># container responsible for backup and restore</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>image<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>quay.io/virtuslab/aws-cli<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.16</span><span style="color:#0000cf;font-weight:bold">.263</span><span style="color:#0000cf;font-weight:bold">-2</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>workingDir<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/home/user/bin/<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>command<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># our container entry point</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>sleep<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>infinity<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>env<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>BACKUP_BUCKET<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>my-example-bucket<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># the S3 bucket name to use</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>BACKUP_PATH<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>my-backup-path<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># the S3 bucket path prefix to use</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>JENKINS_HOME<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/jenkins-home<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># the path to mount jenkins home dir in the backup container</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>volumeMounts<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>mountPath<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/jenkins-home<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># Jenkins home volume</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-home<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>mountPath<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/home/user/bin/backup.sh<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup-scripts<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>subPath<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup.sh<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>readOnly<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">true</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>mountPath<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/home/user/bin/restore.sh<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup-scripts<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>subPath<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>restore.sh<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>readOnly<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">true</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>volumes<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup-scripts<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configMap<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>defaultMode<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">0754</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-backup-s3<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>securityContext<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># make sure both containers use the same UID and GUID</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>runAsUser<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1000</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>fsGroup<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1000</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>...<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>containerName<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># container name responsible for backup</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>interval<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">3600</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># how often make a backup in seconds</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>makeBackupBeforePodDeletion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">true</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># trigger backup just before deleting the pod</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>action<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>command<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># this command is invoked on &#34;backup&#34; container to create a backup,</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># &lt;backup_number&gt; is passed by operator,</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># for example /home/user/bin/backup.sh &lt;backup_number&gt;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>/home/user/bin/backup.sh<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>restore<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>containerName<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># container name is responsible for restore backup</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>action<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>command<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># this command is invoked on &#34;backup&#34; container to restore a backup,</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># &lt;backup_number&gt; is passed by operator</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># for example /home/user/bin/restore.sh &lt;backup_number&gt;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>/home/user/bin/restore.sh<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#8f5902;font-style:italic"># recoveryOnce: &lt;backup_number&gt; # if want to restore specific backup configure this field and then Jenkins will be restarted and desired backup will be restored</span></code></pre></div> -<p>The actual backup and restore scripts will be provided in a <code>ConfigMap</code>:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>ConfigMap<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>v1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-backup-s3<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>namespace<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>labels<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>app<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>data<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup.sh<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>|<span style="color:#8f5902;font-style:italic">- -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">#!/bin/bash -xeu</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">[</span><span style="color:#f8f8f8;text-decoration:underline"> </span>!<span style="color:#f8f8f8;text-decoration:underline"> </span>$<span style="color:#8f5902;font-style:italic"># -eq 1 ]] &amp;&amp; echo &#34;Usage: $0 backup_number&#34; &amp;&amp; exit 1;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">[</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-z<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;${BACKUP_BUCKET}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">]</span><span style="color:#000;font-weight:bold">]</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Required &#39;BACKUP_BUCKET&#39; env not set&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exit<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>;<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">[</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-z<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;${BACKUP_PATH}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">]</span><span style="color:#000;font-weight:bold">]</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Required &#39;BACKUP_PATH&#39; env not set&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exit<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>;<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">[</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-z<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;${JENKINS_HOME}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">]</span><span style="color:#000;font-weight:bold">]</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Required &#39;JENKINS_HOME&#39; env not set&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exit<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>;<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup_number=$<span style="color:#0000cf;font-weight:bold">1</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Running backup #${backup_number}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>BACKUP_TMP_DIR=$(mktemp<span style="color:#f8f8f8;text-decoration:underline"> </span>-d)<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>tar<span style="color:#f8f8f8;text-decoration:underline"> </span>-C<span style="color:#f8f8f8;text-decoration:underline"> </span>${JENKINS_HOME}<span style="color:#f8f8f8;text-decoration:underline"> </span>-czf<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;${BACKUP_TMP_DIR}/${backup_number}.tar.gz&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>--exclude<span style="color:#f8f8f8;text-decoration:underline"> </span>jobs/<span style="color:#8f5902;font-style:italic">*/workspace*</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-c<span style="color:#f8f8f8;text-decoration:underline"> </span>jobs<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>\<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>aws<span style="color:#f8f8f8;text-decoration:underline"> </span>s3<span style="color:#f8f8f8;text-decoration:underline"> </span>cp<span style="color:#f8f8f8;text-decoration:underline"> </span>${BACKUP_TMP_DIR}/${backup_number}.tar.gz<span style="color:#f8f8f8;text-decoration:underline"> </span>s3<span style="color:#000;font-weight:bold">:</span>//${BACKUP_BUCKET}/${BACKUP_PATH}/${backup_number}.tar.gz<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span>Done<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>restore.sh<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>|<span style="color:#8f5902;font-style:italic">- -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">#!/bin/bash -xeu</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">[</span><span style="color:#f8f8f8;text-decoration:underline"> </span>!<span style="color:#f8f8f8;text-decoration:underline"> </span>$<span style="color:#8f5902;font-style:italic"># -eq 1 ]] &amp;&amp; echo &#34;Usage: $0 backup_number&#34; &amp;&amp; exit 1</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">[</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-z<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;${BACKUP_BUCKET}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">]</span><span style="color:#000;font-weight:bold">]</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Required &#39;BACKUP_BUCKET&#39; env not set&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exit<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>;<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">[</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-z<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;${BACKUP_PATH}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">]</span><span style="color:#000;font-weight:bold">]</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Required &#39;BACKUP_PATH&#39; env not set&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exit<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>;<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">[</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-z<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;${JENKINS_HOME}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">]</span><span style="color:#000;font-weight:bold">]</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Required &#39;JENKINS_HOME&#39; env not set&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exit<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>;<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup_number=$<span style="color:#0000cf;font-weight:bold">1</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Running restore #${backup_number}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>BACKUP_TMP_DIR=$(mktemp<span style="color:#f8f8f8;text-decoration:underline"> </span>-d)<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>aws<span style="color:#f8f8f8;text-decoration:underline"> </span>s3<span style="color:#f8f8f8;text-decoration:underline"> </span>cp<span style="color:#f8f8f8;text-decoration:underline"> </span>s3<span style="color:#000;font-weight:bold">:</span>//${BACKUP_BUCKET}/${BACKUP_PATH}/${backup_number}.tar.gz<span style="color:#f8f8f8;text-decoration:underline"> </span>${BACKUP_TMP_DIR}/${backup_number}.tar.gz<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>tar<span style="color:#f8f8f8;text-decoration:underline"> </span>-C<span style="color:#f8f8f8;text-decoration:underline"> </span>${JENKINS_HOME}<span style="color:#f8f8f8;text-decoration:underline"> </span>-zxf<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;${BACKUP_TMP_DIR}/${backup_number}.tar.gz&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span>Done</code></pre></div> -<p>In our example we will use S3 bucket lifecycle policy to keep -the number of backups under control, e.g. Cloud Formation fragment:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#f8f8f8;text-decoration:underline"> </span>Type<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>AWS<span style="color:#000;font-weight:bold">:</span><span style="color:#000;font-weight:bold">:</span>S3<span style="color:#000;font-weight:bold">:</span><span style="color:#000;font-weight:bold">:</span>Bucket<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Properties<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>BucketName<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>my-example-bucket<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>...<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>LifecycleConfiguration<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Rules<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>Id<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>BackupCleanup<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Status<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Enabled<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Prefix<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>my-backup-path<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>ExpirationInDays<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">7</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>NoncurrentVersionExpirationInDays<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">14</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>AbortIncompleteMultipartUpload<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>DaysAfterInitiation<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">3</span></code></pre></div> - - - - - Docs: Notifications - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.4.x/notifications/ - Mon, 13 Apr 2020 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.4.x/notifications/ - - - - - -<h2 id="slack">Slack</h2> - -<p>Please follow <a href="https://api.slack.com/incoming-webhooks">this</a> instructions to get web hook URL.</p> - -<p>Create web hook secret with name <code>jenkins-operator-notification-data</code>. Contains key <code>url</code> with provided web hook URL.</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">$ kubectl create secret generic jenkins-operator-notification-data --from-literal<span style="color:#ce5c00;font-weight:bold">=</span><span style="color:#000">url</span><span style="color:#ce5c00;font-weight:bold">=</span>&lt;webhook_url&gt;</code></pre></div> -<p>Example configuration for Slack:</p> -<pre><code>kind: Jenkins -spec: - master: - notifications: - - level: info - verbose: true - name: <name> - slack: - webHookURLSecretKeySelector: - secret: - name: <secret_name> - key: <key></code></pre> -<h2 id="microsoft-teams">Microsoft Teams</h2> - -<p>Please follow <a href="https://docs.microsoft.com/en-gb/outlook/actionable-messages/send-via-connectors">this</a> instructions to get web hook URL.</p> - -<p>Example configuration for Microsoft Teams:</p> -<pre><code>kind: Jenkins -spec: - master: - notifications: - - level: info - verbose: true - name: <name> - teams: - webHookURLSecretKeySelector: - secret: - name: <secret_name> - key: <key></code></pre> -<h2 id="mailgun">Mailgun</h2> - -<p>Example configuration for Mailgun:</p> -<pre><code>kind: Jenkins -spec: - master: - notifications: - - level: info - verbose: true - name: <name> - mailgun: - domain: <domain> - apiKeySecretKeySelector: - secret: - name: <secret_name> - key: <key> - recipient: <your_email> - from: <mailgun_email></code></pre> -<h2 id="debug-options">Debug options</h2> - -<p>As you see there is two debugging options:</p> - -<ul> -<li><p><code>level</code> (warning/info) - Set level of messages to send.</p></li> - -<li><p><code>verbose</code> - Print stacktrace and additional error messages</p></li> -</ul> - -<h2 id="multiple-providers">Multiple providers</h2> - -<p>You can use multiple providers to send notification to another communication channels at the same time. -For example you will send notifications to Slack and Teams.</p> -<pre><code>kind: Jenkins -spec: - master: - notifications: - - level: info - verbose: true - name: nslack - slack: - webHookURLSecretKeySelector: - secret: - name: <secret_name> - key: <key> - - level: info - verbose: true - name: nteams - teams: - webHookURLSecretKeySelector: - secret: - name: <secret_name> - key: <key></code></pre> - - - - - Docs: OpenShift - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.4.x/openshift/ - Wed, 29 Apr 2020 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.4.x/openshift/ - - - - - -<h2 id="securitycontext">SecurityContext</h2> - -<p>OpenShift enforces Security Constraints Context (scc) when deploying an image. -By default, container images run in restricted scc which prevents from setting -a fixed user id to run with. You need to have ensure that you do not provide a -securityContext with a runAsUser and that your image does not use a hardcoded user.</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">securityContext<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>{}</code></pre></div> -<h2 id="openshift-jenkins-image">OpenShift Jenkins image</h2> - -<p>OpenShift provides a pre-configured Jenkins image containing 3 openshift plugins for -jenkins (openshift-login-plugin, openshift-sync-plugin and openshift-client-plugin) -which allows better jenkins integration with kubernetes and OpenShift.</p> - -<p>The OpenShift Jenkins image requires additional configuration to be fully enabled.</p> - -<h3 id="sample-openshift-cr">Sample OpenShift CR</h3> - -<p>The following Custom Resource can be used to create a Jenkins instance using the<br /> -OpenShift Jenkins image and sets values for: -- `image: &lsquo;quay.io/openshift/origin-jenkins:latest&rsquo; : This is the OpenShift Jenkins image.</p> - -<ul> -<li><p>serviceAccount: to allow oauth authentication to work, the service account needs -a specific annotation pointing to the route exposing the jenkins service. Here, -the route is named <code>jenkins-route</code></p></li> - -<li><p><code>OPENSHIFT_ENABLE_OAUTH</code> environment variable for the master container is set to true.</p></li> -</ul> - -<p>Here is a complete Jenkins CR allowing the deployment of the Jenkins OpenShift image.</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>annotations<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.io/openshift-mode<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#39;true&#39;</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<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>serviceAccount<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>annotations<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>serviceaccounts.openshift.io/oauth-redirectreference.jenkins<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#39;{&#34;kind&#34;:&#34;OAuthRedirectReference&#34;,&#34;apiVersion&#34;:&#34;v1&#34;,&#34;reference&#34;:{&#34;kind&#34;:&#34;Route&#34;,&#34;name&#34;:&#34;jenkins-route&#34;}}&#39;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>master<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>containers<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-master<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>image<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#39;quay.io/openshift/origin-jenkins:latest&#39;</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>/usr/bin/go-init<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:#4e9a06">&#39;-main&#39;</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>/usr/libexec/s2i/run<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>env<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>OPENSHIFT_ENABLE_OAUTH<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#39;true&#39;</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>OPENSHIFT_ENABLE_REDIRECT_PROMPT<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#39;true&#39;</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>DISABLE_ADMINISTRATIVE_MONITORS<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#39;false&#39;</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_MASTER<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#39;https://kubernetes.default:443&#39;</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_TRUST_CERTIFICATES<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#39;true&#39;</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_SERVICE_NAME<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-http-jenkins<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>JNLP_SERVICE_NAME<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-slave-jenkins<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_UC_INSECURE<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#39;false&#39;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>JENKINS_HOME<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/var/lib/jenkins<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>JAVA_OPTS<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>&gt;<span style="color:#8f5902;font-style:italic">- -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">-XX:+UnlockExperimentalVMOptions -XX:+UnlockExperimentalVMOptions</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-XX<span style="color:#000;font-weight:bold">:</span>+UseCGroupMemoryLimitForHeap<span style="color:#f8f8f8;text-decoration:underline"> </span>-XX<span style="color:#000;font-weight:bold">:</span>MaxRAMFraction=<span style="color:#0000cf;font-weight:bold">1</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-Djenkins.install.runSetupWizard=<span style="color:#204a87;font-weight:bold">false</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-Djava.awt.headless=<span style="color:#204a87;font-weight:bold">true</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>imagePullPolicy<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Always<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>service<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>port<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">8080</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>type<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>ClusterIP<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>slaveService<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>port<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">50000</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>type<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>ClusterIP</code></pre></div> -<h3 id="openshift-oauth-integration">OpenShift OAuth integration</h3> - -<p>The creation of a Route is required for the integraiton of Jenkins with -OpenShift oauth authentication. By default, the jenkins http service is named -<code>jenkins-operator-http-${jenkins-cr-name}</code></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">oc create route edge jenkins-route --service<span style="color:#ce5c00;font-weight:bold">=</span>jenkins-operator-http-jenkins</code></pre></div> -<p>Note: the route name (jenkins-route) must match the pointed route on the serviceaccount annotation.</p> - -<p>After the creation of the Route. It can be used to navigate to the Jenkins Login Page and login with your Openshift Credentials.</p> - - - - - - Docs: Diagnostics - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.4.x/diagnostics/ - Mon, 13 Apr 2020 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.4.x/diagnostics/ - - - - - -<p>Turn on debug in <strong>Jenkins Operator</strong> deployment:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">sed -i <span style="color:#4e9a06">&#39;s|\(args:\).*|\1\ [&#34;--debug&#34;\]|&#39;</span> deploy/operator.yaml -kubectl apply -f deploy/operator.yaml</code></pre></div> -<p>Watch Kubernetes events:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl get events --sort-by<span style="color:#ce5c00;font-weight:bold">=</span><span style="color:#4e9a06">&#39;{.lastTimestamp}&#39;</span></code></pre></div> -<p>Verify Jenkins master logs:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl logs -f jenkins-&lt;cr_name&gt;</code></pre></div> -<p>Verify 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> - -<p>Delete the Jenkins master pod and wait for the new one to come up:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl delete pod jenkins-&lt;cr_name&gt;</code></pre></div> - - - - - Docs: Schema - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.4.x/schema/ - Mon, 13 Apr 2020 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.4.x/schema/ - - - - - -<div class="pageinfo pageinfo-primary"> -<p>This document contains API scheme for <code>jenkins-operator</code> Custom Resource Definition manifest</p> - -</div> - - -<p>Packages:</p> -<ul> -<li> -<a href="#jenkins.io">jenkins.io</a> -</li> -</ul> -<h2 id="jenkins.io">jenkins.io</h2> -<p> -<p>Package v1alpha2 contains API Schema definitions for the jenkins.io v1alpha2 API group</p> -</p> -Resource Types: -<ul><li> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.Jenkins">Jenkins</a> -</li></ul> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Jenkins">Jenkins -</h3> -<p> -<p>Jenkins is the Schema for the jenkins API</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>apiVersion</code></br> -string</td> -<td> -<code> -jenkins.io/v1alpha2 -</code> -</td> -</tr> -<tr> -<td> -<code>kind</code></br> -string -</td> -<td><code>Jenkins</code></td> -</tr> -<tr> -<td> -<code>metadata</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#objectmeta-v1-meta"> -Kubernetes meta/v1.ObjectMeta -</a> -</em> -</td> -<td> -Refer to the Kubernetes API documentation for the fields of the -<code>metadata</code> field. -</td> -</tr> -<tr> -<td> -<code>spec</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsSpec"> -JenkinsSpec -</a> -</em> -</td> -<td> -<p>Spec defines the desired state of the Jenkins</p> -<br/> -<br/> -<table> -<tr> -<td> -<code>master</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsMaster"> -JenkinsMaster -</a> -</em> -</td> -<td> -<p>Master represents Jenkins master pod properties and Jenkins plugins. -Every single change here requires a pod restart.</p> -</td> -</tr> -<tr> -<td> -<code>seedJobs</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.SeedJob"> -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.SeedJob -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>SeedJobs defines list of Jenkins Seed Job configurations -More info: <a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configuration#configure-seed-jobs-and-pipelines">https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configuration#configure-seed-jobs-and-pipelines</a></p> -</td> -</tr> -<tr> -<td> -<code>notifications</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Notification"> -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Notification -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Notifications defines list of a services which are used to inform about Jenkins status -Can be used to integrate chat services like Slack, Microsoft Teams or Mailgun</p> -</td> -</tr> -<tr> -<td> -<code>service</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Service"> -Service -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Service is Kubernetes service of Jenkins master HTTP pod -Defaults to : -port: 8080 -type: ClusterIP</p> -</td> -</tr> -<tr> -<td> -<code>slaveService</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Service"> -Service -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Service is Kubernetes service of Jenkins slave pods -Defaults to : -port: 50000 -type: ClusterIP</p> -</td> -</tr> -<tr> -<td> -<code>backup</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Backup"> -Backup -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Backup defines configuration of Jenkins backup -More info: <a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configure-backup-and-restore/">https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configure-backup-and-restore/</a></p> -</td> -</tr> -<tr> -<td> -<code>restore</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Restore"> -Restore -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Backup defines configuration of Jenkins backup restore -More info: <a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configure-backup-and-restore/">https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configure-backup-and-restore/</a></p> -</td> -</tr> -<tr> -<td> -<code>groovyScripts</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.GroovyScripts"> -GroovyScripts -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>GroovyScripts defines configuration of Jenkins customization via groovy scripts</p> -</td> -</tr> -<tr> -<td> -<code>configurationAsCode</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.ConfigurationAsCode"> -ConfigurationAsCode -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>ConfigurationAsCode defines configuration of Jenkins customization via Configuration as Code Jenkins plugin</p> -</td> -</tr> -<tr> -<td> -<code>roles</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#roleref-v1-rbac"> -[]Kubernetes rbac/v1.RoleRef -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Roles defines list of extra RBAC roles for the Jenkins Master pod service account</p> -</td> -</tr> -<tr> -<td> -<code>serviceAccount</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.ServiceAccount"> -ServiceAccount -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>ServiceAccount defines Jenkins master service account attributes</p> -</td> -</tr> -<tr> -<td> -<code>jenkinsAPISettings</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsAPISettings"> -JenkinsAPISettings -</a> -</em> -</td> -<td> -<p>JenkinsAPISettings defines configuration used by the operator to gain admin access to the Jenkins API</p> -</td> -</tr> -</table> -</td> -</tr> -<tr> -<td> -<code>status</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsStatus"> -JenkinsStatus -</a> -</em> -</td> -<td> -<p>Status defines the observed state of Jenkins</p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.AppliedGroovyScript">AppliedGroovyScript -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.JenkinsStatus">JenkinsStatus</a>) -</p> -<p> -<p>AppliedGroovyScript is the applied groovy script in Jenkins by the operator.</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>configurationType</code></br> -<em> -string -</em> -</td> -<td> -<p>ConfigurationType is the name of the configuration type(base-groovy, user-groovy, user-casc)</p> -</td> -</tr> -<tr> -<td> -<code>source</code></br> -<em> -string -</em> -</td> -<td> -<p>Source is the name of source where is located groovy script</p> -</td> -</tr> -<tr> -<td> -<code>name</code></br> -<em> -string -</em> -</td> -<td> -<p>Name is the name of the groovy script</p> -</td> -</tr> -<tr> -<td> -<code>hash</code></br> -<em> -string -</em> -</td> -<td> -<p>Hash is the hash of the groovy script and secrets which it uses</p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.AuthorizationStrategy">AuthorizationStrategy -(<code>string</code> alias)</p></h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.JenkinsAPISettings">JenkinsAPISettings</a>) -</p> -<p> -<p>AuthorizationStrategy defines authorization strategy of the operator for the Jenkins API</p> -</p> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Backup">Backup -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.JenkinsSpec">JenkinsSpec</a>) -</p> -<p> -<p>Backup defines configuration of Jenkins backup.</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>containerName</code></br> -<em> -string -</em> -</td> -<td> -<p>ContainerName is the container name responsible for backup operation</p> -</td> -</tr> -<tr> -<td> -<code>action</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Handler"> -Handler -</a> -</em> -</td> -<td> -<p>Action defines action which performs backup in backup container sidecar</p> -</td> -</tr> -<tr> -<td> -<code>interval</code></br> -<em> -uint64 -</em> -</td> -<td> -<p>Interval tells how often make backup in seconds -Defaults to 30.</p> -</td> -</tr> -<tr> -<td> -<code>makeBackupBeforePodDeletion</code></br> -<em> -bool -</em> -</td> -<td> -<p>MakeBackupBeforePodDeletion tells operator to make backup before Jenkins master pod deletion</p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.ConfigMapRef">ConfigMapRef -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.Customization">Customization</a>) -</p> -<p> -<p>ConfigMapRef is reference to Kubernetes ConfigMap.</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>name</code></br> -<em> -string -</em> -</td> -<td> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.ConfigurationAsCode">ConfigurationAsCode -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.JenkinsSpec">JenkinsSpec</a>) -</p> -<p> -<p>ConfigurationAsCode defines configuration of Jenkins customization via Configuration as Code Jenkins plugin.</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>Customization</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Customization"> -Customization -</a> -</em> -</td> -<td> -<p> -(Members of <code>Customization</code> are embedded into this type.) -</p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Container">Container -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.JenkinsMaster">JenkinsMaster</a>) -</p> -<p> -<p>Container defines Kubernetes container attributes.</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>name</code></br> -<em> -string -</em> -</td> -<td> -<p>Name of the container specified as a DNS_LABEL. -Each container in a pod must have a unique name (DNS_LABEL).</p> -</td> -</tr> -<tr> -<td> -<code>image</code></br> -<em> -string -</em> -</td> -<td> -<p>Docker image name. -More info: <a href="https://kubernetes.io/docs/concepts/containers/images">https://kubernetes.io/docs/concepts/containers/images</a></p> -</td> -</tr> -<tr> -<td> -<code>imagePullPolicy</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#pullpolicy-v1-core"> -Kubernetes core/v1.PullPolicy -</a> -</em> -</td> -<td> -<p>Image pull policy. -One of Always, Never, IfNotPresent. -Defaults to Always.</p> -</td> -</tr> -<tr> -<td> -<code>resources</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#resourcerequirements-v1-core"> -Kubernetes core/v1.ResourceRequirements -</a> -</em> -</td> -<td> -<p>Compute Resources required by this container. -More info: <a href="https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/">https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/</a></p> -</td> -</tr> -<tr> -<td> -<code>command</code></br> -<em> -[]string -</em> -</td> -<td> -<em>(Optional)</em> -<p>Entrypoint array. Not executed within a shell. -The docker image&rsquo;s ENTRYPOINT is used if this is not provided. -Variable references $(VAR_NAME) are expanded using the container&rsquo;s environment. If a variable -cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax -can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, -regardless of whether the variable exists or not. -More info: <a href="https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell">https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell</a></p> -</td> -</tr> -<tr> -<td> -<code>args</code></br> -<em> -[]string -</em> -</td> -<td> -<em>(Optional)</em> -<p>Arguments to the entrypoint. -The docker image&rsquo;s CMD is used if this is not provided. -Variable references $(VAR_NAME) are expanded using the container&rsquo;s environment. If a variable -cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax -can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, -regardless of whether the variable exists or not. -More info: <a href="https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell">https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell</a></p> -</td> -</tr> -<tr> -<td> -<code>workingDir</code></br> -<em> -string -</em> -</td> -<td> -<em>(Optional)</em> -<p>Container&rsquo;s working directory. -If not specified, the container runtime&rsquo;s default will be used, which -might be configured in the container image.</p> -</td> -</tr> -<tr> -<td> -<code>ports</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#containerport-v1-core"> -[]Kubernetes core/v1.ContainerPort -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>List of ports to expose from the container. Exposing a port here gives -the system additional information about the network connections a -container uses, but is primarily informational. Not specifying a port here -DOES NOT prevent that port from being exposed. Any port which is -listening on the default &ldquo;0.0.0.0&rdquo; address inside a container will be -accessible from the network.</p> -</td> -</tr> -<tr> -<td> -<code>envFrom</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#envfromsource-v1-core"> -[]Kubernetes core/v1.EnvFromSource -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>List of sources to populate environment variables in the container. -The keys defined within a source must be a C_IDENTIFIER. All invalid keys -will be reported as an event when the container is starting. When a key exists in multiple -sources, the value associated with the last source will take precedence. -Values defined by an Env with a duplicate key will take precedence.</p> -</td> -</tr> -<tr> -<td> -<code>env</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#envvar-v1-core"> -[]Kubernetes core/v1.EnvVar -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>List of environment variables to set in the container.</p> -</td> -</tr> -<tr> -<td> -<code>volumeMounts</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#volumemount-v1-core"> -[]Kubernetes core/v1.VolumeMount -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Pod volumes to mount into the container&rsquo;s filesystem.</p> -</td> -</tr> -<tr> -<td> -<code>livenessProbe</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#probe-v1-core"> -Kubernetes core/v1.Probe -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Periodic probe of container liveness. -Container will be restarted if the probe fails.</p> -</td> -</tr> -<tr> -<td> -<code>readinessProbe</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#probe-v1-core"> -Kubernetes core/v1.Probe -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Periodic probe of container service readiness. -Container will be removed from service endpoints if the probe fails.</p> -</td> -</tr> -<tr> -<td> -<code>lifecycle</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#lifecycle-v1-core"> -Kubernetes core/v1.Lifecycle -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Actions that the management system should take in response to container lifecycle events.</p> -</td> -</tr> -<tr> -<td> -<code>securityContext</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#securitycontext-v1-core"> -Kubernetes core/v1.SecurityContext -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Security options the pod should run with. -More info: <a href="https://kubernetes.io/docs/concepts/policy/security-context/">https://kubernetes.io/docs/concepts/policy/security-context/</a> -More info: <a href="https://kubernetes.io/docs/tasks/configure-pod-container/security-context/">https://kubernetes.io/docs/tasks/configure-pod-container/security-context/</a></p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Customization">Customization -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.ConfigurationAsCode">ConfigurationAsCode</a>, -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.GroovyScripts">GroovyScripts</a>) -</p> -<p> -<p>Customization defines configuration of Jenkins customization.</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>secret</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.SecretRef"> -SecretRef -</a> -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>configurations</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.ConfigMapRef"> -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.ConfigMapRef -</a> -</em> -</td> -<td> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.GroovyScripts">GroovyScripts -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.JenkinsSpec">JenkinsSpec</a>) -</p> -<p> -<p>GroovyScripts defines configuration of Jenkins customization via groovy scripts.</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>Customization</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Customization"> -Customization -</a> -</em> -</td> -<td> -<p> -(Members of <code>Customization</code> are embedded into this type.) -</p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Handler">Handler -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.Backup">Backup</a>, -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.Restore">Restore</a>) -</p> -<p> -<p>Handler defines a specific action that should be taken.</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>exec</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#execaction-v1-core"> -Kubernetes core/v1.ExecAction -</a> -</em> -</td> -<td> -<p>Exec specifies the action to take.</p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Image">Image -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.JenkinsImageSpec">JenkinsImageSpec</a>) -</p> -<p> -<p>Defines Jenkins Plugin structure</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>name</code></br> -<em> -string -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>version</code></br> -<em> -string -</em> -</td> -<td> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsAPISettings">JenkinsAPISettings -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.JenkinsSpec">JenkinsSpec</a>) -</p> -<p> -<p>JenkinsAPISettings defines configuration used by the operator to gain admin access to the Jenkins API</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>authorizationStrategy</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.AuthorizationStrategy"> -AuthorizationStrategy -</a> -</em> -</td> -<td> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsCredentialType">JenkinsCredentialType -(<code>string</code> alias)</p></h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.SeedJob">SeedJob</a>) -</p> -<p> -<p>JenkinsCredentialType defines type of Jenkins credential used to seed job mechanism.</p> -</p> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsImage">JenkinsImage -</h3> -<p> -<p>JenkinsImage is the Schema for the jenkinsimages API</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>metadata</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#objectmeta-v1-meta"> -Kubernetes meta/v1.ObjectMeta -</a> -</em> -</td> -<td> -Refer to the Kubernetes API documentation for the fields of the -<code>metadata</code> field. -</td> -</tr> -<tr> -<td> -<code>spec</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsImageSpec"> -JenkinsImageSpec -</a> -</em> -</td> -<td> -<br/> -<br/> -<table> -<tr> -<td> -<code>image</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Image"> -Image -</a> -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>plugins</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsPlugin"> -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsPlugin -</a> -</em> -</td> -<td> -</td> -</tr> -</table> -</td> -</tr> -<tr> -<td> -<code>status</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsImageStatus"> -JenkinsImageStatus -</a> -</em> -</td> -<td> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsImageSpec">JenkinsImageSpec -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.JenkinsImage">JenkinsImage</a>) -</p> -<p> -<p>JenkinsImageSpec defines the desired state of JenkinsImage</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>image</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Image"> -Image -</a> -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>plugins</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsPlugin"> -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsPlugin -</a> -</em> -</td> -<td> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsImageStatus">JenkinsImageStatus -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.JenkinsImage">JenkinsImage</a>) -</p> -<p> -<p>JenkinsImageStatus defines the observed state of JenkinsImage</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>image</code></br> -<em> -string -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>md5sum</code></br> -<em> -string -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>installedPlugins</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsPlugin"> -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsPlugin -</a> -</em> -</td> -<td> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsMaster">JenkinsMaster -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.JenkinsSpec">JenkinsSpec</a>) -</p> -<p> -<p>JenkinsMaster defines the Jenkins master pod attributes and plugins, -every single change requires a Jenkins master pod restart.</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>annotations</code></br> -<em> -map[string]string -</em> -</td> -<td> -<em>(Optional)</em> -<p>Annotations is an unstructured key value map stored with a resource that may be -set by external tools to store and retrieve arbitrary metadata. They are not -queryable and should be preserved when modifying objects. -More info: <a href="http://kubernetes.io/docs/user-guide/annotations">http://kubernetes.io/docs/user-guide/annotations</a></p> -</td> -</tr> -<tr> -<td> -<code>masterAnnotations</code></br> -<em> -map[string]string -</em> -</td> -<td> -<em>(Optional)</em> -<p>Annotations is an unstructured key value map stored with a resource that may be -set by external tools to store and retrieve arbitrary metadata. They are not -queryable and should be preserved when modifying objects. -More info: <a href="http://kubernetes.io/docs/user-guide/annotations">http://kubernetes.io/docs/user-guide/annotations</a> -Deprecated: will be removed in the future, please use Annotations(annotations)</p> -</td> -</tr> -<tr> -<td> -<code>labels</code></br> -<em> -map[string]string -</em> -</td> -<td> -<em>(Optional)</em> -<p>Map of string keys and values that can be used to organize and categorize -(scope and select) objects. May match selectors of replication controllers -and services. -More info: <a href="http://kubernetes.io/docs/user-guide/labels">http://kubernetes.io/docs/user-guide/labels</a></p> -</td> -</tr> -<tr> -<td> -<code>nodeSelector</code></br> -<em> -map[string]string -</em> -</td> -<td> -<em>(Optional)</em> -<p>NodeSelector is a selector which must be true for the pod to fit on a node. -Selector which must match a node&rsquo;s labels for the pod to be scheduled on that node. -More info: <a href="https://kubernetes.io/docs/concepts/configuration/assign-pod-node/">https://kubernetes.io/docs/concepts/configuration/assign-pod-node/</a></p> -</td> -</tr> -<tr> -<td> -<code>securityContext</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#podsecuritycontext-v1-core"> -Kubernetes core/v1.PodSecurityContext -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>SecurityContext that applies to all the containers of the Jenkins -Master. As per kubernetes specification, it can be overridden -for each container individually. -Defaults to: -runAsUser: 1000 -fsGroup: 1000</p> -</td> -</tr> -<tr> -<td> -<code>containers</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Container"> -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Container -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>List of containers belonging to the pod. -Containers cannot currently be added or removed. -There must be at least one container in a Pod. -Defaults to: -- image: jenkins/jenkins:lts -imagePullPolicy: Always -livenessProbe: -failureThreshold: 12 -httpGet: -path: /login -port: http -scheme: HTTP -initialDelaySeconds: 80 -periodSeconds: 10 -successThreshold: 1 -timeoutSeconds: 5 -name: jenkins-master -readinessProbe: -failureThreshold: 3 -httpGet: -path: /login -port: http -scheme: HTTP -initialDelaySeconds: 30 -periodSeconds: 10 -successThreshold: 1 -timeoutSeconds: 1 -resources: -limits: -cpu: 1500m -memory: 3Gi -requests: -cpu: &ldquo;1&rdquo; -memory: 600Mi</p> -</td> -</tr> -<tr> -<td> -<code>imagePullSecrets</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#localobjectreference-v1-core"> -[]Kubernetes core/v1.LocalObjectReference -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. -If specified, these secrets will be passed to individual puller implementations for them to use. For example, -in the case of docker, only DockerConfig type secrets are honored. -More info: <a href="https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod">https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod</a></p> -</td> -</tr> -<tr> -<td> -<code>volumes</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#volume-v1-core"> -[]Kubernetes core/v1.Volume -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>List of volumes that can be mounted by containers belonging to the pod. -More info: <a href="https://kubernetes.io/docs/concepts/storage/volumes">https://kubernetes.io/docs/concepts/storage/volumes</a></p> -</td> -</tr> -<tr> -<td> -<code>tolerations</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#toleration-v1-core"> -[]Kubernetes core/v1.Toleration -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>If specified, the pod&rsquo;s tolerations.</p> -</td> -</tr> -<tr> -<td> -<code>basePlugins</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Plugin"> -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Plugin -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>BasePlugins contains plugins required by operator -Defaults to : -- name: kubernetes -version: 1.25.2 -- name: workflow-job -version: &ldquo;2.39&rdquo; -- name: workflow-aggregator -version: &ldquo;2.6&rdquo; -- name: git -version: 4.2.2 -- name: job-dsl -version: &ldquo;1.77&rdquo; -- name: configuration-as-code -version: &ldquo;1.38&rdquo; -- name: kubernetes-credentials-provider -version: 0.13</p> -</td> -</tr> -<tr> -<td> -<code>plugins</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Plugin"> -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Plugin -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Plugins contains plugins required by user</p> -</td> -</tr> -<tr> -<td> -<code>disableCSRFProtection</code></br> -<em> -bool -</em> -</td> -<td> -<p>DisableCSRFProtection allows you to toggle CSRF Protection on Jenkins</p> -</td> -</tr> -<tr> -<td> -<code>priorityClassName</code></br> -<em> -string -</em> -</td> -<td> -<em>(Optional)</em> -<p>PriorityClassName for Jenkins master pod</p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsPlugin">JenkinsPlugin -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.JenkinsImageSpec">JenkinsImageSpec</a>, -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.JenkinsImageStatus">JenkinsImageStatus</a>) -</p> -<p> -<p>Defines Jenkins Plugin structure</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>name</code></br> -<em> -string -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>version</code></br> -<em> -string -</em> -</td> -<td> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsSpec">JenkinsSpec -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.Jenkins">Jenkins</a>) -</p> -<p> -<p>JenkinsSpec defines the desired state of the Jenkins.</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>master</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsMaster"> -JenkinsMaster -</a> -</em> -</td> -<td> -<p>Master represents Jenkins master pod properties and Jenkins plugins. -Every single change here requires a pod restart.</p> -</td> -</tr> -<tr> -<td> -<code>seedJobs</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.SeedJob"> -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.SeedJob -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>SeedJobs defines list of Jenkins Seed Job configurations -More info: <a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configuration#configure-seed-jobs-and-pipelines">https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configuration#configure-seed-jobs-and-pipelines</a></p> -</td> -</tr> -<tr> -<td> -<code>notifications</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Notification"> -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Notification -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Notifications defines list of a services which are used to inform about Jenkins status -Can be used to integrate chat services like Slack, Microsoft Teams or Mailgun</p> -</td> -</tr> -<tr> -<td> -<code>service</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Service"> -Service -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Service is Kubernetes service of Jenkins master HTTP pod -Defaults to : -port: 8080 -type: ClusterIP</p> -</td> -</tr> -<tr> -<td> -<code>slaveService</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Service"> -Service -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Service is Kubernetes service of Jenkins slave pods -Defaults to : -port: 50000 -type: ClusterIP</p> -</td> -</tr> -<tr> -<td> -<code>backup</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Backup"> -Backup -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Backup defines configuration of Jenkins backup -More info: <a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configure-backup-and-restore/">https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configure-backup-and-restore/</a></p> -</td> -</tr> -<tr> -<td> -<code>restore</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Restore"> -Restore -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Backup defines configuration of Jenkins backup restore -More info: <a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configure-backup-and-restore/">https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configure-backup-and-restore/</a></p> -</td> -</tr> -<tr> -<td> -<code>groovyScripts</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.GroovyScripts"> -GroovyScripts -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>GroovyScripts defines configuration of Jenkins customization via groovy scripts</p> -</td> -</tr> -<tr> -<td> -<code>configurationAsCode</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.ConfigurationAsCode"> -ConfigurationAsCode -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>ConfigurationAsCode defines configuration of Jenkins customization via Configuration as Code Jenkins plugin</p> -</td> -</tr> -<tr> -<td> -<code>roles</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#roleref-v1-rbac"> -[]Kubernetes rbac/v1.RoleRef -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Roles defines list of extra RBAC roles for the Jenkins Master pod service account</p> -</td> -</tr> -<tr> -<td> -<code>serviceAccount</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.ServiceAccount"> -ServiceAccount -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>ServiceAccount defines Jenkins master service account attributes</p> -</td> -</tr> -<tr> -<td> -<code>jenkinsAPISettings</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsAPISettings"> -JenkinsAPISettings -</a> -</em> -</td> -<td> -<p>JenkinsAPISettings defines configuration used by the operator to gain admin access to the Jenkins API</p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsStatus">JenkinsStatus -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.Jenkins">Jenkins</a>) -</p> -<p> -<p>JenkinsStatus defines the observed state of Jenkins</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>operatorVersion</code></br> -<em> -string -</em> -</td> -<td> -<em>(Optional)</em> -<p>OperatorVersion is the operator version which manages this CR</p> -</td> -</tr> -<tr> -<td> -<code>provisionStartTime</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#time-v1-meta"> -Kubernetes meta/v1.Time -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>ProvisionStartTime is a time when Jenkins master pod has been created</p> -</td> -</tr> -<tr> -<td> -<code>baseConfigurationCompletedTime</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#time-v1-meta"> -Kubernetes meta/v1.Time -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>BaseConfigurationCompletedTime is a time when Jenkins base configuration phase has been completed</p> -</td> -</tr> -<tr> -<td> -<code>userConfigurationCompletedTime</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#time-v1-meta"> -Kubernetes meta/v1.Time -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>UserConfigurationCompletedTime is a time when Jenkins user configuration phase has been completed</p> -</td> -</tr> -<tr> -<td> -<code>restoredBackup</code></br> -<em> -uint64 -</em> -</td> -<td> -<em>(Optional)</em> -<p>RestoredBackup is the restored backup number after Jenkins master pod restart</p> -</td> -</tr> -<tr> -<td> -<code>lastBackup</code></br> -<em> -uint64 -</em> -</td> -<td> -<em>(Optional)</em> -<p>LastBackup is the latest backup number</p> -</td> -</tr> -<tr> -<td> -<code>pendingBackup</code></br> -<em> -uint64 -</em> -</td> -<td> -<em>(Optional)</em> -<p>PendingBackup is the pending backup number</p> -</td> -</tr> -<tr> -<td> -<code>backupDoneBeforePodDeletion</code></br> -<em> -bool -</em> -</td> -<td> -<em>(Optional)</em> -<p>BackupDoneBeforePodDeletion tells if backup before pod deletion has been made</p> -</td> -</tr> -<tr> -<td> -<code>userAndPasswordHash</code></br> -<em> -string -</em> -</td> -<td> -<em>(Optional)</em> -<p>UserAndPasswordHash is a SHA256 hash made from user and password</p> -</td> -</tr> -<tr> -<td> -<code>createdSeedJobs</code></br> -<em> -[]string -</em> -</td> -<td> -<em>(Optional)</em> -<p>CreatedSeedJobs contains list of seed job id already created in Jenkins</p> -</td> -</tr> -<tr> -<td> -<code>appliedGroovyScripts</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.AppliedGroovyScript"> -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.AppliedGroovyScript -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>AppliedGroovyScripts is a list with all applied groovy scripts in Jenkins by the operator</p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Mailgun">Mailgun -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.Notification">Notification</a>) -</p> -<p> -<p>Mailgun is handler for Mailgun email service notification channel.</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>domain</code></br> -<em> -string -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>apiKeySecretKeySelector</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.SecretKeySelector"> -SecretKeySelector -</a> -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>recipient</code></br> -<em> -string -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>from</code></br> -<em> -string -</em> -</td> -<td> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.MicrosoftTeams">MicrosoftTeams -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.Notification">Notification</a>) -</p> -<p> -<p>MicrosoftTeams is handler for Microsoft MicrosoftTeams notification channel.</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>webHookURLSecretKeySelector</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.SecretKeySelector"> -SecretKeySelector -</a> -</em> -</td> -<td> -<p>The web hook URL to MicrosoftTeams App</p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Notification">Notification -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.JenkinsSpec">JenkinsSpec</a>) -</p> -<p> -<p>Notification is a service configuration used to send notifications about Jenkins status.</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>level</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.NotificationLevel"> -NotificationLevel -</a> -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>verbose</code></br> -<em> -bool -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>name</code></br> -<em> -string -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>slack</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Slack"> -github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Slack -</a> -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>teams</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.MicrosoftTeams"> -github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.MicrosoftTeams -</a> -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>mailgun</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Mailgun"> -github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Mailgun -</a> -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>smtp</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.SMTP"> -github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.SMTP -</a> -</em> -</td> -<td> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.NotificationLevel">NotificationLevel -(<code>string</code> alias)</p></h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.Notification">Notification</a>) -</p> -<p> -<p>NotificationLevel defines the level of a Notification.</p> -</p> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Plugin">Plugin -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.JenkinsMaster">JenkinsMaster</a>) -</p> -<p> -<p>Plugin defines Jenkins plugin.</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>name</code></br> -<em> -string -</em> -</td> -<td> -<p>Name is the name of Jenkins plugin</p> -</td> -</tr> -<tr> -<td> -<code>version</code></br> -<em> -string -</em> -</td> -<td> -<p>Version is the version of Jenkins plugin</p> -</td> -</tr> -<tr> -<td> -<code>downloadURL</code></br> -<em> -string -</em> -</td> -<td> -<p>DownloadURL is the custom url from where plugin has to be downloaded.</p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Restore">Restore -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.JenkinsSpec">JenkinsSpec</a>) -</p> -<p> -<p>Restore defines configuration of Jenkins backup restore operation.</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>containerName</code></br> -<em> -string -</em> -</td> -<td> -<p>ContainerName is the container name responsible for restore backup operation</p> -</td> -</tr> -<tr> -<td> -<code>action</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Handler"> -Handler -</a> -</em> -</td> -<td> -<p>Action defines action which performs restore backup in restore container sidecar</p> -</td> -</tr> -<tr> -<td> -<code>recoveryOnce</code></br> -<em> -uint64 -</em> -</td> -<td> -<em>(Optional)</em> -<p>RecoveryOnce if want to restore specific backup set this field and then Jenkins will be restarted and desired backup will be restored</p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.SMTP">SMTP -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.Notification">Notification</a>) -</p> -<p> -<p>SMTP is handler for sending emails via this protocol.</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>usernameSecretKeySelector</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.SecretKeySelector"> -SecretKeySelector -</a> -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>passwordSecretKeySelector</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.SecretKeySelector"> -SecretKeySelector -</a> -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>port</code></br> -<em> -int -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>server</code></br> -<em> -string -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>tlsInsecureSkipVerify</code></br> -<em> -bool -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>from</code></br> -<em> -string -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>to</code></br> -<em> -string -</em> -</td> -<td> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.SecretKeySelector">SecretKeySelector -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.Mailgun">Mailgun</a>, -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.MicrosoftTeams">MicrosoftTeams</a>, -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.SMTP">SMTP</a>, -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.Slack">Slack</a>) -</p> -<p> -<p>SecretKeySelector selects a key of a Secret.</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>secret</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#localobjectreference-v1-core"> -Kubernetes core/v1.LocalObjectReference -</a> -</em> -</td> -<td> -<p>The name of the secret in the pod&rsquo;s namespace to select from.</p> -</td> -</tr> -<tr> -<td> -<code>key</code></br> -<em> -string -</em> -</td> -<td> -<p>The key of the secret to select from. Must be a valid secret key.</p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.SecretRef">SecretRef -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.Customization">Customization</a>) -</p> -<p> -<p>SecretRef is reference to Kubernetes secret.</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>name</code></br> -<em> -string -</em> -</td> -<td> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.SeedJob">SeedJob -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.JenkinsSpec">JenkinsSpec</a>) -</p> -<p> -<p>SeedJob defines configuration for seed job -More info: <a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configuration/#configure-seed-jobs-and-pipelines">https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configuration/#configure-seed-jobs-and-pipelines</a>.</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>id</code></br> -<em> -string -</em> -</td> -<td> -<p>ID is the unique seed job name</p> -</td> -</tr> -<tr> -<td> -<code>credentialID</code></br> -<em> -string -</em> -</td> -<td> -<p>CredentialID is the Kubernetes secret name which stores repository access credentials</p> -</td> -</tr> -<tr> -<td> -<code>description</code></br> -<em> -string -</em> -</td> -<td> -<em>(Optional)</em> -<p>Description is the description of the seed job</p> -</td> -</tr> -<tr> -<td> -<code>targets</code></br> -<em> -string -</em> -</td> -<td> -<p>Targets is the repository path where are seed job definitions</p> -</td> -</tr> -<tr> -<td> -<code>repositoryBranch</code></br> -<em> -string -</em> -</td> -<td> -<p>RepositoryBranch is the repository branch where are seed job definitions</p> -</td> -</tr> -<tr> -<td> -<code>repositoryUrl</code></br> -<em> -string -</em> -</td> -<td> -<p>RepositoryURL is the repository access URL. Can be SSH or HTTPS.</p> -</td> -</tr> -<tr> -<td> -<code>credentialType</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsCredentialType"> -JenkinsCredentialType -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>JenkinsCredentialType is the <a href="https://jenkinsci.github.io/kubernetes-credentials-provider-plugin/">https://jenkinsci.github.io/kubernetes-credentials-provider-plugin/</a> credential type</p> -</td> -</tr> -<tr> -<td> -<code>bitbucketPushTrigger</code></br> -<em> -bool -</em> -</td> -<td> -<em>(Optional)</em> -<p>BitbucketPushTrigger is used for Bitbucket web hooks</p> -</td> -</tr> -<tr> -<td> -<code>githubPushTrigger</code></br> -<em> -bool -</em> -</td> -<td> -<em>(Optional)</em> -<p>GitHubPushTrigger is used for GitHub web hooks</p> -</td> -</tr> -<tr> -<td> -<code>buildPeriodically</code></br> -<em> -string -</em> -</td> -<td> -<em>(Optional)</em> -<p>BuildPeriodically is setting for scheduled trigger</p> -</td> -</tr> -<tr> -<td> -<code>pollSCM</code></br> -<em> -string -</em> -</td> -<td> -<em>(Optional)</em> -<p>PollSCM is setting for polling changes in SCM</p> -</td> -</tr> -<tr> -<td> -<code>ignoreMissingFiles</code></br> -<em> -bool -</em> -</td> -<td> -<em>(Optional)</em> -<p>IgnoreMissingFiles is setting for Job DSL API plugin to ignore files that miss</p> -</td> -</tr> -<tr> -<td> -<code>additionalClasspath</code></br> -<em> -string -</em> -</td> -<td> -<em>(Optional)</em> -<p>AdditionalClasspath is setting for Job DSL API plugin to set Additional Classpath</p> -</td> -</tr> -<tr> -<td> -<code>failOnMissingPlugin</code></br> -<em> -bool -</em> -</td> -<td> -<em>(Optional)</em> -<p>FailOnMissingPlugin is setting for Job DSL API plugin that fails job if required plugin is missing</p> -</td> -</tr> -<tr> -<td> -<code>unstableOnDeprecation</code></br> -<em> -bool -</em> -</td> -<td> -<em>(Optional)</em> -<p>UnstableOnDeprecation is setting for Job DSL API plugin that sets build status as unstable if build using deprecated features</p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Service">Service -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.JenkinsSpec">JenkinsSpec</a>) -</p> -<p> -<p>Service defines Kubernetes service attributes</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>annotations</code></br> -<em> -map[string]string -</em> -</td> -<td> -<em>(Optional)</em> -<p>Annotations is an unstructured key value map stored with a resource that may be -set by external tools to store and retrieve arbitrary metadata. They are not -queryable and should be preserved when modifying objects. -More info: <a href="http://kubernetes.io/docs/user-guide/annotations">http://kubernetes.io/docs/user-guide/annotations</a></p> -</td> -</tr> -<tr> -<td> -<code>labels</code></br> -<em> -map[string]string -</em> -</td> -<td> -<em>(Optional)</em> -<p>Route service traffic to pods with label keys and values matching this -selector. If empty or not present, the service is assumed to have an -external process managing its endpoints, which Kubernetes will not -modify. Only applies to types ClusterIP, NodePort, and LoadBalancer. -Ignored if type is ExternalName. -More info: <a href="https://kubernetes.io/docs/concepts/services-networking/service/">https://kubernetes.io/docs/concepts/services-networking/service/</a></p> -</td> -</tr> -<tr> -<td> -<code>type</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#servicetype-v1-core"> -Kubernetes core/v1.ServiceType -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Type determines how the Service is exposed. Defaults to ClusterIP. Valid -options are ExternalName, ClusterIP, NodePort, and LoadBalancer. -&ldquo;ExternalName&rdquo; maps to the specified externalName. -&ldquo;ClusterIP&rdquo; allocates a cluster-internal IP address for load-balancing to -endpoints. Endpoints are determined by the selector or if that is not -specified, by manual construction of an Endpoints object. If clusterIP is -&ldquo;None&rdquo;, no virtual IP is allocated and the endpoints are published as a -set of endpoints rather than a stable IP. -&ldquo;NodePort&rdquo; builds on ClusterIP and allocates a port on every node which -routes to the clusterIP. -&ldquo;LoadBalancer&rdquo; builds on NodePort and creates an -external load-balancer (if supported in the current cloud) which routes -to the clusterIP. -More info: <a href="https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services---service-types">https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services&mdash;service-types</a></p> -</td> -</tr> -<tr> -<td> -<code>port</code></br> -<em> -int32 -</em> -</td> -<td> -<p>The port that are exposed by this service. -More info: <a href="https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies">https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies</a></p> -</td> -</tr> -<tr> -<td> -<code>nodePort</code></br> -<em> -int32 -</em> -</td> -<td> -<em>(Optional)</em> -<p>The port on each node on which this service is exposed when type=NodePort or LoadBalancer. -Usually assigned by the system. If specified, it will be allocated to the service -if unused or else creation of the service will fail. -Default is to auto-allocate a port if the ServiceType of this Service requires one. -More info: <a href="https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport">https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport</a></p> -</td> -</tr> -<tr> -<td> -<code>loadBalancerSourceRanges</code></br> -<em> -[]string -</em> -</td> -<td> -<em>(Optional)</em> -<p>If specified and supported by the platform, this will restrict traffic through the cloud-provider -load-balancer will be restricted to the specified client IPs. This field will be ignored if the -cloud-provider does not support the feature.&rdquo; -More info: <a href="https://kubernetes.io/docs/tasks/administer-cluster/securing-a-cluster/#restricting-cloud-metadata-api-access">https://kubernetes.io/docs/tasks/administer-cluster/securing-a-cluster/#restricting-cloud-metadata-api-access</a></p> -</td> -</tr> -<tr> -<td> -<code>loadBalancerIP</code></br> -<em> -string -</em> -</td> -<td> -<em>(Optional)</em> -<p>Only applies to Service Type: LoadBalancer -LoadBalancer will get created with the IP specified in this field. -This feature depends on whether the underlying cloud-provider supports specifying -the loadBalancerIP when a load balancer is created. -This field will be ignored if the cloud-provider does not support the feature.</p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.ServiceAccount">ServiceAccount -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.JenkinsSpec">JenkinsSpec</a>) -</p> -<p> -<p>ServiceAccount defines Kubernetes service account attributes</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>annotations</code></br> -<em> -map[string]string -</em> -</td> -<td> -<em>(Optional)</em> -<p>Annotations is an unstructured key value map stored with a resource that may be -set by external tools to store and retrieve arbitrary metadata. They are not -queryable and should be preserved when modifying objects. -More info: <a href="http://kubernetes.io/docs/user-guide/annotations">http://kubernetes.io/docs/user-guide/annotations</a></p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Slack">Slack -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.Notification">Notification</a>) -</p> -<p> -<p>Slack is handler for Slack notification channel.</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>webHookURLSecretKeySelector</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.SecretKeySelector"> -SecretKeySelector -</a> -</em> -</td> -<td> -<p>The web hook URL to Slack App</p> -</td> -</tr> -</tbody> -</table> -<hr/> -<p><em> -Generated with <code>gen-crd-api-reference-docs</code> -on git commit <code>1c853e69</code>. -</em></p> - - - - - - \ No newline at end of file diff --git a/docs/docs/getting-started/v0.4.x/notifications/index.html b/docs/docs/getting-started/v0.4.x/notifications/index.html deleted file mode 100644 index f554f05fc..000000000 --- a/docs/docs/getting-started/v0.4.x/notifications/index.html +++ /dev/null @@ -1,1079 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Notifications | Jenkins Operator - - - - - - - - - - - - - - - - - - - - - - - - - - - - Notifications | Jenkins Operator - - -
- - - -
-
-
-
-
- - - - - -
- - - - -
- - - - -
- -
- - - -
-

Notifications

-
How to setup operator notifications.
- - -

Slack

- -

Please follow this instructions to get web hook URL.

- -

Create web hook secret with name jenkins-operator-notification-data. Contains key url with provided web hook URL.

-
$ kubectl create secret generic jenkins-operator-notification-data --from-literal=url=<webhook_url>
-

Example configuration for Slack:

-
kind: Jenkins
-spec:
-  master:
-    notifications:
-    - level: info
-      verbose: true
-      name: 
-      slack:
-        webHookURLSecretKeySelector:
-          secret:
-            name: 
-          key: 
-

Microsoft Teams

- -

Please follow this instructions to get web hook URL.

- -

Example configuration for Microsoft Teams:

-
kind: Jenkins
-spec:
-  master:
-    notifications:
-    - level: info
-      verbose: true
-      name: 
-      teams:
-        webHookURLSecretKeySelector:
-          secret:
-            name: 
-          key: 
-

Mailgun

- -

Example configuration for Mailgun:

-
kind: Jenkins
-spec:
-  master:
-    notifications:
-    - level: info
-      verbose: true
-      name: 
-      mailgun:
-        domain: 
-        apiKeySecretKeySelector:
-          secret:
-            name: 
-          key: 
-        recipient: 
-        from: 
-

Debug options

- -

As you see there is two debugging options:

- -
    -
  • level (warning/info) - Set level of messages to send.

  • - -
  • verbose - Print stacktrace and additional error messages

  • -
- -

Multiple providers

- -

You can use multiple providers to send notification to another communication channels at the same time. -For example you will send notifications to Slack and Teams.

-
kind: Jenkins
-spec:
-  master:
-    notifications:
-    - level: info
-      verbose: true
-      name: nslack
-      slack:
-        webHookURLSecretKeySelector:
-          secret:
-            name: 
-          key: 
-    - level: info
-      verbose: true
-      name: nteams
-      teams:
-        webHookURLSecretKeySelector:
-          secret:
-            name: 
-          key: 
- - -
Last modified April 13, 2020 -
-
- - -
-
-
- - - - -
- - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/docs/getting-started/v0.4.x/openshift/index.html b/docs/docs/getting-started/v0.4.x/openshift/index.html deleted file mode 100644 index 5a2a3ee35..000000000 --- a/docs/docs/getting-started/v0.4.x/openshift/index.html +++ /dev/null @@ -1,1081 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -OpenShift | Jenkins Operator - - - - - - - - - - - - - - - - - - - - - - - - - - - - OpenShift | Jenkins Operator - - -
- - - -
-
-
-
-
- - - - - -
- - - - -
- - - - -
- -
- - - -
-

OpenShift

-
Additional configuration for OpenShift
- - -

SecurityContext

- -

OpenShift enforces Security Constraints Context (scc) when deploying an image. -By default, container images run in restricted scc which prevents from setting -a fixed user id to run with. You need to have ensure that you do not provide a -securityContext with a runAsUser and that your image does not use a hardcoded user.

-
securityContext: {}
-

OpenShift Jenkins image

- -

OpenShift provides a pre-configured Jenkins image containing 3 openshift plugins for -jenkins (openshift-login-plugin, openshift-sync-plugin and openshift-client-plugin) -which allows better jenkins integration with kubernetes and OpenShift.

- -

The OpenShift Jenkins image requires additional configuration to be fully enabled.

- -

Sample OpenShift CR

- -

The following Custom Resource can be used to create a Jenkins instance using the
-OpenShift Jenkins image and sets values for: -- `image: ‘quay.io/openshift/origin-jenkins:latest’ : This is the OpenShift Jenkins image.

- -
    -
  • serviceAccount: to allow oauth authentication to work, the service account needs -a specific annotation pointing to the route exposing the jenkins service. Here, -the route is named jenkins-route

  • - -
  • OPENSHIFT_ENABLE_OAUTH environment variable for the master container is set to true.

  • -
- -

Here is a complete Jenkins CR allowing the deployment of the Jenkins OpenShift image.

-
apiVersion: jenkins.io/v1alpha2
-kind: Jenkins
-metadata:
-  annotations:
-    jenkins.io/openshift-mode: 'true'
-  name: jenkins
-spec:
-  serviceAccount:
-    annotations:
-      serviceaccounts.openshift.io/oauth-redirectreference.jenkins: '{"kind":"OAuthRedirectReference","apiVersion":"v1","reference":{"kind":"Route","name":"jenkins-route"}}'
-  master:
-    containers:
-    - name: jenkins-master
-      image: 'quay.io/openshift/origin-jenkins:latest'
-      command:
-      - /usr/bin/go-init
-      - '-main'
-      - /usr/libexec/s2i/run
-      env:
-      - name: OPENSHIFT_ENABLE_OAUTH
-        value: 'true'
-      - name: OPENSHIFT_ENABLE_REDIRECT_PROMPT
-        value: 'true'
-      - name: DISABLE_ADMINISTRATIVE_MONITORS
-        value: 'false'
-      - name: KUBERNETES_MASTER
-        value: 'https://kubernetes.default:443'
-      - name: KUBERNETES_TRUST_CERTIFICATES
-        value: 'true'
-      - name: JENKINS_SERVICE_NAME
-        value: jenkins-operator-http-jenkins
-      - name: JNLP_SERVICE_NAME
-        value: jenkins-operator-slave-jenkins
-      - name: JENKINS_UC_INSECURE
-        value: 'false'
-      - name: JENKINS_HOME
-        value: /var/lib/jenkins
-      - name: JAVA_OPTS
-        value: >-
-          -XX:+UnlockExperimentalVMOptions -XX:+UnlockExperimentalVMOptions
-          -XX:+UseCGroupMemoryLimitForHeap -XX:MaxRAMFraction=1
-          -Djenkins.install.runSetupWizard=false -Djava.awt.headless=true
-      imagePullPolicy: Always
-  service:
-    port: 8080
-    type: ClusterIP
-  slaveService:
-    port: 50000
-    type: ClusterIP
-

OpenShift OAuth integration

- -

The creation of a Route is required for the integraiton of Jenkins with -OpenShift oauth authentication. By default, the jenkins http service is named -jenkins-operator-http-${jenkins-cr-name}

-
oc create route edge jenkins-route --service=jenkins-operator-http-jenkins
-

Note: the route name (jenkins-route) must match the pointed route on the serviceaccount annotation.

- -

After the creation of the Route. It can be used to navigate to the Jenkins Login Page and login with your Openshift Credentials.

- - - -
Last modified April 29, 2020 -
-
- - -
-
-
- - - - -
- - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/docs/getting-started/v0.4.x/schema/index.html b/docs/docs/getting-started/v0.4.x/schema/index.html deleted file mode 100644 index 7e35a72df..000000000 --- a/docs/docs/getting-started/v0.4.x/schema/index.html +++ /dev/null @@ -1,3597 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Schema | Jenkins Operator - - - - - - - - - - - - - - - - - - - - - - - - - - - - Schema | Jenkins Operator - - -
- - - -
-
-
-
-
- - - - - -
- - - - -
- - - - -
-
- - - - - - - - - - - -
-
- - - -
-

Schema

-
API Schema definitions for Jenkins CRD
- - -
-

This document contains API scheme for jenkins-operator Custom Resource Definition manifest

- -
- - -

Packages:

- -

jenkins.io

-

-

Package v1alpha2 contains API Schema definitions for the jenkins.io v1alpha2 API group

-

-Resource Types: - -

Jenkins -

-

-

Jenkins is the Schema for the jenkins API

-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldDescription
-apiVersion
-string
- -jenkins.io/v1alpha2 - -
-kind
-string -
Jenkins
-metadata
- - -Kubernetes meta/v1.ObjectMeta - - -
-Refer to the Kubernetes API documentation for the fields of the -metadata field. -
-spec
- - -JenkinsSpec - - -
-

Spec defines the desired state of the Jenkins

-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-master
- - -JenkinsMaster - - -
-

Master represents Jenkins master pod properties and Jenkins plugins. -Every single change here requires a pod restart.

-
-seedJobs
- - -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.SeedJob - - -
-(Optional) -

SeedJobs defines list of Jenkins Seed Job configurations -More info: https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configuration#configure-seed-jobs-and-pipelines

-
-notifications
- - -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Notification - - -
-(Optional) -

Notifications defines list of a services which are used to inform about Jenkins status -Can be used to integrate chat services like Slack, Microsoft Teams or Mailgun

-
-service
- - -Service - - -
-(Optional) -

Service is Kubernetes service of Jenkins master HTTP pod -Defaults to : -port: 8080 -type: ClusterIP

-
-slaveService
- - -Service - - -
-(Optional) -

Service is Kubernetes service of Jenkins slave pods -Defaults to : -port: 50000 -type: ClusterIP

-
-backup
- - -Backup - - -
-(Optional) -

Backup defines configuration of Jenkins backup -More info: https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configure-backup-and-restore/

-
-restore
- - -Restore - - -
-(Optional) -

Backup defines configuration of Jenkins backup restore -More info: https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configure-backup-and-restore/

-
-groovyScripts
- - -GroovyScripts - - -
-(Optional) -

GroovyScripts defines configuration of Jenkins customization via groovy scripts

-
-configurationAsCode
- - -ConfigurationAsCode - - -
-(Optional) -

ConfigurationAsCode defines configuration of Jenkins customization via Configuration as Code Jenkins plugin

-
-roles
- - -[]Kubernetes rbac/v1.RoleRef - - -
-(Optional) -

Roles defines list of extra RBAC roles for the Jenkins Master pod service account

-
-serviceAccount
- - -ServiceAccount - - -
-(Optional) -

ServiceAccount defines Jenkins master service account attributes

-
-jenkinsAPISettings
- - -JenkinsAPISettings - - -
-

JenkinsAPISettings defines configuration used by the operator to gain admin access to the Jenkins API

-
-
-status
- - -JenkinsStatus - - -
-

Status defines the observed state of Jenkins

-
-

AppliedGroovyScript -

-

-(Appears on: -JenkinsStatus) -

-

-

AppliedGroovyScript is the applied groovy script in Jenkins by the operator.

-

- - - - - - - - - - - - - - - - - - - - - - - - - -
FieldDescription
-configurationType
- -string - -
-

ConfigurationType is the name of the configuration type(base-groovy, user-groovy, user-casc)

-
-source
- -string - -
-

Source is the name of source where is located groovy script

-
-name
- -string - -
-

Name is the name of the groovy script

-
-hash
- -string - -
-

Hash is the hash of the groovy script and secrets which it uses

-
-

AuthorizationStrategy -(string alias)

-

-(Appears on: -JenkinsAPISettings) -

-

-

AuthorizationStrategy defines authorization strategy of the operator for the Jenkins API

-

-

Backup -

-

-(Appears on: -JenkinsSpec) -

-

-

Backup defines configuration of Jenkins backup.

-

- - - - - - - - - - - - - - - - - - - - - - - - - -
FieldDescription
-containerName
- -string - -
-

ContainerName is the container name responsible for backup operation

-
-action
- - -Handler - - -
-

Action defines action which performs backup in backup container sidecar

-
-interval
- -uint64 - -
-

Interval tells how often make backup in seconds -Defaults to 30.

-
-makeBackupBeforePodDeletion
- -bool - -
-

MakeBackupBeforePodDeletion tells operator to make backup before Jenkins master pod deletion

-
-

ConfigMapRef -

-

-(Appears on: -Customization) -

-

-

ConfigMapRef is reference to Kubernetes ConfigMap.

-

- - - - - - - - - - - - - -
FieldDescription
-name
- -string - -
-
-

ConfigurationAsCode -

-

-(Appears on: -JenkinsSpec) -

-

-

ConfigurationAsCode defines configuration of Jenkins customization via Configuration as Code Jenkins plugin.

-

- - - - - - - - - - - - - -
FieldDescription
-Customization
- - -Customization - - -
-

-(Members of Customization are embedded into this type.) -

-
-

Container -

-

-(Appears on: -JenkinsMaster) -

-

-

Container defines Kubernetes container attributes.

-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldDescription
-name
- -string - -
-

Name of the container specified as a DNS_LABEL. -Each container in a pod must have a unique name (DNS_LABEL).

-
-image
- -string - -
-

Docker image name. -More info: https://kubernetes.io/docs/concepts/containers/images

-
-imagePullPolicy
- - -Kubernetes core/v1.PullPolicy - - -
-

Image pull policy. -One of Always, Never, IfNotPresent. -Defaults to Always.

-
-resources
- - -Kubernetes core/v1.ResourceRequirements - - -
-

Compute Resources required by this container. -More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/

-
-command
- -[]string - -
-(Optional) -

Entrypoint array. Not executed within a shell. -The docker image’s ENTRYPOINT is used if this is not provided. -Variable references $(VAR_NAME) are expanded using the container’s environment. If a variable -cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax -can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, -regardless of whether the variable exists or not. -More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell

-
-args
- -[]string - -
-(Optional) -

Arguments to the entrypoint. -The docker image’s CMD is used if this is not provided. -Variable references $(VAR_NAME) are expanded using the container’s environment. If a variable -cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax -can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, -regardless of whether the variable exists or not. -More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell

-
-workingDir
- -string - -
-(Optional) -

Container’s working directory. -If not specified, the container runtime’s default will be used, which -might be configured in the container image.

-
-ports
- - -[]Kubernetes core/v1.ContainerPort - - -
-(Optional) -

List of ports to expose from the container. Exposing a port here gives -the system additional information about the network connections a -container uses, but is primarily informational. Not specifying a port here -DOES NOT prevent that port from being exposed. Any port which is -listening on the default “0.0.0.0” address inside a container will be -accessible from the network.

-
-envFrom
- - -[]Kubernetes core/v1.EnvFromSource - - -
-(Optional) -

List of sources to populate environment variables in the container. -The keys defined within a source must be a C_IDENTIFIER. All invalid keys -will be reported as an event when the container is starting. When a key exists in multiple -sources, the value associated with the last source will take precedence. -Values defined by an Env with a duplicate key will take precedence.

-
-env
- - -[]Kubernetes core/v1.EnvVar - - -
-(Optional) -

List of environment variables to set in the container.

-
-volumeMounts
- - -[]Kubernetes core/v1.VolumeMount - - -
-(Optional) -

Pod volumes to mount into the container’s filesystem.

-
-livenessProbe
- - -Kubernetes core/v1.Probe - - -
-(Optional) -

Periodic probe of container liveness. -Container will be restarted if the probe fails.

-
-readinessProbe
- - -Kubernetes core/v1.Probe - - -
-(Optional) -

Periodic probe of container service readiness. -Container will be removed from service endpoints if the probe fails.

-
-lifecycle
- - -Kubernetes core/v1.Lifecycle - - -
-(Optional) -

Actions that the management system should take in response to container lifecycle events.

-
-securityContext
- - -Kubernetes core/v1.SecurityContext - - -
-(Optional) -

Security options the pod should run with. -More info: https://kubernetes.io/docs/concepts/policy/security-context/ -More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/

-
-

Customization -

-

-(Appears on: -ConfigurationAsCode, -GroovyScripts) -

-

-

Customization defines configuration of Jenkins customization.

-

- - - - - - - - - - - - - - - - - -
FieldDescription
-secret
- - -SecretRef - - -
-
-configurations
- - -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.ConfigMapRef - - -
-
-

GroovyScripts -

-

-(Appears on: -JenkinsSpec) -

-

-

GroovyScripts defines configuration of Jenkins customization via groovy scripts.

-

- - - - - - - - - - - - - -
FieldDescription
-Customization
- - -Customization - - -
-

-(Members of Customization are embedded into this type.) -

-
-

Handler -

-

-(Appears on: -Backup, -Restore) -

-

-

Handler defines a specific action that should be taken.

-

- - - - - - - - - - - - - -
FieldDescription
-exec
- - -Kubernetes core/v1.ExecAction - - -
-

Exec specifies the action to take.

-
-

Image -

-

-(Appears on: -JenkinsImageSpec) -

-

-

Defines Jenkins Plugin structure

-

- - - - - - - - - - - - - - - - - -
FieldDescription
-name
- -string - -
-
-version
- -string - -
-
-

JenkinsAPISettings -

-

-(Appears on: -JenkinsSpec) -

-

-

JenkinsAPISettings defines configuration used by the operator to gain admin access to the Jenkins API

-

- - - - - - - - - - - - - -
FieldDescription
-authorizationStrategy
- - -AuthorizationStrategy - - -
-
-

JenkinsCredentialType -(string alias)

-

-(Appears on: -SeedJob) -

-

-

JenkinsCredentialType defines type of Jenkins credential used to seed job mechanism.

-

-

JenkinsImage -

-

-

JenkinsImage is the Schema for the jenkinsimages API

-

- - - - - - - - - - - - - - - - - - - - - -
FieldDescription
-metadata
- - -Kubernetes meta/v1.ObjectMeta - - -
-Refer to the Kubernetes API documentation for the fields of the -metadata field. -
-spec
- - -JenkinsImageSpec - - -
-
-
- - - - - - - - - -
-image
- - -Image - - -
-
-plugins
- - -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsPlugin - - -
-
-
-status
- - -JenkinsImageStatus - - -
-
-

JenkinsImageSpec -

-

-(Appears on: -JenkinsImage) -

-

-

JenkinsImageSpec defines the desired state of JenkinsImage

-

- - - - - - - - - - - - - - - - - -
FieldDescription
-image
- - -Image - - -
-
-plugins
- - -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsPlugin - - -
-
-

JenkinsImageStatus -

-

-(Appears on: -JenkinsImage) -

-

-

JenkinsImageStatus defines the observed state of JenkinsImage

-

- - - - - - - - - - - - - - - - - - - - - -
FieldDescription
-image
- -string - -
-
-md5sum
- -string - -
-
-installedPlugins
- - -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsPlugin - - -
-
-

JenkinsMaster -

-

-(Appears on: -JenkinsSpec) -

-

-

JenkinsMaster defines the Jenkins master pod attributes and plugins, -every single change requires a Jenkins master pod restart.

-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldDescription
-annotations
- -map[string]string - -
-(Optional) -

Annotations is an unstructured key value map stored with a resource that may be -set by external tools to store and retrieve arbitrary metadata. They are not -queryable and should be preserved when modifying objects. -More info: http://kubernetes.io/docs/user-guide/annotations

-
-masterAnnotations
- -map[string]string - -
-(Optional) -

Annotations is an unstructured key value map stored with a resource that may be -set by external tools to store and retrieve arbitrary metadata. They are not -queryable and should be preserved when modifying objects. -More info: http://kubernetes.io/docs/user-guide/annotations -Deprecated: will be removed in the future, please use Annotations(annotations)

-
-labels
- -map[string]string - -
-(Optional) -

Map of string keys and values that can be used to organize and categorize -(scope and select) objects. May match selectors of replication controllers -and services. -More info: http://kubernetes.io/docs/user-guide/labels

-
-nodeSelector
- -map[string]string - -
-(Optional) -

NodeSelector is a selector which must be true for the pod to fit on a node. -Selector which must match a node’s labels for the pod to be scheduled on that node. -More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/

-
-securityContext
- - -Kubernetes core/v1.PodSecurityContext - - -
-(Optional) -

SecurityContext that applies to all the containers of the Jenkins -Master. As per kubernetes specification, it can be overridden -for each container individually. -Defaults to: -runAsUser: 1000 -fsGroup: 1000

-
-containers
- - -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Container - - -
-(Optional) -

List of containers belonging to the pod. -Containers cannot currently be added or removed. -There must be at least one container in a Pod. -Defaults to: -- image: jenkins/jenkins:lts -imagePullPolicy: Always -livenessProbe: -failureThreshold: 12 -httpGet: -path: /login -port: http -scheme: HTTP -initialDelaySeconds: 80 -periodSeconds: 10 -successThreshold: 1 -timeoutSeconds: 5 -name: jenkins-master -readinessProbe: -failureThreshold: 3 -httpGet: -path: /login -port: http -scheme: HTTP -initialDelaySeconds: 30 -periodSeconds: 10 -successThreshold: 1 -timeoutSeconds: 1 -resources: -limits: -cpu: 1500m -memory: 3Gi -requests: -cpu: “1” -memory: 600Mi

-
-imagePullSecrets
- - -[]Kubernetes core/v1.LocalObjectReference - - -
-(Optional) -

ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. -If specified, these secrets will be passed to individual puller implementations for them to use. For example, -in the case of docker, only DockerConfig type secrets are honored. -More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod

-
-volumes
- - -[]Kubernetes core/v1.Volume - - -
-(Optional) -

List of volumes that can be mounted by containers belonging to the pod. -More info: https://kubernetes.io/docs/concepts/storage/volumes

-
-tolerations
- - -[]Kubernetes core/v1.Toleration - - -
-(Optional) -

If specified, the pod’s tolerations.

-
-basePlugins
- - -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Plugin - - -
-(Optional) -

BasePlugins contains plugins required by operator -Defaults to : -- name: kubernetes -version: 1.25.2 -- name: workflow-job -version: “2.39” -- name: workflow-aggregator -version: “2.6” -- name: git -version: 4.2.2 -- name: job-dsl -version: “1.77” -- name: configuration-as-code -version: “1.38” -- name: kubernetes-credentials-provider -version: 0.13

-
-plugins
- - -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Plugin - - -
-(Optional) -

Plugins contains plugins required by user

-
-disableCSRFProtection
- -bool - -
-

DisableCSRFProtection allows you to toggle CSRF Protection on Jenkins

-
-priorityClassName
- -string - -
-(Optional) -

PriorityClassName for Jenkins master pod

-
-

JenkinsPlugin -

-

-(Appears on: -JenkinsImageSpec, -JenkinsImageStatus) -

-

-

Defines Jenkins Plugin structure

-

- - - - - - - - - - - - - - - - - -
FieldDescription
-name
- -string - -
-
-version
- -string - -
-
-

JenkinsSpec -

-

-(Appears on: -Jenkins) -

-

-

JenkinsSpec defines the desired state of the Jenkins.

-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldDescription
-master
- - -JenkinsMaster - - -
-

Master represents Jenkins master pod properties and Jenkins plugins. -Every single change here requires a pod restart.

-
-seedJobs
- - -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.SeedJob - - -
-(Optional) -

SeedJobs defines list of Jenkins Seed Job configurations -More info: https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configuration#configure-seed-jobs-and-pipelines

-
-notifications
- - -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Notification - - -
-(Optional) -

Notifications defines list of a services which are used to inform about Jenkins status -Can be used to integrate chat services like Slack, Microsoft Teams or Mailgun

-
-service
- - -Service - - -
-(Optional) -

Service is Kubernetes service of Jenkins master HTTP pod -Defaults to : -port: 8080 -type: ClusterIP

-
-slaveService
- - -Service - - -
-(Optional) -

Service is Kubernetes service of Jenkins slave pods -Defaults to : -port: 50000 -type: ClusterIP

-
-backup
- - -Backup - - -
-(Optional) -

Backup defines configuration of Jenkins backup -More info: https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configure-backup-and-restore/

-
-restore
- - -Restore - - -
-(Optional) -

Backup defines configuration of Jenkins backup restore -More info: https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configure-backup-and-restore/

-
-groovyScripts
- - -GroovyScripts - - -
-(Optional) -

GroovyScripts defines configuration of Jenkins customization via groovy scripts

-
-configurationAsCode
- - -ConfigurationAsCode - - -
-(Optional) -

ConfigurationAsCode defines configuration of Jenkins customization via Configuration as Code Jenkins plugin

-
-roles
- - -[]Kubernetes rbac/v1.RoleRef - - -
-(Optional) -

Roles defines list of extra RBAC roles for the Jenkins Master pod service account

-
-serviceAccount
- - -ServiceAccount - - -
-(Optional) -

ServiceAccount defines Jenkins master service account attributes

-
-jenkinsAPISettings
- - -JenkinsAPISettings - - -
-

JenkinsAPISettings defines configuration used by the operator to gain admin access to the Jenkins API

-
-

JenkinsStatus -

-

-(Appears on: -Jenkins) -

-

-

JenkinsStatus defines the observed state of Jenkins

-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldDescription
-operatorVersion
- -string - -
-(Optional) -

OperatorVersion is the operator version which manages this CR

-
-provisionStartTime
- - -Kubernetes meta/v1.Time - - -
-(Optional) -

ProvisionStartTime is a time when Jenkins master pod has been created

-
-baseConfigurationCompletedTime
- - -Kubernetes meta/v1.Time - - -
-(Optional) -

BaseConfigurationCompletedTime is a time when Jenkins base configuration phase has been completed

-
-userConfigurationCompletedTime
- - -Kubernetes meta/v1.Time - - -
-(Optional) -

UserConfigurationCompletedTime is a time when Jenkins user configuration phase has been completed

-
-restoredBackup
- -uint64 - -
-(Optional) -

RestoredBackup is the restored backup number after Jenkins master pod restart

-
-lastBackup
- -uint64 - -
-(Optional) -

LastBackup is the latest backup number

-
-pendingBackup
- -uint64 - -
-(Optional) -

PendingBackup is the pending backup number

-
-backupDoneBeforePodDeletion
- -bool - -
-(Optional) -

BackupDoneBeforePodDeletion tells if backup before pod deletion has been made

-
-userAndPasswordHash
- -string - -
-(Optional) -

UserAndPasswordHash is a SHA256 hash made from user and password

-
-createdSeedJobs
- -[]string - -
-(Optional) -

CreatedSeedJobs contains list of seed job id already created in Jenkins

-
-appliedGroovyScripts
- - -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.AppliedGroovyScript - - -
-(Optional) -

AppliedGroovyScripts is a list with all applied groovy scripts in Jenkins by the operator

-
-

Mailgun -

-

-(Appears on: -Notification) -

-

-

Mailgun is handler for Mailgun email service notification channel.

-

- - - - - - - - - - - - - - - - - - - - - - - - - -
FieldDescription
-domain
- -string - -
-
-apiKeySecretKeySelector
- - -SecretKeySelector - - -
-
-recipient
- -string - -
-
-from
- -string - -
-
-

MicrosoftTeams -

-

-(Appears on: -Notification) -

-

-

MicrosoftTeams is handler for Microsoft MicrosoftTeams notification channel.

-

- - - - - - - - - - - - - -
FieldDescription
-webHookURLSecretKeySelector
- - -SecretKeySelector - - -
-

The web hook URL to MicrosoftTeams App

-
-

Notification -

-

-(Appears on: -JenkinsSpec) -

-

-

Notification is a service configuration used to send notifications about Jenkins status.

-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldDescription
-level
- - -NotificationLevel - - -
-
-verbose
- -bool - -
-
-name
- -string - -
-
-slack
- - -github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Slack - - -
-
-teams
- - -github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.MicrosoftTeams - - -
-
-mailgun
- - -github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Mailgun - - -
-
-smtp
- - -github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.SMTP - - -
-
-

NotificationLevel -(string alias)

-

-(Appears on: -Notification) -

-

-

NotificationLevel defines the level of a Notification.

-

-

Plugin -

-

-(Appears on: -JenkinsMaster) -

-

-

Plugin defines Jenkins plugin.

-

- - - - - - - - - - - - - - - - - - - - - -
FieldDescription
-name
- -string - -
-

Name is the name of Jenkins plugin

-
-version
- -string - -
-

Version is the version of Jenkins plugin

-
-downloadURL
- -string - -
-

DownloadURL is the custom url from where plugin has to be downloaded.

-
-

Restore -

-

-(Appears on: -JenkinsSpec) -

-

-

Restore defines configuration of Jenkins backup restore operation.

-

- - - - - - - - - - - - - - - - - - - - - -
FieldDescription
-containerName
- -string - -
-

ContainerName is the container name responsible for restore backup operation

-
-action
- - -Handler - - -
-

Action defines action which performs restore backup in restore container sidecar

-
-recoveryOnce
- -uint64 - -
-(Optional) -

RecoveryOnce if want to restore specific backup set this field and then Jenkins will be restarted and desired backup will be restored

-
-

SMTP -

-

-(Appears on: -Notification) -

-

-

SMTP is handler for sending emails via this protocol.

-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldDescription
-usernameSecretKeySelector
- - -SecretKeySelector - - -
-
-passwordSecretKeySelector
- - -SecretKeySelector - - -
-
-port
- -int - -
-
-server
- -string - -
-
-tlsInsecureSkipVerify
- -bool - -
-
-from
- -string - -
-
-to
- -string - -
-
-

SecretKeySelector -

-

-(Appears on: -Mailgun, -MicrosoftTeams, -SMTP, -Slack) -

-

-

SecretKeySelector selects a key of a Secret.

-

- - - - - - - - - - - - - - - - - -
FieldDescription
-secret
- - -Kubernetes core/v1.LocalObjectReference - - -
-

The name of the secret in the pod’s namespace to select from.

-
-key
- -string - -
-

The key of the secret to select from. Must be a valid secret key.

-
-

SecretRef -

-

-(Appears on: -Customization) -

-

-

SecretRef is reference to Kubernetes secret.

-

- - - - - - - - - - - - - -
FieldDescription
-name
- -string - -
-
-

SeedJob -

-

-(Appears on: -JenkinsSpec) -

-

-

SeedJob defines configuration for seed job -More info: https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configuration/#configure-seed-jobs-and-pipelines.

-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldDescription
-id
- -string - -
-

ID is the unique seed job name

-
-credentialID
- -string - -
-

CredentialID is the Kubernetes secret name which stores repository access credentials

-
-description
- -string - -
-(Optional) -

Description is the description of the seed job

-
-targets
- -string - -
-

Targets is the repository path where are seed job definitions

-
-repositoryBranch
- -string - -
-

RepositoryBranch is the repository branch where are seed job definitions

-
-repositoryUrl
- -string - -
-

RepositoryURL is the repository access URL. Can be SSH or HTTPS.

-
-credentialType
- - -JenkinsCredentialType - - -
-(Optional) -

JenkinsCredentialType is the https://jenkinsci.github.io/kubernetes-credentials-provider-plugin/ credential type

-
-bitbucketPushTrigger
- -bool - -
-(Optional) -

BitbucketPushTrigger is used for Bitbucket web hooks

-
-githubPushTrigger
- -bool - -
-(Optional) -

GitHubPushTrigger is used for GitHub web hooks

-
-buildPeriodically
- -string - -
-(Optional) -

BuildPeriodically is setting for scheduled trigger

-
-pollSCM
- -string - -
-(Optional) -

PollSCM is setting for polling changes in SCM

-
-ignoreMissingFiles
- -bool - -
-(Optional) -

IgnoreMissingFiles is setting for Job DSL API plugin to ignore files that miss

-
-additionalClasspath
- -string - -
-(Optional) -

AdditionalClasspath is setting for Job DSL API plugin to set Additional Classpath

-
-failOnMissingPlugin
- -bool - -
-(Optional) -

FailOnMissingPlugin is setting for Job DSL API plugin that fails job if required plugin is missing

-
-unstableOnDeprecation
- -bool - -
-(Optional) -

UnstableOnDeprecation is setting for Job DSL API plugin that sets build status as unstable if build using deprecated features

-
-

Service -

-

-(Appears on: -JenkinsSpec) -

-

-

Service defines Kubernetes service attributes

-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldDescription
-annotations
- -map[string]string - -
-(Optional) -

Annotations is an unstructured key value map stored with a resource that may be -set by external tools to store and retrieve arbitrary metadata. They are not -queryable and should be preserved when modifying objects. -More info: http://kubernetes.io/docs/user-guide/annotations

-
-labels
- -map[string]string - -
-(Optional) -

Route service traffic to pods with label keys and values matching this -selector. If empty or not present, the service is assumed to have an -external process managing its endpoints, which Kubernetes will not -modify. Only applies to types ClusterIP, NodePort, and LoadBalancer. -Ignored if type is ExternalName. -More info: https://kubernetes.io/docs/concepts/services-networking/service/

-
-type
- - -Kubernetes core/v1.ServiceType - - -
-(Optional) -

Type determines how the Service is exposed. Defaults to ClusterIP. Valid -options are ExternalName, ClusterIP, NodePort, and LoadBalancer. -“ExternalName” maps to the specified externalName. -“ClusterIP” allocates a cluster-internal IP address for load-balancing to -endpoints. Endpoints are determined by the selector or if that is not -specified, by manual construction of an Endpoints object. If clusterIP is -“None”, no virtual IP is allocated and the endpoints are published as a -set of endpoints rather than a stable IP. -“NodePort” builds on ClusterIP and allocates a port on every node which -routes to the clusterIP. -“LoadBalancer” builds on NodePort and creates an -external load-balancer (if supported in the current cloud) which routes -to the clusterIP. -More info: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services—service-types

-
-port
- -int32 - -
-

The port that are exposed by this service. -More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies

-
-nodePort
- -int32 - -
-(Optional) -

The port on each node on which this service is exposed when type=NodePort or LoadBalancer. -Usually assigned by the system. If specified, it will be allocated to the service -if unused or else creation of the service will fail. -Default is to auto-allocate a port if the ServiceType of this Service requires one. -More info: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport

-
-loadBalancerSourceRanges
- -[]string - -
-(Optional) -

If specified and supported by the platform, this will restrict traffic through the cloud-provider -load-balancer will be restricted to the specified client IPs. This field will be ignored if the -cloud-provider does not support the feature.” -More info: https://kubernetes.io/docs/tasks/administer-cluster/securing-a-cluster/#restricting-cloud-metadata-api-access

-
-loadBalancerIP
- -string - -
-(Optional) -

Only applies to Service Type: LoadBalancer -LoadBalancer will get created with the IP specified in this field. -This feature depends on whether the underlying cloud-provider supports specifying -the loadBalancerIP when a load balancer is created. -This field will be ignored if the cloud-provider does not support the feature.

-
-

ServiceAccount -

-

-(Appears on: -JenkinsSpec) -

-

-

ServiceAccount defines Kubernetes service account attributes

-

- - - - - - - - - - - - - -
FieldDescription
-annotations
- -map[string]string - -
-(Optional) -

Annotations is an unstructured key value map stored with a resource that may be -set by external tools to store and retrieve arbitrary metadata. They are not -queryable and should be preserved when modifying objects. -More info: http://kubernetes.io/docs/user-guide/annotations

-
-

Slack -

-

-(Appears on: -Notification) -

-

-

Slack is handler for Slack notification channel.

-

- - - - - - - - - - - - - -
FieldDescription
-webHookURLSecretKeySelector
- - -SecretKeySelector - - -
-

The web hook URL to Slack App

-
-
-

-Generated with gen-crd-api-reference-docs -on git commit 1c853e69. -

- - - -
Last modified April 13, 2020 -
-
- - -
-
-
- - - - -
- - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/docs/getting-started/v0.5.x/aks/index.html b/docs/docs/getting-started/v0.5.x/aks/index.html deleted file mode 100644 index b40d3deaf..000000000 --- a/docs/docs/getting-started/v0.5.x/aks/index.html +++ /dev/null @@ -1,986 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -AKS | Jenkins Operator - - - - - - - - - - - - - - - - - - - - - - - - - - - - AKS | Jenkins Operator - - -
- - - -
-
-
-
-
- - - - - -
- - - - -
- - - - -
-
- - - - - - - - - - - -
-
- - - -
-

AKS

-
Additional configuration for Azure Kubernetes Service
-

Azure AKS managed Kubernetes service adds to every pod the following environment variables:

-
- name: KUBERNETES_PORT_443_TCP_ADDR
-  value:
-- name: KUBERNETES_PORT
-  value: tcp://
-- name: KUBERNETES_PORT_443_TCP
-  value: tcp://
-- name: KUBERNETES_SERVICE_HOST
-  value:
-

The operator is aware of it and omits these environment variables when checking if a Jenkins pod environment has been changed. It prevents the -restart of a Jenkins pod over and over again.

- - - -
Last modified January 18, 2021 -
-
- - -
-
-
- - - - -
- - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/docs/getting-started/v0.5.x/configuration/index.html b/docs/docs/getting-started/v0.5.x/configuration/index.html deleted file mode 100644 index af128d348..000000000 --- a/docs/docs/getting-started/v0.5.x/configuration/index.html +++ /dev/null @@ -1,1273 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Configuration | Jenkins Operator - - - - - - - - - - - - - - - - - - - - - - - - - - - - Configuration | Jenkins Operator - - -
- - - -
-
-
-
-
- - - - - -
- - - - -
- - - - -
- -
- - - -
-

Configuration

-
How to configure Jenkins with Operator
- - -

Configure Seed Jobs and Pipelines

- -

Jenkins operator uses job-dsl and kubernetes-credentials-provider plugins for configuring jobs -and deploy keys.

- -

Prepare job definitions and pipelines

- -

First you have to prepare pipelines and job definition in your GitHub repository using the following structure:

-
cicd/
-├── jobs
-│   └── k8s.jenkins
-└── pipelines
-    └── k8s.jenkins
-

cicd/jobs/k8s.jenkins is a job definition:

-
#!/usr/bin/env groovy
-
-pipelineJob('k8s-e2e') {
-    displayName('Kubernetes Plugin E2E Test')
-
-    logRotator {
-        numToKeep(10)
-        daysToKeep(30)
-    }
-
-    configure { project ->
-        project / 'properties' / 'org.jenkinsci.plugins.workflow.job.properties.DurabilityHintJobProperty' {
-            hint('PERFORMANCE_OPTIMIZED')
-        }
-    }
-
-    definition {
-        cpsScm {
-            scm {
-                git {
-                    remote {
-                        url('https://github.com/jenkinsci/kubernetes-operator.git')
-                        credentials('jenkins-operator')
-                    }
-                    branches('*/master')
-                }
-            }
-            scriptPath('cicd/pipelines/k8s.jenkins')
-        }
-    }
-}
-

cicd/pipelines/k8s.jenkins is an actual Jenkins pipeline:

-
#!/usr/bin/env groovy
-
-def label = "k8s-${UUID.randomUUID().toString()}"
-def home = "/home/jenkins"
-def workspace = "${home}/workspace/build-jenkins-operator"
-def workdir = "${workspace}/src/github.com/jenkinsci/kubernetes-operator/"
-
-podTemplate(label: label,
-        containers: [
-                containerTemplate(name: 'alpine', image: 'alpine:3.11', ttyEnabled: true, command: 'cat'),
-        ],
-        ) {
-    node(label) {
-        stage('Run shell') {
-            container('alpine') {
-                sh 'echo "hello world"'
-            }
-        }
-    }
-}
-

Configure Seed Jobs

- -

Jenkins Seed Jobs are configured using Jenkins.spec.seedJobs section from your custom resource manifest:

-
apiVersion: jenkins.io/v1alpha2
-kind: Jenkins
-metadata:
-  name: example
-spec:
-  seedJobs:
-  - id: jenkins-operator
-    targets: "cicd/jobs/*.jenkins"
-    description: "Jenkins Operator repository"
-    repositoryBranch: master
-    repositoryUrl: https://github.com/jenkinsci/kubernetes-operator.git
-

Jenkins Operator will automatically discover and configure all the seed jobs.

- -

You can verify if deploy keys were successfully configured in the Jenkins Credentials tab.

- -

jenkins

- -

You can verify if your pipelines were successfully configured in the Jenkins Seed Job console output.

- -

jenkins

- -

If your GitHub repository is private you have to configure SSH or username/password authentication.

- -

SSH authentication

- -

Generate SSH Keys

- -

There are two methods of SSH private key generation:

-
$ openssl genrsa -out <filename> 2048
-

or

-
$ ssh-keygen -t rsa -b 2048
-$ ssh-keygen -p -f <filename> -m pem
-

Then copy content from generated file.

- -

Public key

- -

If you want to upload your public key to your Git server you need to extract it.

- -

If key was generated by openssl then you need to type this to extract public key:

-
$ openssl rsa -in <filename> -pubout > <filename>.pub
-

If key was generated by ssh-keygen the public key content is located in .pub and there is no need to extract public key

- -

Configure SSH authentication

- -

Configure a seed job like this:

-
apiVersion: jenkins.io/v1alpha2
-kind: Jenkins
-metadata:
-  name: example
-spec:
-  seedJobs:
-  - id: jenkins-operator-ssh
-    credentialType: basicSSHUserPrivateKey
-    credentialID: k8s-ssh
-    targets: "cicd/jobs/*.jenkins"
-    description: "Jenkins Operator repository"
-    repositoryBranch: master
-    repositoryUrl: git@github.com:jenkinsci/kubernetes-operator.git
-

and create a Kubernetes Secret (name of secret should be the same from credentialID field):

-
apiVersion: v1
-kind: Secret
-metadata:
-  name: k8s-ssh
-  labels:
-    "jenkins.io/credentials-type": "basicSSHUserPrivateKey"
-  annotations:
-    "jenkins.io/credentials-description" : "ssh github.com:jenkinsci/kubernetes-operator"
-stringData:
-  privateKey: |
-    -----BEGIN RSA PRIVATE KEY-----
-    MIIJKAIBAAKCAgEAxxDpleJjMCN5nusfW/AtBAZhx8UVVlhhhIKXvQ+dFODQIdzO
-    oDXybs1zVHWOj31zqbbJnsfsVZ9Uf3p9k6xpJ3WFY9b85WasqTDN1xmSd6swD4N8
-    ...
-  username: github_user_name
-

Username & password authentication

- -

Configure the seed job like:

-
apiVersion: jenkins.io/v1alpha2
-kind: Jenkins
-metadata:
-  name: example
-spec:
-  seedJobs:
-  - id: jenkins-operator-user-pass
-    credentialType: usernamePassword
-    credentialID: k8s-user-pass
-    targets: "cicd/jobs/*.jenkins"
-    description: "Jenkins Operator repository"
-    repositoryBranch: master
-    repositoryUrl: https://github.com/jenkinsci/kubernetes-operator.git
-

and create a Kubernetes Secret (name of secret should be the same from credentialID field):

-
apiVersion: v1
-kind: Secret
-metadata:
-  name: k8s-user-pass
-stringData:
-  username: github_user_name
-  password: password_or_token
-

External authentication

- -

You can use external credential type if you want to configure authentication using Configuration As Code or Groovy Script.

- -

Example:

-
apiVersion: jenkins.io/v1alpha2
-kind: Jenkins
-metadata:
-  name: example
-spec:
-  seedJobs:
-  - id: jenkins-operator-external
-    credentialType: external
-    credentialID: k8s-external
-    targets: "cicd/jobs/*.jenkins"
-    description: "Jenkins Operator repository"
-    repositoryBranch: master
-    repositoryUrl: https://github.com/jenkinsci/kubernetes-operator.git
-

Remember that credentialID must match the id of the credentials configured in Jenkins. Consult the -Jenkins docs for using credentials for details.

- -

HTTP Proxy for downloading plugins

- -

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.:

-
spec:
-  master:
-    containers:
-      - name: jenkins-master
-        env:
-          - name: CURL_OPTIONS
-            value: -L -x <proxy_url>
-

In CURL_OPTIONS var you can set additional arguments to curl command.

- -

Pulling Docker images from private repositories

- -

To pull a Docker Image from private repository you can use imagePullSecrets.

- -

Please follow the instructions on creating a secret with a docker config.

- -

Docker Hub Configuration

- -

To use Docker Hub additional steps are required.

- -

Edit the previously created secret:

-
kubectl -n <namespace> edit secret <name>
-

The .dockerconfigjson key’s value needs to be replaced with a modified version.

- -

After modifications, it needs to be encoded as a Base64 value before setting the .dockerconfigjson key.

- -

Example config file to modify and use:

-
{
-    "auths":{
-        "https://index.docker.io/v1/":{
-            "username":"user",
-            "password":"password",
-            "email":"yourdockeremail@gmail.com",
-            "auth":"base64 of string user:password"
-        },
-        "auth.docker.io":{
-            "username":"user",
-            "password":"password",
-            "email":"yourdockeremail@gmail.com",
-            "auth":"base64 of string user:password"
-        },
-        "registry.docker.io":{
-            "username":"user",
-            "password":"password",
-            "email":"yourdockeremail@gmail.com",
-            "auth":"base64 of string user:password"
-        },
-        "docker.io":{
-            "username":"user",
-            "password":"password",
-            "email":"yourdockeremail@gmail.com",
-            "auth":"base64 of string user:password"
-        },
-        "https://registry-1.docker.io/v2/": {
-            "username":"user",
-            "password":"password",
-            "email":"yourdockeremail@gmail.com",
-            "auth":"base64 of string user:password"
-        },
-        "registry-1.docker.io/v2/": {
-            "username":"user",
-            "password":"password",
-            "email":"yourdockeremail@gmail.com",
-            "auth":"base64 of string user:password"
-        },
-        "registry-1.docker.io": {
-            "username":"user",
-            "password":"password",
-            "email":"yourdockeremail@gmail.com",
-            "auth":"base64 of string user:password"
-        },
-        "https://registry-1.docker.io": {
-            "username":"user",
-            "password":"password",
-            "email":"yourdockeremail@gmail.com",
-            "auth":"base64 of string user:password"
-        }
-    }
-}
- - -
Last modified October 1, 2021 -
-
- - -
-
-
- - - - -
- - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/docs/getting-started/v0.5.x/configure-backup-and-restore/index.html b/docs/docs/getting-started/v0.5.x/configure-backup-and-restore/index.html deleted file mode 100644 index ef70654c0..000000000 --- a/docs/docs/getting-started/v0.5.x/configure-backup-and-restore/index.html +++ /dev/null @@ -1,1066 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Configure backup and restore | Jenkins Operator - - - - - - - - - - - - - - - - - - - - - - - - - - - - Configure backup and restore | Jenkins Operator - - -
- - - -
-
-
-
-
- - - - - -
- - - - -
- - - - -
-
- - - - - - - - - - - - - - - -
-
- - - -
-

Configure backup and restore

-
Prevent loss of job history
- - -

Backup and restore is done by a container sidecar.

- -

PVC

- -

Create PVC

- -

Save to the file named pvc.yaml:

-
apiVersion: v1
-kind: PersistentVolumeClaim
-metadata:
-  name: <pvc_name>
-  namespace: <namespace>
-spec:
-  accessModes:
-  - ReadWriteOnce
-  resources:
-    requests:
-      storage: 500Gi
-

Run the following command:

-
$ kubectl -n <namespace> create -f pvc.yaml
-

Configure Jenkins CR

-
apiVersion: jenkins.io/v1alpha2
-kind: Jenkins
-metadata:
-  name: <cr_name>
-  namespace: <namespace>
-spec:
-  master:
-    securityContext:
-      runAsUser: 1000
-      fsGroup: 1000
-    containers:
-    - name: jenkins-master
-      image: jenkins/jenkins:2.263.2-lts-alpine
-    - name: backup # container responsible for the backup and restore
-      env:
-      - name: BACKUP_DIR
-        value: /backup
-      - name: JENKINS_HOME
-        value: /jenkins-home
-      - name: BACKUP_COUNT
-        value: "3" # keep only the 2 most recent backups
-      image: virtuslab/jenkins-operator-backup-pvc:v0.1.0 # look at backup/pvc directory
-      imagePullPolicy: IfNotPresent
-      volumeMounts:
-      - mountPath: /jenkins-home # Jenkins home volume
-        name: jenkins-home
-      - mountPath: /backup # backup volume
-        name: backup
-    volumes:
-    - name: backup # PVC volume where backups will be stored
-      persistentVolumeClaim:
-        claimName: <pvc_name>
-  backup:
-    containerName: backup # container name is responsible for backup
-    action:
-      exec:
-        command:
-        - /home/user/bin/backup.sh # this command is invoked on "backup" container to make backup, for example /home/user/bin/backup.sh <backup_number>, <backup_number> is passed by operator
-    interval: 30 # how often make backup in seconds
-    makeBackupBeforePodDeletion: true # make a backup before pod deletion
-  restore:
-    containerName: backup # container name is responsible for restore backup
-    action:
-      exec:
-        command:
-        - /home/user/bin/restore.sh # this command is invoked on "backup" container to make restore backup, for example /home/user/bin/restore.sh <backup_number>, <backup_number> is passed by operator
-    getLatestAction:
-      exec:
-        command:
-        - /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
- - -
Last modified January 25, 2021 -
-
- - -
-
-
- - - - -
- - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/docs/getting-started/v0.5.x/custom-backup-and-restore/index.html b/docs/docs/getting-started/v0.5.x/custom-backup-and-restore/index.html deleted file mode 100644 index 8735b0363..000000000 --- a/docs/docs/getting-started/v0.5.x/custom-backup-and-restore/index.html +++ /dev/null @@ -1,1158 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Custom Backup and Restore Providers | Jenkins Operator - - - - - - - - - - - - - - - - - - - - - - - - - - - - Custom Backup and Restore Providers | Jenkins Operator - - -
- - - -
-
-
-
-
- - - - - -
- - - - -
- - - - -
- -
- - - -
-

Custom Backup and Restore Providers

-
Custom backup and restore provider
- - -

With enough effort one can create a custom backup and restore provider -for the Jenkins Operator.

- -

Requirements

- -

Two commands (e.g. scripts) are required:

- -
    -
  • a backup command, e.g. backup.sh that takes one argument, a backup number
  • -
  • a restore command, e.g. backup.sh that takes one argument, a backup number
  • -
- -

Both scripts need to return an exit code of 0 on success and 1 or greater for failure.

- -

One of those scripts (or the entry point of the container) needs to be responsible -for backup cleanup or rotation if required, or an external system.

- -

How it works

- -

The mechanism relies on basic Kubernetes and UNIX functionalities.

- -

The backup (and restore) container runs as a sidecar in the same -Kubernetes pod as the Jenkins master.

- -

Name of the backup and restore containers can be set as necessary using -spec.backup.containerName and spec.restore.containerName. -In most cases it will be the same container, but we allow for less common use cases.

- -

The operator will call a backup or restore commands inside a sidecar container when necessary:

- -
    -
  • backup command (defined in spec.backup.action.exec.command) -will be called every N seconds configurable in: spec.backup.interval -and on pod shutdown (if enabled in spec.backup.makeBackupBeforePodDeletion) -with an integer representing the current backup number as first and only argument
  • -
  • restore command (defined in spec.restore.action.exec.command) -will be called at Jenkins startup -with an integer representing the backup number to restore as first and only argument -(can be overridden using spec.restore.recoveryOnce)
  • -
- -

Example AWS S3 backup using the CLI

- -

This example shows abbreviated version of a simple AWS S3 backup implementation -using: aws-cli, bash and kube2iam.

- -

In addition to your normal Jenkins CustomResource some additional settings -for backup and restore are required, e.g.:

-
kind: Jenkins
-apiVersion: jenkins.io/v1alpha1
-metadata:
-  name: example
-  namespace: jenkins
-spec:
-  master:
-    masterAnnotations:
-      iam.amazonaws.com/role: "my-example-backup-role" # tell kube2iam where the AWS IAM role is
-    containers:
-      - name: jenkins-master
-        ...
-      - name: backup # container responsible for backup and restore
-        image: quay.io/virtuslab/aws-cli:1.16.263-2
-        workingDir: /home/user/bin/
-        command: # our container entry point
-          - sleep
-          - infinity
-        env:
-          - name: BACKUP_BUCKET
-            value: my-example-bucket # the S3 bucket name to use
-          - name: BACKUP_PATH
-            value: my-backup-path # the S3 bucket path prefix to use
-          - name: JENKINS_HOME
-            value: /jenkins-home # the path to mount jenkins home dir in the backup container
-        volumeMounts:
-          - mountPath: /jenkins-home # Jenkins home volume
-            name: jenkins-home
-          - mountPath: /home/user/bin/backup.sh
-            name: backup-scripts
-            subPath: backup.sh
-            readOnly: true
-          - mountPath: /home/user/bin/restore.sh
-            name: backup-scripts
-            subPath: restore.sh
-            readOnly: true
-    volumes:
-      - name: backup-scripts
-        configMap:
-          defaultMode: 0754
-          name: jenkins-operator-backup-s3
-    securityContext: # make sure both containers use the same UID and GUID
-      runAsUser: 1000
-      fsGroup: 1000
-  ...
-  backup:
-    containerName: backup # container name responsible for backup
-    interval: 3600 # how often make a backup in seconds
-    makeBackupBeforePodDeletion: true # trigger backup just before deleting the pod
-    action:
-      exec:
-        command:
-          # this command is invoked on "backup" container to create a backup,
-          # <backup_number> is passed by operator,
-          # for example /home/user/bin/backup.sh <backup_number>
-          - /home/user/bin/backup.sh
-  restore:
-    containerName: backup # container name is responsible for restore backup
-    action:
-      exec:
-        command:
-          # this command is invoked on "backup" container to restore a backup,
-          # <backup_number> is passed by operator
-          # for example /home/user/bin/restore.sh <backup_number>
-          - /home/user/bin/restore.sh
-#    recoveryOnce: <backup_number> # if want to restore specific backup configure this field and then Jenkins will be restarted and desired backup will be restored
-

The actual backup and restore scripts will be provided in a ConfigMap:

-
kind: ConfigMap
-apiVersion: v1
-metadata:
-  name: jenkins-operator-backup-s3
-  namespace: jenkins
-  labels:
-    app: jenkins-operator
-data:
-  backup.sh: |-
-    #!/bin/bash -xeu
-    [[ ! $# -eq 1 ]] && echo "Usage: $0 backup_number" && exit 1;
-    [[ -z "${BACKUP_BUCKET}" ]] && echo "Required 'BACKUP_BUCKET' env not set" && exit 1;
-    [[ -z "${BACKUP_PATH}" ]] && echo "Required 'BACKUP_PATH' env not set" && exit 1;
-    [[ -z "${JENKINS_HOME}" ]] && echo "Required 'JENKINS_HOME' env not set" && exit 1;
-
-    backup_number=$1
-    echo "Running backup #${backup_number}"
-
-    BACKUP_TMP_DIR=$(mktemp -d)
-    tar -C ${JENKINS_HOME} -czf "${BACKUP_TMP_DIR}/${backup_number}.tar.gz" --exclude jobs/*/workspace* -c jobs && \
-
-    aws s3 cp ${BACKUP_TMP_DIR}/${backup_number}.tar.gz s3://${BACKUP_BUCKET}/${BACKUP_PATH}/${backup_number}.tar.gz
-    echo Done
-
-  restore.sh: |-
-    #!/bin/bash -xeu
-    [[ ! $# -eq 1 ]] && echo "Usage: $0 backup_number" && exit 1
-    [[ -z "${BACKUP_BUCKET}" ]] && echo "Required 'BACKUP_BUCKET' env not set" && exit 1;
-    [[ -z "${BACKUP_PATH}" ]] && echo "Required 'BACKUP_PATH' env not set" && exit 1;
-    [[ -z "${JENKINS_HOME}" ]] && echo "Required 'JENKINS_HOME' env not set" && exit 1;
-
-    backup_number=$1
-    echo "Running restore #${backup_number}"
-
-    BACKUP_TMP_DIR=$(mktemp -d)
-    aws s3 cp s3://${BACKUP_BUCKET}/${BACKUP_PATH}/${backup_number}.tar.gz ${BACKUP_TMP_DIR}/${backup_number}.tar.gz
-
-    tar -C ${JENKINS_HOME} -zxf "${BACKUP_TMP_DIR}/${backup_number}.tar.gz"
-    echo Done
-

In our example we will use S3 bucket lifecycle policy to keep -the number of backups under control, e.g. Cloud Formation fragment:

-
    Type: AWS::S3::Bucket
-    Properties:
-      BucketName: my-example-bucket
-      ...
-      LifecycleConfiguration:
-        Rules:
-          - Id: BackupCleanup
-            Status: Enabled
-            Prefix: my-backup-path
-            ExpirationInDays: 7
-            NoncurrentVersionExpirationInDays: 14
-            AbortIncompleteMultipartUpload:
-              DaysAfterInitiation: 3
- - -
Last modified January 18, 2021 -
-
- - -
-
-
- - - - -
- - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/docs/getting-started/v0.5.x/customization/index.html b/docs/docs/getting-started/v0.5.x/customization/index.html deleted file mode 100644 index 270d628b9..000000000 --- a/docs/docs/getting-started/v0.5.x/customization/index.html +++ /dev/null @@ -1,1163 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Customization | Jenkins Operator - - - - - - - - - - - - - - - - - - - - - - - - - - - - Customization | Jenkins Operator - - -
- - - -
-
-
-
-
- - - - - -
- - - - -
- - - - -
- -
- - - -
-

Customization

-
How to customize Jenkins
- - -

How to customize Jenkins

- -

Jenkins can be customized with plugins. -Plugin’s configuration is applied as groovy scripts or the configuration as code plugin. -Any plugin working for Jenkins can be installed by the Jenkins Operator.

- -

Pre-installed plugins:

- -
    -
  • configuration-as-code v1.51
  • -
  • git v4.7.2
  • -
  • job-dsl v1.77
  • -
  • kubernetes-credentials-provider v0.18-1
  • -
  • kubernetes v1.30.0
  • -
  • workflow-aggregator v2.6
  • -
  • workflow-job v2.41
  • -
- -

Rest of the plugins can be found in plugins repository.

- -

Install plugins

- -

Edit Custom Resource under spec.master.plugins:

-
apiVersion: jenkins.io/v1alpha2
-kind: Jenkins
-metadata:
-  name: example
-spec:
-  master:
-   plugins:
-   - name: simple-theme-plugin
-     version: "0.6"
-

Under spec.master.basePlugins you can find plugins for a valid Jenkins Operator:

-
apiVersion: jenkins.io/v1alpha2
-kind: Jenkins
-metadata:
-  name: example
-spec:
-  master:
-    basePlugins:
-    - name: kubernetes
-      version: "1.30.0"
-    - name: workflow-job
-      version: "2.40"
-    - name: workflow-aggregator
-      version: "2.6"
-    - name: git
-      version: "4.7.2"
-    - name: job-dsl
-      version: "1.77"
-    - name: configuration-as-code
-      version: "1.51"
-    - name: kubernetes-credentials-provider
-      version: "0.18-1"
-

You can change their versions.

- -

The Jenkins Operator will then automatically install plugins after the Jenkins master pod restart.

- -

Apply plugin’s config

- -

By using a ConfigMap you can create your own Jenkins customized configuration. -Then you must reference the ConfigMap in the Jenkins pod customization file in spec.groovyScripts or spec.configurationAsCode

- -

Create a ConfigMap with specific name (eg. jenkins-operator-user-configuration). Then, modify the Jenkins manifest:

-
apiVersion: jenkins.io/v1alpha2
-kind: Jenkins
-metadata:
-  name: example
-spec:
-  configurationAsCode:
-    configurations: 
-    - name: jenkins-operator-user-configuration
-  groovyScripts:
-    configurations:
-    - name: jenkins-operator-user-configuration
-

Here is an example of jenkins-operator-user-configuration:

-
apiVersion: v1
-kind: ConfigMap
-metadata:
-  name: jenkins-operator-user-configuration
-data:
-  1-configure-theme.groovy: | 
-    import jenkins.*
-    import jenkins.model.*
-    import hudson.*
-    import hudson.model.*
-    import org.jenkinsci.plugins.simpletheme.ThemeElement
-    import org.jenkinsci.plugins.simpletheme.CssTextThemeElement
-    import org.jenkinsci.plugins.simpletheme.CssUrlThemeElement
-
-    Jenkins jenkins = Jenkins.getInstance()
-
-    def decorator = Jenkins.instance.getDescriptorByType(org.codefirst.SimpleThemeDecorator.class)
-
-    List<ThemeElement> configElements = new ArrayList<>();
-    configElements.add(new CssTextThemeElement("DEFAULT"));
-    configElements.add(new CssUrlThemeElement("https://cdn.rawgit.com/afonsof/jenkins-material-theme/gh-pages/dist/material-light-green.css"));
-    decorator.setElements(configElements);
-    decorator.save();
-
-    jenkins.save()
-  1-system-message.yaml: |
-    jenkins:
-      systemMessage: "Configuration as Code integration works!!!"
-
    -
  • *.groovy is Groovy script configuration
  • -
  • *.yaml is configuration as code
  • -
- -

If you want to correct your configuration you can edit it while the Jenkins Operator is running. -Jenkins will reconcile and apply the new configuration.

- -

How to use secrets from a Groovy scripts

- -

If you configured spec.groovyScripts.secret.name, then this secret is available to use from map Groovy scripts. -The secrets are loaded to secrets map.

- -

Create a secret with for example the name jenkins-conf-secrets.

-
kind: Secret
-apiVersion: v1
-type: Opaque
-metadata:
-  name: jenkins-conf-secrets
-  namespace: default
-data:
-  SYSTEM_MESSAGE: SGVsbG8gd29ybGQ=
-

Then modify the Jenkins pod manifest by changing spec.groovyScripts.secret.name to jenkins-conf-secrets.

-
apiVersion: jenkins.io/v1alpha2
-kind: Jenkins
-metadata:
-  name: example
-spec:
-  configurationAsCode:
-    configurations: 
-    - name: jenkins-operator-user-configuration
-    secret:
-      name: jenkins-conf-secrets
-  groovyScripts:
-    configurations:
-    - name: jenkins-operator-user-configuration
-    secret:
-      name: jenkins-conf-secrets
-

Now you can test that the secret is mounted by applying this ConfigMap for Groovy script:

-
apiVersion: v1
-kind: ConfigMap
-metadata:
-  name: jenkins-operator-user-configuration
-data:
-  1-system-message.groovy: | 
-    import jenkins.*
-    import jenkins.model.*
-    import hudson.*
-    import hudson.model.*
-    Jenkins jenkins = Jenkins.getInstance()
-    
-    jenkins.setSystemMessage(secrets["SYSTEM_MESSAGE"])
-    jenkins.save()
-

Or by applying this configuration as code:

-
apiVersion: v1
-kind: ConfigMap
-metadata:
-  name: jenkins-operator-user-configuration
-data:
-  1-system-message.yaml: |
-    jenkins:
-      systemMessage: ${SYSTEM_MESSAGE}
-

After this, you should see the Hello world system message from the Jenkins homepage.

- - - -
Last modified October 1, 2021 -
-
- - -
-
-
- - - - -
- - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/docs/getting-started/v0.5.x/deploy-jenkins/index.html b/docs/docs/getting-started/v0.5.x/deploy-jenkins/index.html deleted file mode 100644 index e8888e389..000000000 --- a/docs/docs/getting-started/v0.5.x/deploy-jenkins/index.html +++ /dev/null @@ -1,1034 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Deploy Jenkins | Jenkins Operator - - - - - - - - - - - - - - - - - - - - - - - - - - - - Deploy Jenkins | Jenkins Operator - - -
- - - -
-
-
-
-
- - - - - -
- - - - -
- - - - -
-
- - - - - - - - - - - -
-
- - - -
-

Deploy Jenkins

-
Deploy production ready Jenkins Operator manifest
-

Once Jenkins Operator is up and running let’s deploy actual Jenkins instance. -Create manifest e.g. jenkins_instance.yaml with following data and save it on drive.

-
apiVersion: jenkins.io/v1alpha2
-kind: Jenkins
-metadata:
-  name: example
-spec:
-  master:
-    containers:
-    - name: jenkins-master
-      image: jenkins/jenkins:2.277.4-lts-alpine
-      imagePullPolicy: Always
-      livenessProbe:
-        failureThreshold: 12
-        httpGet:
-          path: /login
-          port: http
-          scheme: HTTP
-        initialDelaySeconds: 80
-        periodSeconds: 10
-        successThreshold: 1
-        timeoutSeconds: 5
-      readinessProbe:
-        failureThreshold: 3
-        httpGet:
-          path: /login
-          port: http
-          scheme: HTTP
-        initialDelaySeconds: 30
-        periodSeconds: 10
-        successThreshold: 1
-        timeoutSeconds: 1
-      resources:
-        limits:
-          cpu: 1500m
-          memory: 3Gi
-        requests:
-          cpu: "1"
-          memory: 500Mi
-  seedJobs:
-  - id: jenkins-operator
-    targets: "cicd/jobs/*.jenkins"
-    description: "Jenkins Operator repository"
-    repositoryBranch: master
-    repositoryUrl: https://github.com/jenkinsci/kubernetes-operator.git
-

Deploy a Jenkins to Kubernetes:

-
kubectl create -f jenkins_instance.yaml
-

Watch the Jenkins instance being created:

-
kubectl get pods -w
-

Get the Jenkins credentials:

-
kubectl get secret jenkins-operator-credentials-<cr_name> -o 'jsonpath={.data.user}' | base64 -d
-kubectl get secret jenkins-operator-credentials-<cr_name> -o 'jsonpath={.data.password}' | base64 -d
-

Connect to the Jenkins instance (minikube):

-
minikube service jenkins-operator-http-<cr_name> --url
-

Connect to the Jenkins instance (actual Kubernetes cluster):

-
kubectl port-forward jenkins-<cr_name> 8080:8080
-

Then open browser with address http://localhost:8080.

- -

jenkins

- - - -
Last modified January 25, 2021 -
-
- - -
-
-
- - - - -
- - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/docs/getting-started/v0.5.x/diagnostics/index.html b/docs/docs/getting-started/v0.5.x/diagnostics/index.html deleted file mode 100644 index 9783243fb..000000000 --- a/docs/docs/getting-started/v0.5.x/diagnostics/index.html +++ /dev/null @@ -1,991 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Diagnostics | Jenkins Operator - - - - - - - - - - - - - - - - - - - - - - - - - - - - Diagnostics | Jenkins Operator - - -
- - - -
-
-
-
-
- - - - - -
- - - - -
- - - - -
-
- - - - - - - - - - - - - -
-
- - - -
-

Diagnostics

-
How to deal with Jenkins Operator problems
- - -

Turn on debug in Jenkins Operator deployment:

-
sed -i 's|\(args:\).*|\1\ ["--debug"\]|' deploy/operator.yaml
-kubectl apply -f deploy/operator.yaml
-

Watch Kubernetes events:

-
kubectl get events --sort-by='{.lastTimestamp}'
-

Verify Jenkins master logs:

-
kubectl logs -f jenkins-<cr_name>
-

Verify the jenkins-operator logs:

-
kubectl logs deployment/jenkins-operator
-

Troubleshooting

- -

Delete the Jenkins master pod and wait for the new one to come up:

-
kubectl delete pod jenkins-<cr_name>
- - -
Last modified January 18, 2021 -
-
- - -
-
-
- - - - -
- - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/docs/getting-started/v0.5.x/index.html b/docs/docs/getting-started/v0.5.x/index.html deleted file mode 100644 index 5c4a7ab0d..000000000 --- a/docs/docs/getting-started/v0.5.x/index.html +++ /dev/null @@ -1,1234 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - -v0.5.x | Jenkins Operator - - - - - - - - - - - - - - - - - - - - v0.5.x | Jenkins Operator - - -
- - - -
-
-
-
-
- - - - - -
- - - - -
- - - - -
-
- - - - - - - - - - - - - -
-
- - - -
-

v0.5.x

-
How to work with Jenkins Operator 0.5.x version. We recommend migrating to a newer version.
- - - - -
-

This document describes a getting started guide for Jenkins Operator v0.5.x and also additional configuration.

- -
- - -

First Steps

- -

Prepare your Kubernetes cluster and set up your kubectl access.

- -

Once you have running Kubernetes cluster you can focus on installing Jenkins Operator according to the Installation guide.

- -
- - - - -
- - - - - - - - - - - - - - -
-
- Deploy Jenkins -
-

Deploy production ready Jenkins Operator manifest -

-
- - - - - - - - - - - - - - - - - -
-
- Configuration -
-

How to configure Jenkins with Operator -

-
- - - - - - - - - - - - - - - - - - - -
-
- Customization -
-

How to customize Jenkins -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- Configure backup and restore -
-

Prevent loss of job history -

-
- - - -
-
- AKS -
-

Additional configuration for Azure Kubernetes Service -

-
- - - -
-
- Custom Backup and Restore Providers -
-

Custom backup and restore provider -

-
- - - -
-
- Notifications -
-

How to setup operator notifications. -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- OpenShift -
-

Additional configuration for OpenShift -

-
- - - - - -
-
- Diagnostics -
-

How to deal with Jenkins Operator problems -

-
- - - -
-
- Schema -
-

API Schema definitions for Jenkins CRD -

-
- - - - - - - - - - - - - - - - - - - - - -
- - - -
Last modified August 19, 2021 -
-
- -
-
-
- - - - -
- - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/docs/getting-started/v0.5.x/index.xml b/docs/docs/getting-started/v0.5.x/index.xml deleted file mode 100644 index b6521d9c3..000000000 --- a/docs/docs/getting-started/v0.5.x/index.xml +++ /dev/null @@ -1,3735 +0,0 @@ - - - Jenkins Operator – v0.5.x - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.5.x/ - Recent Hugo news from gohugo.io - Hugo -- gohugo.io - Thu, 19 Aug 2021 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/img/hugo.png - GoHugo.io - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.5.x/ - - - - - - - - - - - - Docs: Deploy Jenkins - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.5.x/deploy-jenkins/ - Mon, 25 Jan 2021 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.5.x/deploy-jenkins/ - - - - <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: - name: example -spec: - master: - containers: - - name: jenkins-master - image: jenkins/jenkins:2.277.4-lts-alpine - imagePullPolicy: Always - livenessProbe: - failureThreshold: <span style="color:#0000cf;font-weight:bold">12</span> - httpGet: - path: /login - port: http - scheme: HTTP - initialDelaySeconds: <span style="color:#0000cf;font-weight:bold">80</span> - periodSeconds: <span style="color:#0000cf;font-weight:bold">10</span> - successThreshold: <span style="color:#0000cf;font-weight:bold">1</span> - timeoutSeconds: <span style="color:#0000cf;font-weight:bold">5</span> - readinessProbe: - failureThreshold: <span style="color:#0000cf;font-weight:bold">3</span> - httpGet: - path: /login - port: http - scheme: HTTP - initialDelaySeconds: <span style="color:#0000cf;font-weight:bold">30</span> - periodSeconds: <span style="color:#0000cf;font-weight:bold">10</span> - successThreshold: <span style="color:#0000cf;font-weight:bold">1</span> - timeoutSeconds: <span style="color:#0000cf;font-weight:bold">1</span> - resources: - limits: - cpu: 1500m - memory: 3Gi - requests: - cpu: <span style="color:#4e9a06">&#34;1&#34;</span> - memory: 500Mi - seedJobs: - - id: jenkins-operator - targets: <span style="color:#4e9a06">&#34;cicd/jobs/*.jenkins&#34;</span> - description: <span style="color:#4e9a06">&#34;Jenkins Operator repository&#34;</span> - repositoryBranch: master - repositoryUrl: https://github.com/jenkinsci/kubernetes-operator.git</code></pre></div> -<p>Deploy a Jenkins to 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> -<p>Get the Jenkins credentials:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl get secret jenkins-operator-credentials-&lt;cr_name&gt; -o <span style="color:#4e9a06">&#39;jsonpath={.data.user}&#39;</span> <span style="color:#000;font-weight:bold">|</span> base64 -d -kubectl get secret jenkins-operator-credentials-&lt;cr_name&gt; -o <span style="color:#4e9a06">&#39;jsonpath={.data.password}&#39;</span> <span style="color:#000;font-weight:bold">|</span> base64 -d</code></pre></div> -<p>Connect to the Jenkins instance (minikube):</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">minikube service jenkins-operator-http-&lt;cr_name&gt; --url</code></pre></div> -<p>Connect to the Jenkins instance (actual Kubernetes cluster):</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl port-forward jenkins-&lt;cr_name&gt; 8080:8080</code></pre></div> -<p>Then open browser with address <code>http://localhost:8080</code>.</p> - -<p><img src="https://jenkinsci.github.io/kubernetes-operator/kubernetes-operator/img/jenkins.png" alt="jenkins" /></p> - - - - - - Docs: Configuration - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.5.x/configuration/ - Fri, 01 Oct 2021 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.5.x/configuration/ - - - - - -<h2 id="configure-seed-jobs-and-pipelines">Configure Seed Jobs and Pipelines</h2> - -<p>Jenkins operator uses <a href="https://github.com/jenkinsci/job-dsl-plugin">job-dsl</a> and <a href="https://jenkinsci.github.io/kubernetes-credentials-provider-plugin/">kubernetes-credentials-provider</a> plugins for configuring jobs -and deploy keys.</p> - -<h2 id="prepare-job-definitions-and-pipelines">Prepare job definitions and pipelines</h2> - -<p>First you have to prepare pipelines and job definition in your GitHub repository using the following structure:</p> -<pre><code>cicd/ -├── jobs -│   └── k8s.jenkins -└── pipelines - └── k8s.jenkins</code></pre> -<p><strong><code>cicd/jobs/k8s.jenkins</code></strong> is a job definition:</p> -<pre><code>#!/usr/bin/env groovy - -pipelineJob('k8s-e2e') { - displayName('Kubernetes Plugin E2E Test') - - logRotator { - numToKeep(10) - daysToKeep(30) - } - - configure { project -> - project / 'properties' / 'org.jenkinsci.plugins.workflow.job.properties.DurabilityHintJobProperty' { - hint('PERFORMANCE_OPTIMIZED') - } - } - - definition { - cpsScm { - scm { - git { - remote { - url('https://github.com/jenkinsci/kubernetes-operator.git') - credentials('jenkins-operator') - } - branches('*/master') - } - } - scriptPath('cicd/pipelines/k8s.jenkins') - } - } -}</code></pre> -<p><strong><code>cicd/pipelines/k8s.jenkins</code></strong> is an actual Jenkins pipeline:</p> -<pre><code>#!/usr/bin/env groovy - -def label = "k8s-${UUID.randomUUID().toString()}" -def home = "/home/jenkins" -def workspace = "${home}/workspace/build-jenkins-operator" -def workdir = "${workspace}/src/github.com/jenkinsci/kubernetes-operator/" - -podTemplate(label: label, - containers: [ - containerTemplate(name: 'alpine', image: 'alpine:3.11', ttyEnabled: true, command: 'cat'), - ], - ) { - node(label) { - stage('Run shell') { - container('alpine') { - sh 'echo "hello world"' - } - } - } -}</code></pre> -<h2 id="configure-seed-jobs">Configure Seed Jobs</h2> - -<p>Jenkins Seed Jobs are configured using <code>Jenkins.spec.seedJobs</code> section from your custom resource manifest:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.io/v1alpha2<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>example<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>seedJobs<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>id<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>targets<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;cicd/jobs/*.jenkins&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>description<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Jenkins Operator repository&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>repositoryBranch<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>master<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>repositoryUrl<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>https<span style="color:#000;font-weight:bold">:</span>//github.com/jenkinsci/kubernetes-operator.git</code></pre></div> -<p><strong>Jenkins Operator</strong> will automatically discover and configure all the seed jobs.</p> - -<p>You can verify if deploy keys were successfully configured in the Jenkins <strong>Credentials</strong> tab.</p> - -<p><img src="https://jenkinsci.github.io/kubernetes-operator/kubernetes-operator/img/jenkins-credentials.png" alt="jenkins" /></p> - -<p>You can verify if your pipelines were successfully configured in the Jenkins Seed Job console output.</p> - -<p><img src="https://jenkinsci.github.io/kubernetes-operator/kubernetes-operator/img/jenkins-seed.png" alt="jenkins" /></p> - -<p>If your GitHub repository is <strong>private</strong> you have to configure SSH or username/password authentication.</p> - -<h3 id="ssh-authentication">SSH authentication</h3> - -<h4 id="generate-ssh-keys">Generate SSH Keys</h4> - -<p>There are two methods of SSH private key generation:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">$ openssl genrsa -out &lt;filename&gt; <span style="color:#0000cf;font-weight:bold">2048</span></code></pre></div> -<p>or</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">$ ssh-keygen -t rsa -b <span style="color:#0000cf;font-weight:bold">2048</span> -$ ssh-keygen -p -f &lt;filename&gt; -m pem</code></pre></div> -<p>Then copy content from generated file.</p> - -<h4 id="public-key">Public key</h4> - -<p>If you want to upload your public key to your Git server you need to extract it.</p> - -<p>If key was generated by <code>openssl</code> then you need to type this to extract public key:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">$ openssl rsa -in &lt;filename&gt; -pubout &gt; &lt;filename&gt;.pub</code></pre></div> -<p>If key was generated by <code>ssh-keygen</code> the public key content is located in <filename>.pub and there is no need to extract public key</p> - -<h4 id="configure-ssh-authentication">Configure SSH authentication</h4> - -<p>Configure a seed job like this:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.io/v1alpha2<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>example<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>seedJobs<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>id<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-ssh<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>credentialType<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>basicSSHUserPrivateKey<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>credentialID<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>k8s-ssh<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>targets<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;cicd/jobs/*.jenkins&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>description<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Jenkins Operator repository&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>repositoryBranch<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>master<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>repositoryUrl<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>git@github.com<span style="color:#000;font-weight:bold">:</span>jenkinsci/kubernetes-operator.git</code></pre></div> -<p>and create a Kubernetes Secret (name of secret should be the same from <code>credentialID</code> field):</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>v1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Secret<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>k8s-ssh<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>labels<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;jenkins.io/credentials-type&#34;</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;basicSSHUserPrivateKey&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>annotations<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:#4e9a06">&#34;jenkins.io/credentials-description&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;ssh github.com:jenkinsci/kubernetes-operator&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>stringData<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>privateKey<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">| -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">-----BEGIN RSA PRIVATE KEY-----</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>MIIJKAIBAAKCAgEAxxDpleJjMCN5nusfW/AtBAZhx8UVVlhhhIKXvQ+dFODQIdzO<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>oDXybs1zVHWOj31zqbbJnsfsVZ9Uf3p9k6xpJ3WFY9b85WasqTDN1xmSd6swD4N8<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>username<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>github_user_name</code></pre></div> -<h3 id="username-password-authentication">Username &amp; password authentication</h3> - -<p>Configure the seed job like:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.io/v1alpha2<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>example<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>seedJobs<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>id<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-user-pass<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>credentialType<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>usernamePassword<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>credentialID<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>k8s-user-pass<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>targets<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;cicd/jobs/*.jenkins&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>description<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Jenkins Operator repository&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>repositoryBranch<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>master<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>repositoryUrl<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>https<span style="color:#000;font-weight:bold">:</span>//github.com/jenkinsci/kubernetes-operator.git</code></pre></div> -<p>and create a Kubernetes Secret (name of secret should be the same from <code>credentialID</code> field):</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>v1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Secret<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>k8s-user-pass<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>stringData<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>username<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>github_user_name<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>password<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>password_or_token</code></pre></div> -<h3 id="external-authentication">External authentication</h3> - -<p>You can use <code>external</code> credential type if you want to configure authentication using Configuration As Code or Groovy Script.</p> - -<p>Example:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.io/v1alpha2<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>example<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>seedJobs<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>id<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-external<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>credentialType<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>external<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>credentialID<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>k8s-external<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>targets<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;cicd/jobs/*.jenkins&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>description<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Jenkins Operator repository&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>repositoryBranch<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>master<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>repositoryUrl<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>https<span style="color:#000;font-weight:bold">:</span>//github.com/jenkinsci/kubernetes-operator.git</code></pre></div> -<p>Remember that <code>credentialID</code> must match the id of the credentials configured in Jenkins. Consult the -<a href="https://www.jenkins.io/doc/book/using/using-credentials/">Jenkins docs for using credentials</a> for details.</p> - -<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 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"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-master<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>env<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>CURL_OPTIONS<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-L<span style="color:#f8f8f8;text-decoration:underline"> </span>-x<span style="color:#f8f8f8;text-decoration:underline"> </span>&lt;proxy_url&gt;</code></pre></div> -<p>In <code>CURL_OPTIONS</code> var you can set additional arguments to <code>curl</code> command.</p> - -<h2 id="pulling-docker-images-from-private-repositories">Pulling Docker images from private repositories</h2> - -<p>To pull a Docker Image from private repository you can use <code>imagePullSecrets</code>.</p> - -<p>Please follow the instructions on <a href="https://kubernetes.io/docs/concepts/containers/images/?origin_team=T42NTAGHM#creating-a-secret-with-a-docker-config">creating a secret with a docker config</a>.</p> - -<h3 id="docker-hub-configuration">Docker Hub Configuration</h3> - -<p>To use Docker Hub additional steps are required.</p> - -<p>Edit the previously created secret:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl -n &lt;namespace&gt; edit secret &lt;name&gt;</code></pre></div> -<p>The <code>.dockerconfigjson</code> key&rsquo;s value needs to be replaced with a modified version.</p> - -<p>After modifications, it needs to be encoded as a Base64 value before setting the <code>.dockerconfigjson</code> key.</p> - -<p>Example config file to modify and use:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-json" data-lang="json"><span style="color:#000;font-weight:bold">{</span> - <span style="color:#204a87;font-weight:bold">&#34;auths&#34;</span><span style="color:#000;font-weight:bold">:</span><span style="color:#000;font-weight:bold">{</span> - <span style="color:#204a87;font-weight:bold">&#34;https://index.docker.io/v1/&#34;</span><span style="color:#000;font-weight:bold">:</span><span style="color:#000;font-weight:bold">{</span> - <span style="color:#204a87;font-weight:bold">&#34;username&#34;</span><span style="color:#000;font-weight:bold">:</span><span style="color:#4e9a06">&#34;user&#34;</span><span style="color:#000;font-weight:bold">,</span> - <span style="color:#204a87;font-weight:bold">&#34;password&#34;</span><span style="color:#000;font-weight:bold">:</span><span style="color:#4e9a06">&#34;password&#34;</span><span style="color:#000;font-weight:bold">,</span> - <span style="color:#204a87;font-weight:bold">&#34;email&#34;</span><span style="color:#000;font-weight:bold">:</span><span style="color:#4e9a06">&#34;yourdockeremail@gmail.com&#34;</span><span style="color:#000;font-weight:bold">,</span> - <span style="color:#204a87;font-weight:bold">&#34;auth&#34;</span><span style="color:#000;font-weight:bold">:</span><span style="color:#4e9a06">&#34;base64 of string user:password&#34;</span> - <span style="color:#000;font-weight:bold">}</span><span style="color:#000;font-weight:bold">,</span> - <span style="color:#204a87;font-weight:bold">&#34;auth.docker.io&#34;</span><span style="color:#000;font-weight:bold">:</span><span style="color:#000;font-weight:bold">{</span> - <span style="color:#204a87;font-weight:bold">&#34;username&#34;</span><span style="color:#000;font-weight:bold">:</span><span style="color:#4e9a06">&#34;user&#34;</span><span style="color:#000;font-weight:bold">,</span> - <span style="color:#204a87;font-weight:bold">&#34;password&#34;</span><span style="color:#000;font-weight:bold">:</span><span style="color:#4e9a06">&#34;password&#34;</span><span style="color:#000;font-weight:bold">,</span> - <span style="color:#204a87;font-weight:bold">&#34;email&#34;</span><span style="color:#000;font-weight:bold">:</span><span style="color:#4e9a06">&#34;yourdockeremail@gmail.com&#34;</span><span style="color:#000;font-weight:bold">,</span> - <span style="color:#204a87;font-weight:bold">&#34;auth&#34;</span><span style="color:#000;font-weight:bold">:</span><span style="color:#4e9a06">&#34;base64 of string user:password&#34;</span> - <span style="color:#000;font-weight:bold">}</span><span style="color:#000;font-weight:bold">,</span> - <span style="color:#204a87;font-weight:bold">&#34;registry.docker.io&#34;</span><span style="color:#000;font-weight:bold">:</span><span style="color:#000;font-weight:bold">{</span> - <span style="color:#204a87;font-weight:bold">&#34;username&#34;</span><span style="color:#000;font-weight:bold">:</span><span style="color:#4e9a06">&#34;user&#34;</span><span style="color:#000;font-weight:bold">,</span> - <span style="color:#204a87;font-weight:bold">&#34;password&#34;</span><span style="color:#000;font-weight:bold">:</span><span style="color:#4e9a06">&#34;password&#34;</span><span style="color:#000;font-weight:bold">,</span> - <span style="color:#204a87;font-weight:bold">&#34;email&#34;</span><span style="color:#000;font-weight:bold">:</span><span style="color:#4e9a06">&#34;yourdockeremail@gmail.com&#34;</span><span style="color:#000;font-weight:bold">,</span> - <span style="color:#204a87;font-weight:bold">&#34;auth&#34;</span><span style="color:#000;font-weight:bold">:</span><span style="color:#4e9a06">&#34;base64 of string user:password&#34;</span> - <span style="color:#000;font-weight:bold">}</span><span style="color:#000;font-weight:bold">,</span> - <span style="color:#204a87;font-weight:bold">&#34;docker.io&#34;</span><span style="color:#000;font-weight:bold">:</span><span style="color:#000;font-weight:bold">{</span> - <span style="color:#204a87;font-weight:bold">&#34;username&#34;</span><span style="color:#000;font-weight:bold">:</span><span style="color:#4e9a06">&#34;user&#34;</span><span style="color:#000;font-weight:bold">,</span> - <span style="color:#204a87;font-weight:bold">&#34;password&#34;</span><span style="color:#000;font-weight:bold">:</span><span style="color:#4e9a06">&#34;password&#34;</span><span style="color:#000;font-weight:bold">,</span> - <span style="color:#204a87;font-weight:bold">&#34;email&#34;</span><span style="color:#000;font-weight:bold">:</span><span style="color:#4e9a06">&#34;yourdockeremail@gmail.com&#34;</span><span style="color:#000;font-weight:bold">,</span> - <span style="color:#204a87;font-weight:bold">&#34;auth&#34;</span><span style="color:#000;font-weight:bold">:</span><span style="color:#4e9a06">&#34;base64 of string user:password&#34;</span> - <span style="color:#000;font-weight:bold">}</span><span style="color:#000;font-weight:bold">,</span> - <span style="color:#204a87;font-weight:bold">&#34;https://registry-1.docker.io/v2/&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">{</span> - <span style="color:#204a87;font-weight:bold">&#34;username&#34;</span><span style="color:#000;font-weight:bold">:</span><span style="color:#4e9a06">&#34;user&#34;</span><span style="color:#000;font-weight:bold">,</span> - <span style="color:#204a87;font-weight:bold">&#34;password&#34;</span><span style="color:#000;font-weight:bold">:</span><span style="color:#4e9a06">&#34;password&#34;</span><span style="color:#000;font-weight:bold">,</span> - <span style="color:#204a87;font-weight:bold">&#34;email&#34;</span><span style="color:#000;font-weight:bold">:</span><span style="color:#4e9a06">&#34;yourdockeremail@gmail.com&#34;</span><span style="color:#000;font-weight:bold">,</span> - <span style="color:#204a87;font-weight:bold">&#34;auth&#34;</span><span style="color:#000;font-weight:bold">:</span><span style="color:#4e9a06">&#34;base64 of string user:password&#34;</span> - <span style="color:#000;font-weight:bold">}</span><span style="color:#000;font-weight:bold">,</span> - <span style="color:#204a87;font-weight:bold">&#34;registry-1.docker.io/v2/&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">{</span> - <span style="color:#204a87;font-weight:bold">&#34;username&#34;</span><span style="color:#000;font-weight:bold">:</span><span style="color:#4e9a06">&#34;user&#34;</span><span style="color:#000;font-weight:bold">,</span> - <span style="color:#204a87;font-weight:bold">&#34;password&#34;</span><span style="color:#000;font-weight:bold">:</span><span style="color:#4e9a06">&#34;password&#34;</span><span style="color:#000;font-weight:bold">,</span> - <span style="color:#204a87;font-weight:bold">&#34;email&#34;</span><span style="color:#000;font-weight:bold">:</span><span style="color:#4e9a06">&#34;yourdockeremail@gmail.com&#34;</span><span style="color:#000;font-weight:bold">,</span> - <span style="color:#204a87;font-weight:bold">&#34;auth&#34;</span><span style="color:#000;font-weight:bold">:</span><span style="color:#4e9a06">&#34;base64 of string user:password&#34;</span> - <span style="color:#000;font-weight:bold">}</span><span style="color:#000;font-weight:bold">,</span> - <span style="color:#204a87;font-weight:bold">&#34;registry-1.docker.io&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">{</span> - <span style="color:#204a87;font-weight:bold">&#34;username&#34;</span><span style="color:#000;font-weight:bold">:</span><span style="color:#4e9a06">&#34;user&#34;</span><span style="color:#000;font-weight:bold">,</span> - <span style="color:#204a87;font-weight:bold">&#34;password&#34;</span><span style="color:#000;font-weight:bold">:</span><span style="color:#4e9a06">&#34;password&#34;</span><span style="color:#000;font-weight:bold">,</span> - <span style="color:#204a87;font-weight:bold">&#34;email&#34;</span><span style="color:#000;font-weight:bold">:</span><span style="color:#4e9a06">&#34;yourdockeremail@gmail.com&#34;</span><span style="color:#000;font-weight:bold">,</span> - <span style="color:#204a87;font-weight:bold">&#34;auth&#34;</span><span style="color:#000;font-weight:bold">:</span><span style="color:#4e9a06">&#34;base64 of string user:password&#34;</span> - <span style="color:#000;font-weight:bold">}</span><span style="color:#000;font-weight:bold">,</span> - <span style="color:#204a87;font-weight:bold">&#34;https://registry-1.docker.io&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">{</span> - <span style="color:#204a87;font-weight:bold">&#34;username&#34;</span><span style="color:#000;font-weight:bold">:</span><span style="color:#4e9a06">&#34;user&#34;</span><span style="color:#000;font-weight:bold">,</span> - <span style="color:#204a87;font-weight:bold">&#34;password&#34;</span><span style="color:#000;font-weight:bold">:</span><span style="color:#4e9a06">&#34;password&#34;</span><span style="color:#000;font-weight:bold">,</span> - <span style="color:#204a87;font-weight:bold">&#34;email&#34;</span><span style="color:#000;font-weight:bold">:</span><span style="color:#4e9a06">&#34;yourdockeremail@gmail.com&#34;</span><span style="color:#000;font-weight:bold">,</span> - <span style="color:#204a87;font-weight:bold">&#34;auth&#34;</span><span style="color:#000;font-weight:bold">:</span><span style="color:#4e9a06">&#34;base64 of string user:password&#34;</span> - <span style="color:#000;font-weight:bold">}</span> - <span style="color:#000;font-weight:bold">}</span> -<span style="color:#000;font-weight:bold">}</span></code></pre></div> - - - - - Docs: Customization - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.5.x/customization/ - Fri, 01 Oct 2021 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.5.x/customization/ - - - - - -<h2 id="how-to-customize-jenkins">How to customize Jenkins</h2> - -<p>Jenkins can be customized with plugins. -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:</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> - -<h4 id="install-plugins">Install plugins</h4> - -<p>Edit Custom Resource under <code>spec.master.plugins</code>:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.io/v1alpha2<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>example<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>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>plugins<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>simple-theme-plugin<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;0.6&#34;</span></code></pre></div> -<p>Under <code>spec.master.basePlugins</code> you can find plugins for a valid <strong>Jenkins Operator</strong>:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.io/v1alpha2<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>example<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>master<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>basePlugins<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>kubernetes<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#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.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.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.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> - -<h4 id="apply-plugin-s-config">Apply plugin&rsquo;s config</h4> - -<p>By using a <a href="https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/">ConfigMap</a> you can create your own <strong>Jenkins</strong> customized configuration. -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>Create a <strong><code>ConfigMap</code></strong> with specific name (eg. <code>jenkins-operator-user-configuration</code>). Then, modify the <strong>Jenkins</strong> manifest:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.io/v1alpha2<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>example<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurationAsCode<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurations<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-user-configuration<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>groovyScripts<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurations<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-user-configuration</code></pre></div> -<p>Here is an example of <code>jenkins-operator-user-configuration</code>:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>v1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>ConfigMap<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-user-configuration<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>data<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>-configure-theme.groovy<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">| -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">import jenkins.*</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.model.*<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>hudson.*<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>hudson.model.*<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>org.jenkinsci.plugins.simpletheme.ThemeElement<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>org.jenkinsci.plugins.simpletheme.CssTextThemeElement<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>org.jenkinsci.plugins.simpletheme.CssUrlThemeElement<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins<span style="color:#f8f8f8;text-decoration:underline"> </span>=<span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins.getInstance()<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>def<span style="color:#f8f8f8;text-decoration:underline"> </span>decorator<span style="color:#f8f8f8;text-decoration:underline"> </span>=<span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins.instance.getDescriptorByType(org.codefirst.SimpleThemeDecorator.class)<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>List&lt;ThemeElement&gt;<span style="color:#f8f8f8;text-decoration:underline"> </span>configElements<span style="color:#f8f8f8;text-decoration:underline"> </span>=<span style="color:#f8f8f8;text-decoration:underline"> </span>new<span style="color:#f8f8f8;text-decoration:underline"> </span>ArrayList&lt;&gt;();<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configElements.add(new<span style="color:#f8f8f8;text-decoration:underline"> </span>CssTextThemeElement(<span style="color:#4e9a06">&#34;DEFAULT&#34;</span>));<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configElements.add(new<span style="color:#f8f8f8;text-decoration:underline"> </span>CssUrlThemeElement(<span style="color:#4e9a06">&#34;https://cdn.rawgit.com/afonsof/jenkins-material-theme/gh-pages/dist/material-light-green.css&#34;</span>));<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>decorator.setElements(configElements);<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>decorator.save();<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.save()<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>-system-message.yaml<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">| -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">jenkins:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>systemMessage<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Configuration as Code integration works!!!&#34;</span></code></pre></div> -<ul> -<li><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. -Jenkins will reconcile and apply the new configuration.</p> - -<h2 id="how-to-use-secrets-from-a-groovy-scripts">How to use secrets from a Groovy scripts</h2> - -<p>If you configured <code>spec.groovyScripts.secret.name</code>, then this secret is available to use from map Groovy scripts. -The secrets are loaded to <code>secrets</code> map.</p> - -<p>Create a <a href="https://kubernetes.io/docs/concepts/configuration/secret/">secret</a> with for example the name <code>jenkins-conf-secrets</code>.</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Secret<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>v1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>type<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Opaque<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-conf-secrets<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>namespace<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>default<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>data<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>SYSTEM_MESSAGE<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>SGVsbG8gd29ybGQ=</code></pre></div> -<p>Then modify the <strong>Jenkins</strong> pod manifest by changing <code>spec.groovyScripts.secret.name</code> to <code>jenkins-conf-secrets</code>.</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.io/v1alpha2<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>example<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurationAsCode<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurations<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-user-configuration<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>secret<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-conf-secrets<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>groovyScripts<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurations<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-user-configuration<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>secret<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-conf-secrets</code></pre></div> -<p>Now you can test that the secret is mounted by applying this <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"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-user-configuration<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>data<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>-system-message.groovy<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">| -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">import jenkins.*</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.model.*<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>hudson.*<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>hudson.model.*<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins<span style="color:#f8f8f8;text-decoration:underline"> </span>=<span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins.getInstance()<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.setSystemMessage(secrets<span style="color:#000;font-weight:bold">[</span><span style="color:#4e9a06">&#34;SYSTEM_MESSAGE&#34;</span><span style="color:#000;font-weight:bold">]</span>)<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.save()</code></pre></div> -<p>Or by applying this configuration as code:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>v1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>ConfigMap<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-user-configuration<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>data<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>-system-message.yaml<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">| -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">jenkins:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>systemMessage<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>${SYSTEM_MESSAGE}</code></pre></div> -<p>After this, you should see the <code>Hello world</code> system message from the <strong>Jenkins</strong> homepage.</p> - - - - - - Docs: Configure backup and restore - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.5.x/configure-backup-and-restore/ - Mon, 25 Jan 2021 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.5.x/configure-backup-and-restore/ - - - - - -<p>Backup and restore is done by a container sidecar.</p> - -<h3 id="pvc">PVC</h3> - -<h4 id="create-pvc">Create PVC</h4> - -<p>Save to the file named pvc.yaml:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>v1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>PersistentVolumeClaim<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>&lt;pvc_name<span style="color:#8f5902;font-style:italic">&gt; -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">namespace: &lt;namespace&gt;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>accessModes<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>ReadWriteOnce<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>requests<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>storage<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>500Gi</code></pre></div> -<p>Run the following command:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">$ kubectl -n &lt;namespace&gt; create -f pvc.yaml</code></pre></div> -<h4 id="configure-jenkins-cr">Configure Jenkins CR</h4> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.io/v1alpha2<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>&lt;cr_name<span style="color:#8f5902;font-style:italic">&gt; -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">namespace: &lt;namespace&gt;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>master<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>securityContext<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>runAsUser<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1000</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>fsGroup<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1000</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>containers<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-master<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>image<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins/jenkins<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">2.263</span><span style="color:#0000cf;font-weight:bold">.2</span>-lts-alpine<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># container responsible for the backup and restore</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>env<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>BACKUP_DIR<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/backup<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>JENKINS_HOME<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/jenkins-home<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>BACKUP_COUNT<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;3&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># keep only the 2 most recent backups</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>image<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>virtuslab/jenkins-operator-backup-pvc<span style="color:#000;font-weight:bold">:</span>v0<span style="color:#0000cf;font-weight:bold">.1</span><span style="color:#0000cf;font-weight:bold">.0</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># look at backup/pvc directory</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>imagePullPolicy<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>IfNotPresent<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>volumeMounts<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>mountPath<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/jenkins-home<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># Jenkins home volume</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-home<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>mountPath<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># backup volume</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>volumes<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># PVC volume where backups will be stored</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>persistentVolumeClaim<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>claimName<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>&lt;pvc_name<span style="color:#8f5902;font-style:italic">&gt; -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">backup:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>containerName<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># container name is responsible for backup</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>action<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>command<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>/home/user/bin/backup.sh<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># this command is invoked on &#34;backup&#34; container to make backup, for example /home/user/bin/backup.sh &lt;backup_number&gt;, &lt;backup_number&gt; is passed by operator</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>interval<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">30</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># how often make backup in seconds</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>makeBackupBeforePodDeletion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">true</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># make a backup before pod deletion</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>restore<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>containerName<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># container name is responsible for restore backup</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>action<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>command<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>/home/user/bin/restore.sh<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># this command is invoked on &#34;backup&#34; container to make restore backup, for example /home/user/bin/restore.sh &lt;backup_number&gt;, &lt;backup_number&gt; is passed by operator</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>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; 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> - - - - - Docs: AKS - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.5.x/aks/ - Mon, 18 Jan 2021 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.5.x/aks/ - - - - <p>Azure AKS managed Kubernetes service adds to every pod the following environment variables:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>KUBERNETES_PORT_443_TCP_ADDR<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>KUBERNETES_PORT<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>tcp<span style="color:#000;font-weight:bold">:</span>//<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>KUBERNETES_PORT_443_TCP<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>tcp<span style="color:#000;font-weight:bold">:</span>//<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>KUBERNETES_SERVICE_HOST<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span></code></pre></div> -<p>The operator is aware of it and omits these environment variables when checking if a Jenkins pod environment has been changed. It prevents the -restart of a Jenkins pod over and over again.</p> - - - - - - Docs: Custom Backup and Restore Providers - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.5.x/custom-backup-and-restore/ - Mon, 18 Jan 2021 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.5.x/custom-backup-and-restore/ - - - - - -<p>With enough effort one can create a custom backup and restore provider -for the Jenkins Operator.</p> - -<h2 id="requirements">Requirements</h2> - -<p>Two commands (e.g. scripts) are required:</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> - -<p>One of those scripts (or the entry point of the container) needs to be responsible -for backup cleanup or rotation if required, or an external system.</p> - -<h2 id="how-it-works">How it works</h2> - -<p>The mechanism relies on basic Kubernetes and UNIX functionalities.</p> - -<p>The backup (and restore) container runs as a sidecar in the same -Kubernetes pod as the Jenkins master.</p> - -<p>Name of the backup and restore containers can be set as necessary using -<code>spec.backup.containerName</code> and <code>spec.restore.containerName</code>. -In most cases it will be the same container, but we allow for less common use cases.</p> - -<p>The operator will call a backup or restore commands inside a sidecar container when necessary:</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> - -<p>This example shows abbreviated version of a simple AWS S3 backup implementation -using: <code>aws-cli</code>, <code>bash</code> and <code>kube2iam</code>.</p> - -<p>In addition to your normal <code>Jenkins</code> <code>CustomResource</code> some additional settings -for backup and restore are required, e.g.:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.io/v1alpha1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>example<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>namespace<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>master<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>masterAnnotations<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>iam.amazonaws.com/role<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;my-example-backup-role&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># tell kube2iam where the AWS IAM role is</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>containers<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-master<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>...<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># container responsible for backup and restore</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>image<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>quay.io/virtuslab/aws-cli<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.16</span><span style="color:#0000cf;font-weight:bold">.263</span><span style="color:#0000cf;font-weight:bold">-2</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>workingDir<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/home/user/bin/<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>command<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># our container entry point</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>sleep<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>infinity<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>env<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>BACKUP_BUCKET<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>my-example-bucket<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># the S3 bucket name to use</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>BACKUP_PATH<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>my-backup-path<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># the S3 bucket path prefix to use</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>JENKINS_HOME<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/jenkins-home<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># the path to mount jenkins home dir in the backup container</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>volumeMounts<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>mountPath<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/jenkins-home<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># Jenkins home volume</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-home<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>mountPath<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/home/user/bin/backup.sh<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup-scripts<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>subPath<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup.sh<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>readOnly<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">true</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>mountPath<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/home/user/bin/restore.sh<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup-scripts<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>subPath<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>restore.sh<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>readOnly<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">true</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>volumes<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup-scripts<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configMap<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>defaultMode<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">0754</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-backup-s3<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>securityContext<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># make sure both containers use the same UID and GUID</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>runAsUser<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1000</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>fsGroup<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1000</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>...<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>containerName<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># container name responsible for backup</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>interval<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">3600</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># how often make a backup in seconds</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>makeBackupBeforePodDeletion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">true</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># trigger backup just before deleting the pod</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>action<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>command<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># this command is invoked on &#34;backup&#34; container to create a backup,</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># &lt;backup_number&gt; is passed by operator,</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># for example /home/user/bin/backup.sh &lt;backup_number&gt;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>/home/user/bin/backup.sh<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>restore<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>containerName<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># container name is responsible for restore backup</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>action<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>command<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># this command is invoked on &#34;backup&#34; container to restore a backup,</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># &lt;backup_number&gt; is passed by operator</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># for example /home/user/bin/restore.sh &lt;backup_number&gt;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>/home/user/bin/restore.sh<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#8f5902;font-style:italic"># recoveryOnce: &lt;backup_number&gt; # if want to restore specific backup configure this field and then Jenkins will be restarted and desired backup will be restored</span></code></pre></div> -<p>The actual backup and restore scripts will be provided in a <code>ConfigMap</code>:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>ConfigMap<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>v1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-backup-s3<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>namespace<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>labels<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>app<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>data<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup.sh<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>|<span style="color:#8f5902;font-style:italic">- -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">#!/bin/bash -xeu</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">[</span><span style="color:#f8f8f8;text-decoration:underline"> </span>!<span style="color:#f8f8f8;text-decoration:underline"> </span>$<span style="color:#8f5902;font-style:italic"># -eq 1 ]] &amp;&amp; echo &#34;Usage: $0 backup_number&#34; &amp;&amp; exit 1;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">[</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-z<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;${BACKUP_BUCKET}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">]</span><span style="color:#000;font-weight:bold">]</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Required &#39;BACKUP_BUCKET&#39; env not set&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exit<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>;<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">[</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-z<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;${BACKUP_PATH}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">]</span><span style="color:#000;font-weight:bold">]</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Required &#39;BACKUP_PATH&#39; env not set&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exit<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>;<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">[</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-z<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;${JENKINS_HOME}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">]</span><span style="color:#000;font-weight:bold">]</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Required &#39;JENKINS_HOME&#39; env not set&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exit<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>;<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup_number=$<span style="color:#0000cf;font-weight:bold">1</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Running backup #${backup_number}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>BACKUP_TMP_DIR=$(mktemp<span style="color:#f8f8f8;text-decoration:underline"> </span>-d)<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>tar<span style="color:#f8f8f8;text-decoration:underline"> </span>-C<span style="color:#f8f8f8;text-decoration:underline"> </span>${JENKINS_HOME}<span style="color:#f8f8f8;text-decoration:underline"> </span>-czf<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;${BACKUP_TMP_DIR}/${backup_number}.tar.gz&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>--exclude<span style="color:#f8f8f8;text-decoration:underline"> </span>jobs/<span style="color:#8f5902;font-style:italic">*/workspace*</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-c<span style="color:#f8f8f8;text-decoration:underline"> </span>jobs<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>\<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>aws<span style="color:#f8f8f8;text-decoration:underline"> </span>s3<span style="color:#f8f8f8;text-decoration:underline"> </span>cp<span style="color:#f8f8f8;text-decoration:underline"> </span>${BACKUP_TMP_DIR}/${backup_number}.tar.gz<span style="color:#f8f8f8;text-decoration:underline"> </span>s3<span style="color:#000;font-weight:bold">:</span>//${BACKUP_BUCKET}/${BACKUP_PATH}/${backup_number}.tar.gz<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span>Done<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>restore.sh<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>|<span style="color:#8f5902;font-style:italic">- -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">#!/bin/bash -xeu</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">[</span><span style="color:#f8f8f8;text-decoration:underline"> </span>!<span style="color:#f8f8f8;text-decoration:underline"> </span>$<span style="color:#8f5902;font-style:italic"># -eq 1 ]] &amp;&amp; echo &#34;Usage: $0 backup_number&#34; &amp;&amp; exit 1</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">[</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-z<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;${BACKUP_BUCKET}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">]</span><span style="color:#000;font-weight:bold">]</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Required &#39;BACKUP_BUCKET&#39; env not set&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exit<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>;<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">[</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-z<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;${BACKUP_PATH}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">]</span><span style="color:#000;font-weight:bold">]</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Required &#39;BACKUP_PATH&#39; env not set&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exit<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>;<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">[</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-z<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;${JENKINS_HOME}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">]</span><span style="color:#000;font-weight:bold">]</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Required &#39;JENKINS_HOME&#39; env not set&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exit<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>;<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup_number=$<span style="color:#0000cf;font-weight:bold">1</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Running restore #${backup_number}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>BACKUP_TMP_DIR=$(mktemp<span style="color:#f8f8f8;text-decoration:underline"> </span>-d)<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>aws<span style="color:#f8f8f8;text-decoration:underline"> </span>s3<span style="color:#f8f8f8;text-decoration:underline"> </span>cp<span style="color:#f8f8f8;text-decoration:underline"> </span>s3<span style="color:#000;font-weight:bold">:</span>//${BACKUP_BUCKET}/${BACKUP_PATH}/${backup_number}.tar.gz<span style="color:#f8f8f8;text-decoration:underline"> </span>${BACKUP_TMP_DIR}/${backup_number}.tar.gz<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>tar<span style="color:#f8f8f8;text-decoration:underline"> </span>-C<span style="color:#f8f8f8;text-decoration:underline"> </span>${JENKINS_HOME}<span style="color:#f8f8f8;text-decoration:underline"> </span>-zxf<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;${BACKUP_TMP_DIR}/${backup_number}.tar.gz&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span>Done</code></pre></div> -<p>In our example we will use S3 bucket lifecycle policy to keep -the number of backups under control, e.g. Cloud Formation fragment:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#f8f8f8;text-decoration:underline"> </span>Type<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>AWS<span style="color:#000;font-weight:bold">:</span><span style="color:#000;font-weight:bold">:</span>S3<span style="color:#000;font-weight:bold">:</span><span style="color:#000;font-weight:bold">:</span>Bucket<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Properties<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>BucketName<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>my-example-bucket<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>...<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>LifecycleConfiguration<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Rules<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>Id<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>BackupCleanup<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Status<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Enabled<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Prefix<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>my-backup-path<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>ExpirationInDays<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">7</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>NoncurrentVersionExpirationInDays<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">14</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>AbortIncompleteMultipartUpload<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>DaysAfterInitiation<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">3</span></code></pre></div> - - - - - Docs: Notifications - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.5.x/notifications/ - Mon, 18 Jan 2021 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.5.x/notifications/ - - - - - -<h2 id="slack">Slack</h2> - -<p>Please follow <a href="https://api.slack.com/incoming-webhooks">this</a> instructions to get web hook URL.</p> - -<p>Create web hook secret with name <code>jenkins-operator-notification-data</code>. Contains key <code>url</code> with provided web hook URL.</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">$ kubectl create secret generic jenkins-operator-notification-data --from-literal<span style="color:#ce5c00;font-weight:bold">=</span><span style="color:#000">url</span><span style="color:#ce5c00;font-weight:bold">=</span>&lt;webhook_url&gt;</code></pre></div> -<p>Example configuration for Slack:</p> -<pre><code>kind: Jenkins -spec: - master: - notifications: - - level: info - verbose: true - name: <name> - slack: - webHookURLSecretKeySelector: - secret: - name: <secret_name> - key: <key></code></pre> -<h2 id="microsoft-teams">Microsoft Teams</h2> - -<p>Please follow <a href="https://docs.microsoft.com/en-gb/outlook/actionable-messages/send-via-connectors">this</a> instructions to get web hook URL.</p> - -<p>Example configuration for Microsoft Teams:</p> -<pre><code>kind: Jenkins -spec: - master: - notifications: - - level: info - verbose: true - name: <name> - teams: - webHookURLSecretKeySelector: - secret: - name: <secret_name> - key: <key></code></pre> -<h2 id="mailgun">Mailgun</h2> - -<p>Example configuration for Mailgun:</p> -<pre><code>kind: Jenkins -spec: - master: - notifications: - - level: info - verbose: true - name: <name> - mailgun: - domain: <domain> - apiKeySecretKeySelector: - secret: - name: <secret_name> - key: <key> - recipient: <your_email> - from: <mailgun_email></code></pre> -<h2 id="debug-options">Debug options</h2> - -<p>As you see there is two debugging options:</p> - -<ul> -<li><p><code>level</code> (warning/info) - Set level of messages to send.</p></li> - -<li><p><code>verbose</code> - Print stacktrace and additional error messages</p></li> -</ul> - -<h2 id="multiple-providers">Multiple providers</h2> - -<p>You can use multiple providers to send notification to another communication channels at the same time. -For example you will send notifications to Slack and Teams.</p> -<pre><code>kind: Jenkins -spec: - master: - notifications: - - level: info - verbose: true - name: nslack - slack: - webHookURLSecretKeySelector: - secret: - name: <secret_name> - key: <key> - - level: info - verbose: true - name: nteams - teams: - webHookURLSecretKeySelector: - secret: - name: <secret_name> - key: <key></code></pre> - - - - - Docs: OpenShift - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.5.x/openshift/ - Wed, 29 Apr 2020 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.5.x/openshift/ - - - - - -<h2 id="securitycontext">SecurityContext</h2> - -<p>OpenShift enforces Security Constraints Context (scc) when deploying an image. -By default, container images run in restricted scc which prevents from setting -a fixed user id to run with. You need to have ensure that you do not provide a -securityContext with a runAsUser and that your image does not use a hardcoded user.</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">securityContext<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>{}</code></pre></div> -<h2 id="openshift-jenkins-image">OpenShift Jenkins image</h2> - -<p>OpenShift provides a pre-configured Jenkins image containing 3 openshift plugins for -jenkins (openshift-login-plugin, openshift-sync-plugin and openshift-client-plugin) -which allows better jenkins integration with kubernetes and OpenShift.</p> - -<p>The OpenShift Jenkins image requires additional configuration to be fully enabled.</p> - -<h3 id="sample-openshift-cr">Sample OpenShift CR</h3> - -<p>The following Custom Resource can be used to create a Jenkins instance using the<br /> -OpenShift Jenkins image and sets values for: -- `image: &lsquo;quay.io/openshift/origin-jenkins:latest&rsquo; : This is the OpenShift Jenkins image.</p> - -<ul> -<li><p>serviceAccount: to allow oauth authentication to work, the service account needs -a specific annotation pointing to the route exposing the jenkins service. Here, -the route is named <code>jenkins-route</code></p></li> - -<li><p><code>OPENSHIFT_ENABLE_OAUTH</code> environment variable for the master container is set to true.</p></li> -</ul> - -<p>Here is a complete Jenkins CR allowing the deployment of the Jenkins OpenShift image.</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>annotations<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.io/openshift-mode<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#39;true&#39;</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<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>serviceAccount<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>annotations<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>serviceaccounts.openshift.io/oauth-redirectreference.jenkins<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#39;{&#34;kind&#34;:&#34;OAuthRedirectReference&#34;,&#34;apiVersion&#34;:&#34;v1&#34;,&#34;reference&#34;:{&#34;kind&#34;:&#34;Route&#34;,&#34;name&#34;:&#34;jenkins-route&#34;}}&#39;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>master<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>containers<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-master<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>image<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#39;quay.io/openshift/origin-jenkins:latest&#39;</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>/usr/bin/go-init<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:#4e9a06">&#39;-main&#39;</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>/usr/libexec/s2i/run<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>env<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>OPENSHIFT_ENABLE_OAUTH<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#39;true&#39;</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>OPENSHIFT_ENABLE_REDIRECT_PROMPT<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#39;true&#39;</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>DISABLE_ADMINISTRATIVE_MONITORS<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#39;false&#39;</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_MASTER<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#39;https://kubernetes.default:443&#39;</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_TRUST_CERTIFICATES<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#39;true&#39;</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_SERVICE_NAME<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-http-jenkins<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>JNLP_SERVICE_NAME<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-slave-jenkins<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_UC_INSECURE<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#39;false&#39;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>JENKINS_HOME<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/var/lib/jenkins<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>JAVA_OPTS<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>&gt;<span style="color:#8f5902;font-style:italic">- -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">-XX:+UnlockExperimentalVMOptions -XX:+UnlockExperimentalVMOptions</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-XX<span style="color:#000;font-weight:bold">:</span>+UseCGroupMemoryLimitForHeap<span style="color:#f8f8f8;text-decoration:underline"> </span>-XX<span style="color:#000;font-weight:bold">:</span>MaxRAMFraction=<span style="color:#0000cf;font-weight:bold">1</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-Djenkins.install.runSetupWizard=<span style="color:#204a87;font-weight:bold">false</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-Djava.awt.headless=<span style="color:#204a87;font-weight:bold">true</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>imagePullPolicy<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Always<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>service<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>port<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">8080</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>type<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>ClusterIP<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>slaveService<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>port<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">50000</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>type<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>ClusterIP</code></pre></div> -<h3 id="openshift-oauth-integration">OpenShift OAuth integration</h3> - -<p>The creation of a Route is required for the integraiton of Jenkins with -OpenShift oauth authentication. By default, the jenkins http service is named -<code>jenkins-operator-http-${jenkins-cr-name}</code></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">oc create route edge jenkins-route --service<span style="color:#ce5c00;font-weight:bold">=</span>jenkins-operator-http-jenkins</code></pre></div> -<p>Note: the route name (jenkins-route) must match the pointed route on the serviceaccount annotation.</p> - -<p>After the creation of the Route. It can be used to navigate to the Jenkins Login Page and login with your Openshift Credentials.</p> - - - - - - Docs: Diagnostics - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.5.x/diagnostics/ - Mon, 18 Jan 2021 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.5.x/diagnostics/ - - - - - -<p>Turn on debug in <strong>Jenkins Operator</strong> deployment:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">sed -i <span style="color:#4e9a06">&#39;s|\(args:\).*|\1\ [&#34;--debug&#34;\]|&#39;</span> deploy/operator.yaml -kubectl apply -f deploy/operator.yaml</code></pre></div> -<p>Watch Kubernetes events:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl get events --sort-by<span style="color:#ce5c00;font-weight:bold">=</span><span style="color:#4e9a06">&#39;{.lastTimestamp}&#39;</span></code></pre></div> -<p>Verify Jenkins master logs:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl logs -f jenkins-&lt;cr_name&gt;</code></pre></div> -<p>Verify 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> - -<p>Delete the Jenkins master pod and wait for the new one to come up:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl delete pod jenkins-&lt;cr_name&gt;</code></pre></div> - - - - - Docs: Schema - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.5.x/schema/ - Mon, 18 Jan 2021 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.5.x/schema/ - - - - - -<div class="pageinfo pageinfo-primary"> -<p>This document contains API scheme for <code>jenkins-operator</code> Custom Resource Definition manifest</p> - -</div> - - -<p>Packages:</p> -<ul> -<li> -<a href="#jenkins.io">jenkins.io</a> -</li> -</ul> -<h2 id="jenkins.io">jenkins.io</h2> -<p> -<p>Package v1alpha2 contains API Schema definitions for the jenkins.io v1alpha2 API group</p> -</p> -Resource Types: -<ul><li> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.Jenkins">Jenkins</a> -</li></ul> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Jenkins">Jenkins -</h3> -<p> -<p>Jenkins is the Schema for the jenkins API</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>apiVersion</code></br> -string</td> -<td> -<code> -jenkins.io/v1alpha2 -</code> -</td> -</tr> -<tr> -<td> -<code>kind</code></br> -string -</td> -<td><code>Jenkins</code></td> -</tr> -<tr> -<td> -<code>metadata</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#objectmeta-v1-meta"> -Kubernetes meta/v1.ObjectMeta -</a> -</em> -</td> -<td> -Refer to the Kubernetes API documentation for the fields of the -<code>metadata</code> field. -</td> -</tr> -<tr> -<td> -<code>spec</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsSpec"> -JenkinsSpec -</a> -</em> -</td> -<td> -<p>Spec defines the desired state of the Jenkins</p> -<br/> -<br/> -<table> -<tr> -<td> -<code>master</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsMaster"> -JenkinsMaster -</a> -</em> -</td> -<td> -<p>Master represents Jenkins master pod properties and Jenkins plugins. -Every single change here requires a pod restart.</p> -</td> -</tr> -<tr> -<td> -<code>seedJobs</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.SeedJob"> -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.SeedJob -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>SeedJobs defines list of Jenkins Seed Job configurations -More info: <a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configuration#configure-seed-jobs-and-pipelines">https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configuration#configure-seed-jobs-and-pipelines</a></p> -</td> -</tr> -<tr> -<td> -<code>notifications</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Notification"> -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Notification -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Notifications defines list of a services which are used to inform about Jenkins status -Can be used to integrate chat services like Slack, Microsoft Teams or Mailgun</p> -</td> -</tr> -<tr> -<td> -<code>service</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Service"> -Service -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Service is Kubernetes service of Jenkins master HTTP pod -Defaults to : -port: 8080 -type: ClusterIP</p> -</td> -</tr> -<tr> -<td> -<code>slaveService</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Service"> -Service -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Service is Kubernetes service of Jenkins slave pods -Defaults to : -port: 50000 -type: ClusterIP</p> -</td> -</tr> -<tr> -<td> -<code>backup</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Backup"> -Backup -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Backup defines configuration of Jenkins backup -More info: <a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configure-backup-and-restore/">https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configure-backup-and-restore/</a></p> -</td> -</tr> -<tr> -<td> -<code>restore</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Restore"> -Restore -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Backup defines configuration of Jenkins backup restore -More info: <a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configure-backup-and-restore/">https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configure-backup-and-restore/</a></p> -</td> -</tr> -<tr> -<td> -<code>groovyScripts</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.GroovyScripts"> -GroovyScripts -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>GroovyScripts defines configuration of Jenkins customization via groovy scripts</p> -</td> -</tr> -<tr> -<td> -<code>configurationAsCode</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.ConfigurationAsCode"> -ConfigurationAsCode -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>ConfigurationAsCode defines configuration of Jenkins customization via Configuration as Code Jenkins plugin</p> -</td> -</tr> -<tr> -<td> -<code>roles</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#roleref-v1-rbac"> -[]Kubernetes rbac/v1.RoleRef -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Roles defines list of extra RBAC roles for the Jenkins Master pod service account</p> -</td> -</tr> -<tr> -<td> -<code>serviceAccount</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.ServiceAccount"> -ServiceAccount -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>ServiceAccount defines Jenkins master service account attributes</p> -</td> -</tr> -<tr> -<td> -<code>jenkinsAPISettings</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsAPISettings"> -JenkinsAPISettings -</a> -</em> -</td> -<td> -<p>JenkinsAPISettings defines configuration used by the operator to gain admin access to the Jenkins API</p> -</td> -</tr> -</table> -</td> -</tr> -<tr> -<td> -<code>status</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsStatus"> -JenkinsStatus -</a> -</em> -</td> -<td> -<p>Status defines the observed state of Jenkins</p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.AppliedGroovyScript">AppliedGroovyScript -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.JenkinsStatus">JenkinsStatus</a>) -</p> -<p> -<p>AppliedGroovyScript is the applied groovy script in Jenkins by the operator.</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>configurationType</code></br> -<em> -string -</em> -</td> -<td> -<p>ConfigurationType is the name of the configuration type(base-groovy, user-groovy, user-casc)</p> -</td> -</tr> -<tr> -<td> -<code>source</code></br> -<em> -string -</em> -</td> -<td> -<p>Source is the name of source where is located groovy script</p> -</td> -</tr> -<tr> -<td> -<code>name</code></br> -<em> -string -</em> -</td> -<td> -<p>Name is the name of the groovy script</p> -</td> -</tr> -<tr> -<td> -<code>hash</code></br> -<em> -string -</em> -</td> -<td> -<p>Hash is the hash of the groovy script and secrets which it uses</p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.AuthorizationStrategy">AuthorizationStrategy -(<code>string</code> alias)</p></h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.JenkinsAPISettings">JenkinsAPISettings</a>) -</p> -<p> -<p>AuthorizationStrategy defines authorization strategy of the operator for the Jenkins API</p> -</p> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Backup">Backup -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.JenkinsSpec">JenkinsSpec</a>) -</p> -<p> -<p>Backup defines configuration of Jenkins backup.</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>containerName</code></br> -<em> -string -</em> -</td> -<td> -<p>ContainerName is the container name responsible for backup operation</p> -</td> -</tr> -<tr> -<td> -<code>action</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Handler"> -Handler -</a> -</em> -</td> -<td> -<p>Action defines action which performs backup in backup container sidecar</p> -</td> -</tr> -<tr> -<td> -<code>interval</code></br> -<em> -uint64 -</em> -</td> -<td> -<p>Interval tells how often make backup in seconds -Defaults to 30.</p> -</td> -</tr> -<tr> -<td> -<code>makeBackupBeforePodDeletion</code></br> -<em> -bool -</em> -</td> -<td> -<p>MakeBackupBeforePodDeletion tells operator to make backup before Jenkins master pod deletion</p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.ConfigMapRef">ConfigMapRef -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.Customization">Customization</a>) -</p> -<p> -<p>ConfigMapRef is reference to Kubernetes ConfigMap.</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>name</code></br> -<em> -string -</em> -</td> -<td> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.ConfigurationAsCode">ConfigurationAsCode -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.JenkinsSpec">JenkinsSpec</a>) -</p> -<p> -<p>ConfigurationAsCode defines configuration of Jenkins customization via Configuration as Code Jenkins plugin.</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>Customization</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Customization"> -Customization -</a> -</em> -</td> -<td> -<p> -(Members of <code>Customization</code> are embedded into this type.) -</p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Container">Container -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.JenkinsMaster">JenkinsMaster</a>) -</p> -<p> -<p>Container defines Kubernetes container attributes.</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>name</code></br> -<em> -string -</em> -</td> -<td> -<p>Name of the container specified as a DNS_LABEL. -Each container in a pod must have a unique name (DNS_LABEL).</p> -</td> -</tr> -<tr> -<td> -<code>image</code></br> -<em> -string -</em> -</td> -<td> -<p>Docker image name. -More info: <a href="https://kubernetes.io/docs/concepts/containers/images">https://kubernetes.io/docs/concepts/containers/images</a></p> -</td> -</tr> -<tr> -<td> -<code>imagePullPolicy</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#pullpolicy-v1-core"> -Kubernetes core/v1.PullPolicy -</a> -</em> -</td> -<td> -<p>Image pull policy. -One of Always, Never, IfNotPresent. -Defaults to Always.</p> -</td> -</tr> -<tr> -<td> -<code>resources</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#resourcerequirements-v1-core"> -Kubernetes core/v1.ResourceRequirements -</a> -</em> -</td> -<td> -<p>Compute Resources required by this container. -More info: <a href="https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/">https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/</a></p> -</td> -</tr> -<tr> -<td> -<code>command</code></br> -<em> -[]string -</em> -</td> -<td> -<em>(Optional)</em> -<p>Entrypoint array. Not executed within a shell. -The docker image&rsquo;s ENTRYPOINT is used if this is not provided. -Variable references $(VAR_NAME) are expanded using the container&rsquo;s environment. If a variable -cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax -can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, -regardless of whether the variable exists or not. -More info: <a href="https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell">https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell</a></p> -</td> -</tr> -<tr> -<td> -<code>args</code></br> -<em> -[]string -</em> -</td> -<td> -<em>(Optional)</em> -<p>Arguments to the entrypoint. -The docker image&rsquo;s CMD is used if this is not provided. -Variable references $(VAR_NAME) are expanded using the container&rsquo;s environment. If a variable -cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax -can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, -regardless of whether the variable exists or not. -More info: <a href="https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell">https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell</a></p> -</td> -</tr> -<tr> -<td> -<code>workingDir</code></br> -<em> -string -</em> -</td> -<td> -<em>(Optional)</em> -<p>Container&rsquo;s working directory. -If not specified, the container runtime&rsquo;s default will be used, which -might be configured in the container image.</p> -</td> -</tr> -<tr> -<td> -<code>ports</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#containerport-v1-core"> -[]Kubernetes core/v1.ContainerPort -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>List of ports to expose from the container. Exposing a port here gives -the system additional information about the network connections a -container uses, but is primarily informational. Not specifying a port here -DOES NOT prevent that port from being exposed. Any port which is -listening on the default &ldquo;0.0.0.0&rdquo; address inside a container will be -accessible from the network.</p> -</td> -</tr> -<tr> -<td> -<code>envFrom</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#envfromsource-v1-core"> -[]Kubernetes core/v1.EnvFromSource -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>List of sources to populate environment variables in the container. -The keys defined within a source must be a C_IDENTIFIER. All invalid keys -will be reported as an event when the container is starting. When a key exists in multiple -sources, the value associated with the last source will take precedence. -Values defined by an Env with a duplicate key will take precedence.</p> -</td> -</tr> -<tr> -<td> -<code>env</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#envvar-v1-core"> -[]Kubernetes core/v1.EnvVar -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>List of environment variables to set in the container.</p> -</td> -</tr> -<tr> -<td> -<code>volumeMounts</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#volumemount-v1-core"> -[]Kubernetes core/v1.VolumeMount -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Pod volumes to mount into the container&rsquo;s filesystem.</p> -</td> -</tr> -<tr> -<td> -<code>livenessProbe</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#probe-v1-core"> -Kubernetes core/v1.Probe -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Periodic probe of container liveness. -Container will be restarted if the probe fails.</p> -</td> -</tr> -<tr> -<td> -<code>readinessProbe</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#probe-v1-core"> -Kubernetes core/v1.Probe -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Periodic probe of container service readiness. -Container will be removed from service endpoints if the probe fails.</p> -</td> -</tr> -<tr> -<td> -<code>lifecycle</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#lifecycle-v1-core"> -Kubernetes core/v1.Lifecycle -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Actions that the management system should take in response to container lifecycle events.</p> -</td> -</tr> -<tr> -<td> -<code>securityContext</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#securitycontext-v1-core"> -Kubernetes core/v1.SecurityContext -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Security options the pod should run with. -More info: <a href="https://kubernetes.io/docs/concepts/policy/security-context/">https://kubernetes.io/docs/concepts/policy/security-context/</a> -More info: <a href="https://kubernetes.io/docs/tasks/configure-pod-container/security-context/">https://kubernetes.io/docs/tasks/configure-pod-container/security-context/</a></p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Customization">Customization -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.ConfigurationAsCode">ConfigurationAsCode</a>, -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.GroovyScripts">GroovyScripts</a>) -</p> -<p> -<p>Customization defines configuration of Jenkins customization.</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>secret</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.SecretRef"> -SecretRef -</a> -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>configurations</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.ConfigMapRef"> -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.ConfigMapRef -</a> -</em> -</td> -<td> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.GroovyScripts">GroovyScripts -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.JenkinsSpec">JenkinsSpec</a>) -</p> -<p> -<p>GroovyScripts defines configuration of Jenkins customization via groovy scripts.</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>Customization</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Customization"> -Customization -</a> -</em> -</td> -<td> -<p> -(Members of <code>Customization</code> are embedded into this type.) -</p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Handler">Handler -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.Backup">Backup</a>, -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.Restore">Restore</a>) -</p> -<p> -<p>Handler defines a specific action that should be taken.</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>exec</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#execaction-v1-core"> -Kubernetes core/v1.ExecAction -</a> -</em> -</td> -<td> -<p>Exec specifies the action to take.</p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Image">Image -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.JenkinsImageSpec">JenkinsImageSpec</a>) -</p> -<p> -<p>Defines Jenkins Plugin structure</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>name</code></br> -<em> -string -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>version</code></br> -<em> -string -</em> -</td> -<td> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsAPISettings">JenkinsAPISettings -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.JenkinsSpec">JenkinsSpec</a>) -</p> -<p> -<p>JenkinsAPISettings defines configuration used by the operator to gain admin access to the Jenkins API</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>authorizationStrategy</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.AuthorizationStrategy"> -AuthorizationStrategy -</a> -</em> -</td> -<td> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsCredentialType">JenkinsCredentialType -(<code>string</code> alias)</p></h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.SeedJob">SeedJob</a>) -</p> -<p> -<p>JenkinsCredentialType defines type of Jenkins credential used to seed job mechanism.</p> -</p> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsImage">JenkinsImage -</h3> -<p> -<p>JenkinsImage is the Schema for the jenkinsimages API</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>metadata</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#objectmeta-v1-meta"> -Kubernetes meta/v1.ObjectMeta -</a> -</em> -</td> -<td> -Refer to the Kubernetes API documentation for the fields of the -<code>metadata</code> field. -</td> -</tr> -<tr> -<td> -<code>spec</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsImageSpec"> -JenkinsImageSpec -</a> -</em> -</td> -<td> -<br/> -<br/> -<table> -<tr> -<td> -<code>image</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Image"> -Image -</a> -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>plugins</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsPlugin"> -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsPlugin -</a> -</em> -</td> -<td> -</td> -</tr> -</table> -</td> -</tr> -<tr> -<td> -<code>status</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsImageStatus"> -JenkinsImageStatus -</a> -</em> -</td> -<td> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsImageSpec">JenkinsImageSpec -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.JenkinsImage">JenkinsImage</a>) -</p> -<p> -<p>JenkinsImageSpec defines the desired state of JenkinsImage</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>image</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Image"> -Image -</a> -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>plugins</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsPlugin"> -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsPlugin -</a> -</em> -</td> -<td> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsImageStatus">JenkinsImageStatus -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.JenkinsImage">JenkinsImage</a>) -</p> -<p> -<p>JenkinsImageStatus defines the observed state of JenkinsImage</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>image</code></br> -<em> -string -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>md5sum</code></br> -<em> -string -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>installedPlugins</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsPlugin"> -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsPlugin -</a> -</em> -</td> -<td> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsMaster">JenkinsMaster -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.JenkinsSpec">JenkinsSpec</a>) -</p> -<p> -<p>JenkinsMaster defines the Jenkins master pod attributes and plugins, -every single change requires a Jenkins master pod restart.</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>annotations</code></br> -<em> -map[string]string -</em> -</td> -<td> -<em>(Optional)</em> -<p>Annotations is an unstructured key value map stored with a resource that may be -set by external tools to store and retrieve arbitrary metadata. They are not -queryable and should be preserved when modifying objects. -More info: <a href="http://kubernetes.io/docs/user-guide/annotations">http://kubernetes.io/docs/user-guide/annotations</a></p> -</td> -</tr> -<tr> -<td> -<code>masterAnnotations</code></br> -<em> -map[string]string -</em> -</td> -<td> -<em>(Optional)</em> -<p>Annotations is an unstructured key value map stored with a resource that may be -set by external tools to store and retrieve arbitrary metadata. They are not -queryable and should be preserved when modifying objects. -More info: <a href="http://kubernetes.io/docs/user-guide/annotations">http://kubernetes.io/docs/user-guide/annotations</a> -Deprecated: will be removed in the future, please use Annotations(annotations)</p> -</td> -</tr> -<tr> -<td> -<code>labels</code></br> -<em> -map[string]string -</em> -</td> -<td> -<em>(Optional)</em> -<p>Map of string keys and values that can be used to organize and categorize -(scope and select) objects. May match selectors of replication controllers -and services. -More info: <a href="http://kubernetes.io/docs/user-guide/labels">http://kubernetes.io/docs/user-guide/labels</a></p> -</td> -</tr> -<tr> -<td> -<code>nodeSelector</code></br> -<em> -map[string]string -</em> -</td> -<td> -<em>(Optional)</em> -<p>NodeSelector is a selector which must be true for the pod to fit on a node. -Selector which must match a node&rsquo;s labels for the pod to be scheduled on that node. -More info: <a href="https://kubernetes.io/docs/concepts/configuration/assign-pod-node/">https://kubernetes.io/docs/concepts/configuration/assign-pod-node/</a></p> -</td> -</tr> -<tr> -<td> -<code>securityContext</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#podsecuritycontext-v1-core"> -Kubernetes core/v1.PodSecurityContext -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>SecurityContext that applies to all the containers of the Jenkins -Master. As per kubernetes specification, it can be overridden -for each container individually. -Defaults to: -runAsUser: 1000 -fsGroup: 1000</p> -</td> -</tr> -<tr> -<td> -<code>containers</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Container"> -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Container -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>List of containers belonging to the pod. -Containers cannot currently be added or removed. -There must be at least one container in a Pod. -Defaults to: -- image: jenkins/jenkins:lts -imagePullPolicy: Always -livenessProbe: -failureThreshold: 12 -httpGet: -path: /login -port: http -scheme: HTTP -initialDelaySeconds: 80 -periodSeconds: 10 -successThreshold: 1 -timeoutSeconds: 5 -name: jenkins-master -readinessProbe: -failureThreshold: 3 -httpGet: -path: /login -port: http -scheme: HTTP -initialDelaySeconds: 30 -periodSeconds: 10 -successThreshold: 1 -timeoutSeconds: 1 -resources: -limits: -cpu: 1500m -memory: 3Gi -requests: -cpu: &ldquo;1&rdquo; -memory: 600Mi</p> -</td> -</tr> -<tr> -<td> -<code>imagePullSecrets</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#localobjectreference-v1-core"> -[]Kubernetes core/v1.LocalObjectReference -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. -If specified, these secrets will be passed to individual puller implementations for them to use. For example, -in the case of docker, only DockerConfig type secrets are honored. -More info: <a href="https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod">https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod</a></p> -</td> -</tr> -<tr> -<td> -<code>volumes</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#volume-v1-core"> -[]Kubernetes core/v1.Volume -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>List of volumes that can be mounted by containers belonging to the pod. -More info: <a href="https://kubernetes.io/docs/concepts/storage/volumes">https://kubernetes.io/docs/concepts/storage/volumes</a></p> -</td> -</tr> -<tr> -<td> -<code>tolerations</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#toleration-v1-core"> -[]Kubernetes core/v1.Toleration -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>If specified, the pod&rsquo;s tolerations.</p> -</td> -</tr> -<tr> -<td> -<code>basePlugins</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Plugin"> -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Plugin -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>BasePlugins contains plugins required by operator -Defaults to : -- name: kubernetes -version: &ldquo;1.28.6&rdquo; -- name: workflow-job -version: &ldquo;2.40&rdquo; -- name: workflow-aggregator -version: &ldquo;2.6&rdquo; -- name: git -version: &ldquo;4.5.0&rdquo; -- name: job-dsl -version: &ldquo;1.77&rdquo; -- name: configuration-as-code -version: &ldquo;1.46&rdquo; -- name: kubernetes-credentials-provider -version: &ldquo;0.15&rdquo;</p> -</td> -</tr> -<tr> -<td> -<code>plugins</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Plugin"> -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Plugin -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Plugins contains plugins required by user</p> -</td> -</tr> -<tr> -<td> -<code>disableCSRFProtection</code></br> -<em> -bool -</em> -</td> -<td> -<p>DisableCSRFProtection allows you to toggle CSRF Protection on Jenkins</p> -</td> -</tr> -<tr> -<td> -<code>priorityClassName</code></br> -<em> -string -</em> -</td> -<td> -<em>(Optional)</em> -<p>PriorityClassName for Jenkins master pod</p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsPlugin">JenkinsPlugin -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.JenkinsImageSpec">JenkinsImageSpec</a>, -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.JenkinsImageStatus">JenkinsImageStatus</a>) -</p> -<p> -<p>Defines Jenkins Plugin structure</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>name</code></br> -<em> -string -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>version</code></br> -<em> -string -</em> -</td> -<td> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsSpec">JenkinsSpec -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.Jenkins">Jenkins</a>) -</p> -<p> -<p>JenkinsSpec defines the desired state of the Jenkins.</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>master</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsMaster"> -JenkinsMaster -</a> -</em> -</td> -<td> -<p>Master represents Jenkins master pod properties and Jenkins plugins. -Every single change here requires a pod restart.</p> -</td> -</tr> -<tr> -<td> -<code>seedJobs</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.SeedJob"> -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.SeedJob -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>SeedJobs defines list of Jenkins Seed Job configurations -More info: <a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configuration#configure-seed-jobs-and-pipelines">https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configuration#configure-seed-jobs-and-pipelines</a></p> -</td> -</tr> -<tr> -<td> -<code>notifications</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Notification"> -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Notification -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Notifications defines list of a services which are used to inform about Jenkins status -Can be used to integrate chat services like Slack, Microsoft Teams or Mailgun</p> -</td> -</tr> -<tr> -<td> -<code>service</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Service"> -Service -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Service is Kubernetes service of Jenkins master HTTP pod -Defaults to : -port: 8080 -type: ClusterIP</p> -</td> -</tr> -<tr> -<td> -<code>slaveService</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Service"> -Service -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Service is Kubernetes service of Jenkins slave pods -Defaults to : -port: 50000 -type: ClusterIP</p> -</td> -</tr> -<tr> -<td> -<code>backup</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Backup"> -Backup -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Backup defines configuration of Jenkins backup -More info: <a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configure-backup-and-restore/">https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configure-backup-and-restore/</a></p> -</td> -</tr> -<tr> -<td> -<code>restore</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Restore"> -Restore -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Backup defines configuration of Jenkins backup restore -More info: <a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configure-backup-and-restore/">https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configure-backup-and-restore/</a></p> -</td> -</tr> -<tr> -<td> -<code>groovyScripts</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.GroovyScripts"> -GroovyScripts -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>GroovyScripts defines configuration of Jenkins customization via groovy scripts</p> -</td> -</tr> -<tr> -<td> -<code>configurationAsCode</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.ConfigurationAsCode"> -ConfigurationAsCode -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>ConfigurationAsCode defines configuration of Jenkins customization via Configuration as Code Jenkins plugin</p> -</td> -</tr> -<tr> -<td> -<code>roles</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#roleref-v1-rbac"> -[]Kubernetes rbac/v1.RoleRef -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Roles defines list of extra RBAC roles for the Jenkins Master pod service account</p> -</td> -</tr> -<tr> -<td> -<code>serviceAccount</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.ServiceAccount"> -ServiceAccount -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>ServiceAccount defines Jenkins master service account attributes</p> -</td> -</tr> -<tr> -<td> -<code>jenkinsAPISettings</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsAPISettings"> -JenkinsAPISettings -</a> -</em> -</td> -<td> -<p>JenkinsAPISettings defines configuration used by the operator to gain admin access to the Jenkins API</p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsStatus">JenkinsStatus -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.Jenkins">Jenkins</a>) -</p> -<p> -<p>JenkinsStatus defines the observed state of Jenkins</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>operatorVersion</code></br> -<em> -string -</em> -</td> -<td> -<em>(Optional)</em> -<p>OperatorVersion is the operator version which manages this CR</p> -</td> -</tr> -<tr> -<td> -<code>provisionStartTime</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#time-v1-meta"> -Kubernetes meta/v1.Time -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>ProvisionStartTime is a time when Jenkins master pod has been created</p> -</td> -</tr> -<tr> -<td> -<code>baseConfigurationCompletedTime</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#time-v1-meta"> -Kubernetes meta/v1.Time -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>BaseConfigurationCompletedTime is a time when Jenkins base configuration phase has been completed</p> -</td> -</tr> -<tr> -<td> -<code>userConfigurationCompletedTime</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#time-v1-meta"> -Kubernetes meta/v1.Time -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>UserConfigurationCompletedTime is a time when Jenkins user configuration phase has been completed</p> -</td> -</tr> -<tr> -<td> -<code>restoredBackup</code></br> -<em> -uint64 -</em> -</td> -<td> -<em>(Optional)</em> -<p>RestoredBackup is the restored backup number after Jenkins master pod restart</p> -</td> -</tr> -<tr> -<td> -<code>lastBackup</code></br> -<em> -uint64 -</em> -</td> -<td> -<em>(Optional)</em> -<p>LastBackup is the latest backup number</p> -</td> -</tr> -<tr> -<td> -<code>pendingBackup</code></br> -<em> -uint64 -</em> -</td> -<td> -<em>(Optional)</em> -<p>PendingBackup is the pending backup number</p> -</td> -</tr> -<tr> -<td> -<code>backupDoneBeforePodDeletion</code></br> -<em> -bool -</em> -</td> -<td> -<em>(Optional)</em> -<p>BackupDoneBeforePodDeletion tells if backup before pod deletion has been made</p> -</td> -</tr> -<tr> -<td> -<code>userAndPasswordHash</code></br> -<em> -string -</em> -</td> -<td> -<em>(Optional)</em> -<p>UserAndPasswordHash is a SHA256 hash made from user and password</p> -</td> -</tr> -<tr> -<td> -<code>createdSeedJobs</code></br> -<em> -[]string -</em> -</td> -<td> -<em>(Optional)</em> -<p>CreatedSeedJobs contains list of seed job id already created in Jenkins</p> -</td> -</tr> -<tr> -<td> -<code>appliedGroovyScripts</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.AppliedGroovyScript"> -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.AppliedGroovyScript -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>AppliedGroovyScripts is a list with all applied groovy scripts in Jenkins by the operator</p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Mailgun">Mailgun -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.Notification">Notification</a>) -</p> -<p> -<p>Mailgun is handler for Mailgun email service notification channel.</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>domain</code></br> -<em> -string -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>apiKeySecretKeySelector</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.SecretKeySelector"> -SecretKeySelector -</a> -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>recipient</code></br> -<em> -string -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>from</code></br> -<em> -string -</em> -</td> -<td> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.MicrosoftTeams">MicrosoftTeams -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.Notification">Notification</a>) -</p> -<p> -<p>MicrosoftTeams is handler for Microsoft MicrosoftTeams notification channel.</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>webHookURLSecretKeySelector</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.SecretKeySelector"> -SecretKeySelector -</a> -</em> -</td> -<td> -<p>The web hook URL to MicrosoftTeams App</p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Notification">Notification -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.JenkinsSpec">JenkinsSpec</a>) -</p> -<p> -<p>Notification is a service configuration used to send notifications about Jenkins status.</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>level</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.NotificationLevel"> -NotificationLevel -</a> -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>verbose</code></br> -<em> -bool -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>name</code></br> -<em> -string -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>slack</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Slack"> -github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Slack -</a> -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>teams</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.MicrosoftTeams"> -github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.MicrosoftTeams -</a> -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>mailgun</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Mailgun"> -github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Mailgun -</a> -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>smtp</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.SMTP"> -github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.SMTP -</a> -</em> -</td> -<td> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.NotificationLevel">NotificationLevel -(<code>string</code> alias)</p></h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.Notification">Notification</a>) -</p> -<p> -<p>NotificationLevel defines the level of a Notification.</p> -</p> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Plugin">Plugin -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.JenkinsMaster">JenkinsMaster</a>) -</p> -<p> -<p>Plugin defines Jenkins plugin.</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>name</code></br> -<em> -string -</em> -</td> -<td> -<p>Name is the name of Jenkins plugin</p> -</td> -</tr> -<tr> -<td> -<code>version</code></br> -<em> -string -</em> -</td> -<td> -<p>Version is the version of Jenkins plugin</p> -</td> -</tr> -<tr> -<td> -<code>downloadURL</code></br> -<em> -string -</em> -</td> -<td> -<p>DownloadURL is the custom url from where plugin has to be downloaded.</p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Restore">Restore -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.JenkinsSpec">JenkinsSpec</a>) -</p> -<p> -<p>Restore defines configuration of Jenkins backup restore operation.</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>containerName</code></br> -<em> -string -</em> -</td> -<td> -<p>ContainerName is the container name responsible for restore backup operation</p> -</td> -</tr> -<tr> -<td> -<code>action</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Handler"> -Handler -</a> -</em> -</td> -<td> -<p>Action defines action which performs restore backup in restore container sidecar</p> -</td> -</tr> -<tr> -<td> -<code>getLatestAction</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Handler"> -Handler -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>GetLatestAction defines action which returns the latest backup number. If there is no backup &ldquo;-1&rdquo; should be -returned.</p> -</td> -</tr> -<tr> -<td> -<code>recoveryOnce</code></br> -<em> -uint64 -</em> -</td> -<td> -<em>(Optional)</em> -<p>RecoveryOnce if want to restore specific backup set this field and then Jenkins will be restarted and desired backup will be restored</p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.SMTP">SMTP -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.Notification">Notification</a>) -</p> -<p> -<p>SMTP is handler for sending emails via this protocol.</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>usernameSecretKeySelector</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.SecretKeySelector"> -SecretKeySelector -</a> -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>passwordSecretKeySelector</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.SecretKeySelector"> -SecretKeySelector -</a> -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>port</code></br> -<em> -int -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>server</code></br> -<em> -string -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>tlsInsecureSkipVerify</code></br> -<em> -bool -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>from</code></br> -<em> -string -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>to</code></br> -<em> -string -</em> -</td> -<td> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.SecretKeySelector">SecretKeySelector -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.Mailgun">Mailgun</a>, -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.MicrosoftTeams">MicrosoftTeams</a>, -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.SMTP">SMTP</a>, -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.Slack">Slack</a>) -</p> -<p> -<p>SecretKeySelector selects a key of a Secret.</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>secret</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#localobjectreference-v1-core"> -Kubernetes core/v1.LocalObjectReference -</a> -</em> -</td> -<td> -<p>The name of the secret in the pod&rsquo;s namespace to select from.</p> -</td> -</tr> -<tr> -<td> -<code>key</code></br> -<em> -string -</em> -</td> -<td> -<p>The key of the secret to select from. Must be a valid secret key.</p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.SecretRef">SecretRef -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.Customization">Customization</a>) -</p> -<p> -<p>SecretRef is reference to Kubernetes secret.</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>name</code></br> -<em> -string -</em> -</td> -<td> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.SeedJob">SeedJob -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.JenkinsSpec">JenkinsSpec</a>) -</p> -<p> -<p>SeedJob defines configuration for seed job -More info: <a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configuration/#configure-seed-jobs-and-pipelines">https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configuration/#configure-seed-jobs-and-pipelines</a>.</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>id</code></br> -<em> -string -</em> -</td> -<td> -<p>ID is the unique seed job name</p> -</td> -</tr> -<tr> -<td> -<code>credentialID</code></br> -<em> -string -</em> -</td> -<td> -<p>CredentialID is the Kubernetes secret name which stores repository access credentials</p> -</td> -</tr> -<tr> -<td> -<code>description</code></br> -<em> -string -</em> -</td> -<td> -<em>(Optional)</em> -<p>Description is the description of the seed job</p> -</td> -</tr> -<tr> -<td> -<code>targets</code></br> -<em> -string -</em> -</td> -<td> -<p>Targets is the repository path where are seed job definitions</p> -</td> -</tr> -<tr> -<td> -<code>repositoryBranch</code></br> -<em> -string -</em> -</td> -<td> -<p>RepositoryBranch is the repository branch where are seed job definitions</p> -</td> -</tr> -<tr> -<td> -<code>repositoryUrl</code></br> -<em> -string -</em> -</td> -<td> -<p>RepositoryURL is the repository access URL. Can be SSH or HTTPS.</p> -</td> -</tr> -<tr> -<td> -<code>credentialType</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsCredentialType"> -JenkinsCredentialType -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>JenkinsCredentialType is the <a href="https://jenkinsci.github.io/kubernetes-credentials-provider-plugin/">https://jenkinsci.github.io/kubernetes-credentials-provider-plugin/</a> credential type</p> -</td> -</tr> -<tr> -<td> -<code>bitbucketPushTrigger</code></br> -<em> -bool -</em> -</td> -<td> -<em>(Optional)</em> -<p>BitbucketPushTrigger is used for Bitbucket web hooks</p> -</td> -</tr> -<tr> -<td> -<code>githubPushTrigger</code></br> -<em> -bool -</em> -</td> -<td> -<em>(Optional)</em> -<p>GitHubPushTrigger is used for GitHub web hooks</p> -</td> -</tr> -<tr> -<td> -<code>buildPeriodically</code></br> -<em> -string -</em> -</td> -<td> -<em>(Optional)</em> -<p>BuildPeriodically is setting for scheduled trigger</p> -</td> -</tr> -<tr> -<td> -<code>pollSCM</code></br> -<em> -string -</em> -</td> -<td> -<em>(Optional)</em> -<p>PollSCM is setting for polling changes in SCM</p> -</td> -</tr> -<tr> -<td> -<code>ignoreMissingFiles</code></br> -<em> -bool -</em> -</td> -<td> -<em>(Optional)</em> -<p>IgnoreMissingFiles is setting for Job DSL API plugin to ignore files that miss</p> -</td> -</tr> -<tr> -<td> -<code>additionalClasspath</code></br> -<em> -string -</em> -</td> -<td> -<em>(Optional)</em> -<p>AdditionalClasspath is setting for Job DSL API plugin to set Additional Classpath</p> -</td> -</tr> -<tr> -<td> -<code>failOnMissingPlugin</code></br> -<em> -bool -</em> -</td> -<td> -<em>(Optional)</em> -<p>FailOnMissingPlugin is setting for Job DSL API plugin that fails job if required plugin is missing</p> -</td> -</tr> -<tr> -<td> -<code>unstableOnDeprecation</code></br> -<em> -bool -</em> -</td> -<td> -<em>(Optional)</em> -<p>UnstableOnDeprecation is setting for Job DSL API plugin that sets build status as unstable if build using deprecated features</p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Service">Service -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.JenkinsSpec">JenkinsSpec</a>) -</p> -<p> -<p>Service defines Kubernetes service attributes</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>annotations</code></br> -<em> -map[string]string -</em> -</td> -<td> -<em>(Optional)</em> -<p>Annotations is an unstructured key value map stored with a resource that may be -set by external tools to store and retrieve arbitrary metadata. They are not -queryable and should be preserved when modifying objects. -More info: <a href="http://kubernetes.io/docs/user-guide/annotations">http://kubernetes.io/docs/user-guide/annotations</a></p> -</td> -</tr> -<tr> -<td> -<code>labels</code></br> -<em> -map[string]string -</em> -</td> -<td> -<em>(Optional)</em> -<p>Route service traffic to pods with label keys and values matching this -selector. If empty or not present, the service is assumed to have an -external process managing its endpoints, which Kubernetes will not -modify. Only applies to types ClusterIP, NodePort, and LoadBalancer. -Ignored if type is ExternalName. -More info: <a href="https://kubernetes.io/docs/concepts/services-networking/service/">https://kubernetes.io/docs/concepts/services-networking/service/</a></p> -</td> -</tr> -<tr> -<td> -<code>type</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#servicetype-v1-core"> -Kubernetes core/v1.ServiceType -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Type determines how the Service is exposed. Defaults to ClusterIP. Valid -options are ExternalName, ClusterIP, NodePort, and LoadBalancer. -&ldquo;ExternalName&rdquo; maps to the specified externalName. -&ldquo;ClusterIP&rdquo; allocates a cluster-internal IP address for load-balancing to -endpoints. Endpoints are determined by the selector or if that is not -specified, by manual construction of an Endpoints object. If clusterIP is -&ldquo;None&rdquo;, no virtual IP is allocated and the endpoints are published as a -set of endpoints rather than a stable IP. -&ldquo;NodePort&rdquo; builds on ClusterIP and allocates a port on every node which -routes to the clusterIP. -&ldquo;LoadBalancer&rdquo; builds on NodePort and creates an -external load-balancer (if supported in the current cloud) which routes -to the clusterIP. -More info: <a href="https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services---service-types">https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services&mdash;service-types</a></p> -</td> -</tr> -<tr> -<td> -<code>port</code></br> -<em> -int32 -</em> -</td> -<td> -<p>The port that are exposed by this service. -More info: <a href="https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies">https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies</a></p> -</td> -</tr> -<tr> -<td> -<code>nodePort</code></br> -<em> -int32 -</em> -</td> -<td> -<em>(Optional)</em> -<p>The port on each node on which this service is exposed when type=NodePort or LoadBalancer. -Usually assigned by the system. If specified, it will be allocated to the service -if unused or else creation of the service will fail. -Default is to auto-allocate a port if the ServiceType of this Service requires one. -More info: <a href="https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport">https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport</a></p> -</td> -</tr> -<tr> -<td> -<code>loadBalancerSourceRanges</code></br> -<em> -[]string -</em> -</td> -<td> -<em>(Optional)</em> -<p>If specified and supported by the platform, this will restrict traffic through the cloud-provider -load-balancer will be restricted to the specified client IPs. This field will be ignored if the -cloud-provider does not support the feature.&rdquo; -More info: <a href="https://kubernetes.io/docs/tasks/administer-cluster/securing-a-cluster/#restricting-cloud-metadata-api-access">https://kubernetes.io/docs/tasks/administer-cluster/securing-a-cluster/#restricting-cloud-metadata-api-access</a></p> -</td> -</tr> -<tr> -<td> -<code>loadBalancerIP</code></br> -<em> -string -</em> -</td> -<td> -<em>(Optional)</em> -<p>Only applies to Service Type: LoadBalancer -LoadBalancer will get created with the IP specified in this field. -This feature depends on whether the underlying cloud-provider supports specifying -the loadBalancerIP when a load balancer is created. -This field will be ignored if the cloud-provider does not support the feature.</p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.ServiceAccount">ServiceAccount -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.JenkinsSpec">JenkinsSpec</a>) -</p> -<p> -<p>ServiceAccount defines Kubernetes service account attributes</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>annotations</code></br> -<em> -map[string]string -</em> -</td> -<td> -<em>(Optional)</em> -<p>Annotations is an unstructured key value map stored with a resource that may be -set by external tools to store and retrieve arbitrary metadata. They are not -queryable and should be preserved when modifying objects. -More info: <a href="http://kubernetes.io/docs/user-guide/annotations">http://kubernetes.io/docs/user-guide/annotations</a></p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Slack">Slack -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.Notification">Notification</a>) -</p> -<p> -<p>Slack is handler for Slack notification channel.</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>webHookURLSecretKeySelector</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.SecretKeySelector"> -SecretKeySelector -</a> -</em> -</td> -<td> -<p>The web hook URL to Slack App</p> -</td> -</tr> -</tbody> -</table> -<hr/> -<p><em> -Generated with <code>gen-crd-api-reference-docs</code> -on git commit <code>fe81e5a</code>. -</em></p> - - - - - - \ No newline at end of file diff --git a/docs/docs/getting-started/v0.5.x/notifications/index.html b/docs/docs/getting-started/v0.5.x/notifications/index.html deleted file mode 100644 index 69675e230..000000000 --- a/docs/docs/getting-started/v0.5.x/notifications/index.html +++ /dev/null @@ -1,1079 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Notifications | Jenkins Operator - - - - - - - - - - - - - - - - - - - - - - - - - - - - Notifications | Jenkins Operator - - -
- - - -
-
-
-
-
- - - - - -
- - - - -
- - - - -
- -
- - - -
-

Notifications

-
How to setup operator notifications.
- - -

Slack

- -

Please follow this instructions to get web hook URL.

- -

Create web hook secret with name jenkins-operator-notification-data. Contains key url with provided web hook URL.

-
$ kubectl create secret generic jenkins-operator-notification-data --from-literal=url=<webhook_url>
-

Example configuration for Slack:

-
kind: Jenkins
-spec:
-  master:
-    notifications:
-    - level: info
-      verbose: true
-      name: 
-      slack:
-        webHookURLSecretKeySelector:
-          secret:
-            name: 
-          key: 
-

Microsoft Teams

- -

Please follow this instructions to get web hook URL.

- -

Example configuration for Microsoft Teams:

-
kind: Jenkins
-spec:
-  master:
-    notifications:
-    - level: info
-      verbose: true
-      name: 
-      teams:
-        webHookURLSecretKeySelector:
-          secret:
-            name: 
-          key: 
-

Mailgun

- -

Example configuration for Mailgun:

-
kind: Jenkins
-spec:
-  master:
-    notifications:
-    - level: info
-      verbose: true
-      name: 
-      mailgun:
-        domain: 
-        apiKeySecretKeySelector:
-          secret:
-            name: 
-          key: 
-        recipient: 
-        from: 
-

Debug options

- -

As you see there is two debugging options:

- -
    -
  • level (warning/info) - Set level of messages to send.

  • - -
  • verbose - Print stacktrace and additional error messages

  • -
- -

Multiple providers

- -

You can use multiple providers to send notification to another communication channels at the same time. -For example you will send notifications to Slack and Teams.

-
kind: Jenkins
-spec:
-  master:
-    notifications:
-    - level: info
-      verbose: true
-      name: nslack
-      slack:
-        webHookURLSecretKeySelector:
-          secret:
-            name: 
-          key: 
-    - level: info
-      verbose: true
-      name: nteams
-      teams:
-        webHookURLSecretKeySelector:
-          secret:
-            name: 
-          key: 
- - -
Last modified January 18, 2021 -
-
- - -
-
-
- - - - -
- - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/docs/getting-started/v0.5.x/openshift/index.html b/docs/docs/getting-started/v0.5.x/openshift/index.html deleted file mode 100644 index 8f5954f93..000000000 --- a/docs/docs/getting-started/v0.5.x/openshift/index.html +++ /dev/null @@ -1,1081 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -OpenShift | Jenkins Operator - - - - - - - - - - - - - - - - - - - - - - - - - - - - OpenShift | Jenkins Operator - - -
- - - -
-
-
-
-
- - - - - -
- - - - -
- - - - -
- -
- - - -
-

OpenShift

-
Additional configuration for OpenShift
- - -

SecurityContext

- -

OpenShift enforces Security Constraints Context (scc) when deploying an image. -By default, container images run in restricted scc which prevents from setting -a fixed user id to run with. You need to have ensure that you do not provide a -securityContext with a runAsUser and that your image does not use a hardcoded user.

-
securityContext: {}
-

OpenShift Jenkins image

- -

OpenShift provides a pre-configured Jenkins image containing 3 openshift plugins for -jenkins (openshift-login-plugin, openshift-sync-plugin and openshift-client-plugin) -which allows better jenkins integration with kubernetes and OpenShift.

- -

The OpenShift Jenkins image requires additional configuration to be fully enabled.

- -

Sample OpenShift CR

- -

The following Custom Resource can be used to create a Jenkins instance using the
-OpenShift Jenkins image and sets values for: -- `image: ‘quay.io/openshift/origin-jenkins:latest’ : This is the OpenShift Jenkins image.

- -
    -
  • serviceAccount: to allow oauth authentication to work, the service account needs -a specific annotation pointing to the route exposing the jenkins service. Here, -the route is named jenkins-route

  • - -
  • OPENSHIFT_ENABLE_OAUTH environment variable for the master container is set to true.

  • -
- -

Here is a complete Jenkins CR allowing the deployment of the Jenkins OpenShift image.

-
apiVersion: jenkins.io/v1alpha2
-kind: Jenkins
-metadata:
-  annotations:
-    jenkins.io/openshift-mode: 'true'
-  name: jenkins
-spec:
-  serviceAccount:
-    annotations:
-      serviceaccounts.openshift.io/oauth-redirectreference.jenkins: '{"kind":"OAuthRedirectReference","apiVersion":"v1","reference":{"kind":"Route","name":"jenkins-route"}}'
-  master:
-    containers:
-    - name: jenkins-master
-      image: 'quay.io/openshift/origin-jenkins:latest'
-      command:
-      - /usr/bin/go-init
-      - '-main'
-      - /usr/libexec/s2i/run
-      env:
-      - name: OPENSHIFT_ENABLE_OAUTH
-        value: 'true'
-      - name: OPENSHIFT_ENABLE_REDIRECT_PROMPT
-        value: 'true'
-      - name: DISABLE_ADMINISTRATIVE_MONITORS
-        value: 'false'
-      - name: KUBERNETES_MASTER
-        value: 'https://kubernetes.default:443'
-      - name: KUBERNETES_TRUST_CERTIFICATES
-        value: 'true'
-      - name: JENKINS_SERVICE_NAME
-        value: jenkins-operator-http-jenkins
-      - name: JNLP_SERVICE_NAME
-        value: jenkins-operator-slave-jenkins
-      - name: JENKINS_UC_INSECURE
-        value: 'false'
-      - name: JENKINS_HOME
-        value: /var/lib/jenkins
-      - name: JAVA_OPTS
-        value: >-
-          -XX:+UnlockExperimentalVMOptions -XX:+UnlockExperimentalVMOptions
-          -XX:+UseCGroupMemoryLimitForHeap -XX:MaxRAMFraction=1
-          -Djenkins.install.runSetupWizard=false -Djava.awt.headless=true
-      imagePullPolicy: Always
-  service:
-    port: 8080
-    type: ClusterIP
-  slaveService:
-    port: 50000
-    type: ClusterIP
-

OpenShift OAuth integration

- -

The creation of a Route is required for the integraiton of Jenkins with -OpenShift oauth authentication. By default, the jenkins http service is named -jenkins-operator-http-${jenkins-cr-name}

-
oc create route edge jenkins-route --service=jenkins-operator-http-jenkins
-

Note: the route name (jenkins-route) must match the pointed route on the serviceaccount annotation.

- -

After the creation of the Route. It can be used to navigate to the Jenkins Login Page and login with your Openshift Credentials.

- - - -
Last modified April 29, 2020 -
-
- - -
-
-
- - - - -
- - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/docs/getting-started/v0.5.x/schema/index.html b/docs/docs/getting-started/v0.5.x/schema/index.html deleted file mode 100644 index e9980c687..000000000 --- a/docs/docs/getting-started/v0.5.x/schema/index.html +++ /dev/null @@ -1,3612 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Schema | Jenkins Operator - - - - - - - - - - - - - - - - - - - - - - - - - - - - Schema | Jenkins Operator - - -
- - - -
-
-
-
-
- - - - - -
- - - - -
- - - - -
-
- - - - - - - - - - - -
-
- - - -
-

Schema

-
API Schema definitions for Jenkins CRD
- - -
-

This document contains API scheme for jenkins-operator Custom Resource Definition manifest

- -
- - -

Packages:

- -

jenkins.io

-

-

Package v1alpha2 contains API Schema definitions for the jenkins.io v1alpha2 API group

-

-Resource Types: - -

Jenkins -

-

-

Jenkins is the Schema for the jenkins API

-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldDescription
-apiVersion
-string
- -jenkins.io/v1alpha2 - -
-kind
-string -
Jenkins
-metadata
- - -Kubernetes meta/v1.ObjectMeta - - -
-Refer to the Kubernetes API documentation for the fields of the -metadata field. -
-spec
- - -JenkinsSpec - - -
-

Spec defines the desired state of the Jenkins

-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-master
- - -JenkinsMaster - - -
-

Master represents Jenkins master pod properties and Jenkins plugins. -Every single change here requires a pod restart.

-
-seedJobs
- - -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.SeedJob - - -
-(Optional) -

SeedJobs defines list of Jenkins Seed Job configurations -More info: https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configuration#configure-seed-jobs-and-pipelines

-
-notifications
- - -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Notification - - -
-(Optional) -

Notifications defines list of a services which are used to inform about Jenkins status -Can be used to integrate chat services like Slack, Microsoft Teams or Mailgun

-
-service
- - -Service - - -
-(Optional) -

Service is Kubernetes service of Jenkins master HTTP pod -Defaults to : -port: 8080 -type: ClusterIP

-
-slaveService
- - -Service - - -
-(Optional) -

Service is Kubernetes service of Jenkins slave pods -Defaults to : -port: 50000 -type: ClusterIP

-
-backup
- - -Backup - - -
-(Optional) -

Backup defines configuration of Jenkins backup -More info: https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configure-backup-and-restore/

-
-restore
- - -Restore - - -
-(Optional) -

Backup defines configuration of Jenkins backup restore -More info: https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configure-backup-and-restore/

-
-groovyScripts
- - -GroovyScripts - - -
-(Optional) -

GroovyScripts defines configuration of Jenkins customization via groovy scripts

-
-configurationAsCode
- - -ConfigurationAsCode - - -
-(Optional) -

ConfigurationAsCode defines configuration of Jenkins customization via Configuration as Code Jenkins plugin

-
-roles
- - -[]Kubernetes rbac/v1.RoleRef - - -
-(Optional) -

Roles defines list of extra RBAC roles for the Jenkins Master pod service account

-
-serviceAccount
- - -ServiceAccount - - -
-(Optional) -

ServiceAccount defines Jenkins master service account attributes

-
-jenkinsAPISettings
- - -JenkinsAPISettings - - -
-

JenkinsAPISettings defines configuration used by the operator to gain admin access to the Jenkins API

-
-
-status
- - -JenkinsStatus - - -
-

Status defines the observed state of Jenkins

-
-

AppliedGroovyScript -

-

-(Appears on: -JenkinsStatus) -

-

-

AppliedGroovyScript is the applied groovy script in Jenkins by the operator.

-

- - - - - - - - - - - - - - - - - - - - - - - - - -
FieldDescription
-configurationType
- -string - -
-

ConfigurationType is the name of the configuration type(base-groovy, user-groovy, user-casc)

-
-source
- -string - -
-

Source is the name of source where is located groovy script

-
-name
- -string - -
-

Name is the name of the groovy script

-
-hash
- -string - -
-

Hash is the hash of the groovy script and secrets which it uses

-
-

AuthorizationStrategy -(string alias)

-

-(Appears on: -JenkinsAPISettings) -

-

-

AuthorizationStrategy defines authorization strategy of the operator for the Jenkins API

-

-

Backup -

-

-(Appears on: -JenkinsSpec) -

-

-

Backup defines configuration of Jenkins backup.

-

- - - - - - - - - - - - - - - - - - - - - - - - - -
FieldDescription
-containerName
- -string - -
-

ContainerName is the container name responsible for backup operation

-
-action
- - -Handler - - -
-

Action defines action which performs backup in backup container sidecar

-
-interval
- -uint64 - -
-

Interval tells how often make backup in seconds -Defaults to 30.

-
-makeBackupBeforePodDeletion
- -bool - -
-

MakeBackupBeforePodDeletion tells operator to make backup before Jenkins master pod deletion

-
-

ConfigMapRef -

-

-(Appears on: -Customization) -

-

-

ConfigMapRef is reference to Kubernetes ConfigMap.

-

- - - - - - - - - - - - - -
FieldDescription
-name
- -string - -
-
-

ConfigurationAsCode -

-

-(Appears on: -JenkinsSpec) -

-

-

ConfigurationAsCode defines configuration of Jenkins customization via Configuration as Code Jenkins plugin.

-

- - - - - - - - - - - - - -
FieldDescription
-Customization
- - -Customization - - -
-

-(Members of Customization are embedded into this type.) -

-
-

Container -

-

-(Appears on: -JenkinsMaster) -

-

-

Container defines Kubernetes container attributes.

-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldDescription
-name
- -string - -
-

Name of the container specified as a DNS_LABEL. -Each container in a pod must have a unique name (DNS_LABEL).

-
-image
- -string - -
-

Docker image name. -More info: https://kubernetes.io/docs/concepts/containers/images

-
-imagePullPolicy
- - -Kubernetes core/v1.PullPolicy - - -
-

Image pull policy. -One of Always, Never, IfNotPresent. -Defaults to Always.

-
-resources
- - -Kubernetes core/v1.ResourceRequirements - - -
-

Compute Resources required by this container. -More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/

-
-command
- -[]string - -
-(Optional) -

Entrypoint array. Not executed within a shell. -The docker image’s ENTRYPOINT is used if this is not provided. -Variable references $(VAR_NAME) are expanded using the container’s environment. If a variable -cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax -can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, -regardless of whether the variable exists or not. -More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell

-
-args
- -[]string - -
-(Optional) -

Arguments to the entrypoint. -The docker image’s CMD is used if this is not provided. -Variable references $(VAR_NAME) are expanded using the container’s environment. If a variable -cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax -can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, -regardless of whether the variable exists or not. -More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell

-
-workingDir
- -string - -
-(Optional) -

Container’s working directory. -If not specified, the container runtime’s default will be used, which -might be configured in the container image.

-
-ports
- - -[]Kubernetes core/v1.ContainerPort - - -
-(Optional) -

List of ports to expose from the container. Exposing a port here gives -the system additional information about the network connections a -container uses, but is primarily informational. Not specifying a port here -DOES NOT prevent that port from being exposed. Any port which is -listening on the default “0.0.0.0” address inside a container will be -accessible from the network.

-
-envFrom
- - -[]Kubernetes core/v1.EnvFromSource - - -
-(Optional) -

List of sources to populate environment variables in the container. -The keys defined within a source must be a C_IDENTIFIER. All invalid keys -will be reported as an event when the container is starting. When a key exists in multiple -sources, the value associated with the last source will take precedence. -Values defined by an Env with a duplicate key will take precedence.

-
-env
- - -[]Kubernetes core/v1.EnvVar - - -
-(Optional) -

List of environment variables to set in the container.

-
-volumeMounts
- - -[]Kubernetes core/v1.VolumeMount - - -
-(Optional) -

Pod volumes to mount into the container’s filesystem.

-
-livenessProbe
- - -Kubernetes core/v1.Probe - - -
-(Optional) -

Periodic probe of container liveness. -Container will be restarted if the probe fails.

-
-readinessProbe
- - -Kubernetes core/v1.Probe - - -
-(Optional) -

Periodic probe of container service readiness. -Container will be removed from service endpoints if the probe fails.

-
-lifecycle
- - -Kubernetes core/v1.Lifecycle - - -
-(Optional) -

Actions that the management system should take in response to container lifecycle events.

-
-securityContext
- - -Kubernetes core/v1.SecurityContext - - -
-(Optional) -

Security options the pod should run with. -More info: https://kubernetes.io/docs/concepts/policy/security-context/ -More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/

-
-

Customization -

-

-(Appears on: -ConfigurationAsCode, -GroovyScripts) -

-

-

Customization defines configuration of Jenkins customization.

-

- - - - - - - - - - - - - - - - - -
FieldDescription
-secret
- - -SecretRef - - -
-
-configurations
- - -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.ConfigMapRef - - -
-
-

GroovyScripts -

-

-(Appears on: -JenkinsSpec) -

-

-

GroovyScripts defines configuration of Jenkins customization via groovy scripts.

-

- - - - - - - - - - - - - -
FieldDescription
-Customization
- - -Customization - - -
-

-(Members of Customization are embedded into this type.) -

-
-

Handler -

-

-(Appears on: -Backup, -Restore) -

-

-

Handler defines a specific action that should be taken.

-

- - - - - - - - - - - - - -
FieldDescription
-exec
- - -Kubernetes core/v1.ExecAction - - -
-

Exec specifies the action to take.

-
-

Image -

-

-(Appears on: -JenkinsImageSpec) -

-

-

Defines Jenkins Plugin structure

-

- - - - - - - - - - - - - - - - - -
FieldDescription
-name
- -string - -
-
-version
- -string - -
-
-

JenkinsAPISettings -

-

-(Appears on: -JenkinsSpec) -

-

-

JenkinsAPISettings defines configuration used by the operator to gain admin access to the Jenkins API

-

- - - - - - - - - - - - - -
FieldDescription
-authorizationStrategy
- - -AuthorizationStrategy - - -
-
-

JenkinsCredentialType -(string alias)

-

-(Appears on: -SeedJob) -

-

-

JenkinsCredentialType defines type of Jenkins credential used to seed job mechanism.

-

-

JenkinsImage -

-

-

JenkinsImage is the Schema for the jenkinsimages API

-

- - - - - - - - - - - - - - - - - - - - - -
FieldDescription
-metadata
- - -Kubernetes meta/v1.ObjectMeta - - -
-Refer to the Kubernetes API documentation for the fields of the -metadata field. -
-spec
- - -JenkinsImageSpec - - -
-
-
- - - - - - - - - -
-image
- - -Image - - -
-
-plugins
- - -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsPlugin - - -
-
-
-status
- - -JenkinsImageStatus - - -
-
-

JenkinsImageSpec -

-

-(Appears on: -JenkinsImage) -

-

-

JenkinsImageSpec defines the desired state of JenkinsImage

-

- - - - - - - - - - - - - - - - - -
FieldDescription
-image
- - -Image - - -
-
-plugins
- - -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsPlugin - - -
-
-

JenkinsImageStatus -

-

-(Appears on: -JenkinsImage) -

-

-

JenkinsImageStatus defines the observed state of JenkinsImage

-

- - - - - - - - - - - - - - - - - - - - - -
FieldDescription
-image
- -string - -
-
-md5sum
- -string - -
-
-installedPlugins
- - -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsPlugin - - -
-
-

JenkinsMaster -

-

-(Appears on: -JenkinsSpec) -

-

-

JenkinsMaster defines the Jenkins master pod attributes and plugins, -every single change requires a Jenkins master pod restart.

-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldDescription
-annotations
- -map[string]string - -
-(Optional) -

Annotations is an unstructured key value map stored with a resource that may be -set by external tools to store and retrieve arbitrary metadata. They are not -queryable and should be preserved when modifying objects. -More info: http://kubernetes.io/docs/user-guide/annotations

-
-masterAnnotations
- -map[string]string - -
-(Optional) -

Annotations is an unstructured key value map stored with a resource that may be -set by external tools to store and retrieve arbitrary metadata. They are not -queryable and should be preserved when modifying objects. -More info: http://kubernetes.io/docs/user-guide/annotations -Deprecated: will be removed in the future, please use Annotations(annotations)

-
-labels
- -map[string]string - -
-(Optional) -

Map of string keys and values that can be used to organize and categorize -(scope and select) objects. May match selectors of replication controllers -and services. -More info: http://kubernetes.io/docs/user-guide/labels

-
-nodeSelector
- -map[string]string - -
-(Optional) -

NodeSelector is a selector which must be true for the pod to fit on a node. -Selector which must match a node’s labels for the pod to be scheduled on that node. -More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/

-
-securityContext
- - -Kubernetes core/v1.PodSecurityContext - - -
-(Optional) -

SecurityContext that applies to all the containers of the Jenkins -Master. As per kubernetes specification, it can be overridden -for each container individually. -Defaults to: -runAsUser: 1000 -fsGroup: 1000

-
-containers
- - -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Container - - -
-(Optional) -

List of containers belonging to the pod. -Containers cannot currently be added or removed. -There must be at least one container in a Pod. -Defaults to: -- image: jenkins/jenkins:lts -imagePullPolicy: Always -livenessProbe: -failureThreshold: 12 -httpGet: -path: /login -port: http -scheme: HTTP -initialDelaySeconds: 80 -periodSeconds: 10 -successThreshold: 1 -timeoutSeconds: 5 -name: jenkins-master -readinessProbe: -failureThreshold: 3 -httpGet: -path: /login -port: http -scheme: HTTP -initialDelaySeconds: 30 -periodSeconds: 10 -successThreshold: 1 -timeoutSeconds: 1 -resources: -limits: -cpu: 1500m -memory: 3Gi -requests: -cpu: “1” -memory: 600Mi

-
-imagePullSecrets
- - -[]Kubernetes core/v1.LocalObjectReference - - -
-(Optional) -

ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. -If specified, these secrets will be passed to individual puller implementations for them to use. For example, -in the case of docker, only DockerConfig type secrets are honored. -More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod

-
-volumes
- - -[]Kubernetes core/v1.Volume - - -
-(Optional) -

List of volumes that can be mounted by containers belonging to the pod. -More info: https://kubernetes.io/docs/concepts/storage/volumes

-
-tolerations
- - -[]Kubernetes core/v1.Toleration - - -
-(Optional) -

If specified, the pod’s tolerations.

-
-basePlugins
- - -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Plugin - - -
-(Optional) -

BasePlugins contains plugins required by operator -Defaults to : -- name: kubernetes -version: “1.28.6” -- name: workflow-job -version: “2.40” -- name: workflow-aggregator -version: “2.6” -- name: git -version: “4.5.0” -- name: job-dsl -version: “1.77” -- name: configuration-as-code -version: “1.46” -- name: kubernetes-credentials-provider -version: “0.15”

-
-plugins
- - -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Plugin - - -
-(Optional) -

Plugins contains plugins required by user

-
-disableCSRFProtection
- -bool - -
-

DisableCSRFProtection allows you to toggle CSRF Protection on Jenkins

-
-priorityClassName
- -string - -
-(Optional) -

PriorityClassName for Jenkins master pod

-
-

JenkinsPlugin -

-

-(Appears on: -JenkinsImageSpec, -JenkinsImageStatus) -

-

-

Defines Jenkins Plugin structure

-

- - - - - - - - - - - - - - - - - -
FieldDescription
-name
- -string - -
-
-version
- -string - -
-
-

JenkinsSpec -

-

-(Appears on: -Jenkins) -

-

-

JenkinsSpec defines the desired state of the Jenkins.

-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldDescription
-master
- - -JenkinsMaster - - -
-

Master represents Jenkins master pod properties and Jenkins plugins. -Every single change here requires a pod restart.

-
-seedJobs
- - -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.SeedJob - - -
-(Optional) -

SeedJobs defines list of Jenkins Seed Job configurations -More info: https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configuration#configure-seed-jobs-and-pipelines

-
-notifications
- - -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Notification - - -
-(Optional) -

Notifications defines list of a services which are used to inform about Jenkins status -Can be used to integrate chat services like Slack, Microsoft Teams or Mailgun

-
-service
- - -Service - - -
-(Optional) -

Service is Kubernetes service of Jenkins master HTTP pod -Defaults to : -port: 8080 -type: ClusterIP

-
-slaveService
- - -Service - - -
-(Optional) -

Service is Kubernetes service of Jenkins slave pods -Defaults to : -port: 50000 -type: ClusterIP

-
-backup
- - -Backup - - -
-(Optional) -

Backup defines configuration of Jenkins backup -More info: https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configure-backup-and-restore/

-
-restore
- - -Restore - - -
-(Optional) -

Backup defines configuration of Jenkins backup restore -More info: https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configure-backup-and-restore/

-
-groovyScripts
- - -GroovyScripts - - -
-(Optional) -

GroovyScripts defines configuration of Jenkins customization via groovy scripts

-
-configurationAsCode
- - -ConfigurationAsCode - - -
-(Optional) -

ConfigurationAsCode defines configuration of Jenkins customization via Configuration as Code Jenkins plugin

-
-roles
- - -[]Kubernetes rbac/v1.RoleRef - - -
-(Optional) -

Roles defines list of extra RBAC roles for the Jenkins Master pod service account

-
-serviceAccount
- - -ServiceAccount - - -
-(Optional) -

ServiceAccount defines Jenkins master service account attributes

-
-jenkinsAPISettings
- - -JenkinsAPISettings - - -
-

JenkinsAPISettings defines configuration used by the operator to gain admin access to the Jenkins API

-
-

JenkinsStatus -

-

-(Appears on: -Jenkins) -

-

-

JenkinsStatus defines the observed state of Jenkins

-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldDescription
-operatorVersion
- -string - -
-(Optional) -

OperatorVersion is the operator version which manages this CR

-
-provisionStartTime
- - -Kubernetes meta/v1.Time - - -
-(Optional) -

ProvisionStartTime is a time when Jenkins master pod has been created

-
-baseConfigurationCompletedTime
- - -Kubernetes meta/v1.Time - - -
-(Optional) -

BaseConfigurationCompletedTime is a time when Jenkins base configuration phase has been completed

-
-userConfigurationCompletedTime
- - -Kubernetes meta/v1.Time - - -
-(Optional) -

UserConfigurationCompletedTime is a time when Jenkins user configuration phase has been completed

-
-restoredBackup
- -uint64 - -
-(Optional) -

RestoredBackup is the restored backup number after Jenkins master pod restart

-
-lastBackup
- -uint64 - -
-(Optional) -

LastBackup is the latest backup number

-
-pendingBackup
- -uint64 - -
-(Optional) -

PendingBackup is the pending backup number

-
-backupDoneBeforePodDeletion
- -bool - -
-(Optional) -

BackupDoneBeforePodDeletion tells if backup before pod deletion has been made

-
-userAndPasswordHash
- -string - -
-(Optional) -

UserAndPasswordHash is a SHA256 hash made from user and password

-
-createdSeedJobs
- -[]string - -
-(Optional) -

CreatedSeedJobs contains list of seed job id already created in Jenkins

-
-appliedGroovyScripts
- - -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.AppliedGroovyScript - - -
-(Optional) -

AppliedGroovyScripts is a list with all applied groovy scripts in Jenkins by the operator

-
-

Mailgun -

-

-(Appears on: -Notification) -

-

-

Mailgun is handler for Mailgun email service notification channel.

-

- - - - - - - - - - - - - - - - - - - - - - - - - -
FieldDescription
-domain
- -string - -
-
-apiKeySecretKeySelector
- - -SecretKeySelector - - -
-
-recipient
- -string - -
-
-from
- -string - -
-
-

MicrosoftTeams -

-

-(Appears on: -Notification) -

-

-

MicrosoftTeams is handler for Microsoft MicrosoftTeams notification channel.

-

- - - - - - - - - - - - - -
FieldDescription
-webHookURLSecretKeySelector
- - -SecretKeySelector - - -
-

The web hook URL to MicrosoftTeams App

-
-

Notification -

-

-(Appears on: -JenkinsSpec) -

-

-

Notification is a service configuration used to send notifications about Jenkins status.

-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldDescription
-level
- - -NotificationLevel - - -
-
-verbose
- -bool - -
-
-name
- -string - -
-
-slack
- - -github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Slack - - -
-
-teams
- - -github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.MicrosoftTeams - - -
-
-mailgun
- - -github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Mailgun - - -
-
-smtp
- - -github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.SMTP - - -
-
-

NotificationLevel -(string alias)

-

-(Appears on: -Notification) -

-

-

NotificationLevel defines the level of a Notification.

-

-

Plugin -

-

-(Appears on: -JenkinsMaster) -

-

-

Plugin defines Jenkins plugin.

-

- - - - - - - - - - - - - - - - - - - - - -
FieldDescription
-name
- -string - -
-

Name is the name of Jenkins plugin

-
-version
- -string - -
-

Version is the version of Jenkins plugin

-
-downloadURL
- -string - -
-

DownloadURL is the custom url from where plugin has to be downloaded.

-
-

Restore -

-

-(Appears on: -JenkinsSpec) -

-

-

Restore defines configuration of Jenkins backup restore operation.

-

- - - - - - - - - - - - - - - - - - - - - - - - - -
FieldDescription
-containerName
- -string - -
-

ContainerName is the container name responsible for restore backup operation

-
-action
- - -Handler - - -
-

Action defines action which performs restore backup in restore container sidecar

-
-getLatestAction
- - -Handler - - -
-(Optional) -

GetLatestAction defines action which returns the latest backup number. If there is no backup “-1” should be -returned.

-
-recoveryOnce
- -uint64 - -
-(Optional) -

RecoveryOnce if want to restore specific backup set this field and then Jenkins will be restarted and desired backup will be restored

-
-

SMTP -

-

-(Appears on: -Notification) -

-

-

SMTP is handler for sending emails via this protocol.

-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldDescription
-usernameSecretKeySelector
- - -SecretKeySelector - - -
-
-passwordSecretKeySelector
- - -SecretKeySelector - - -
-
-port
- -int - -
-
-server
- -string - -
-
-tlsInsecureSkipVerify
- -bool - -
-
-from
- -string - -
-
-to
- -string - -
-
-

SecretKeySelector -

-

-(Appears on: -Mailgun, -MicrosoftTeams, -SMTP, -Slack) -

-

-

SecretKeySelector selects a key of a Secret.

-

- - - - - - - - - - - - - - - - - -
FieldDescription
-secret
- - -Kubernetes core/v1.LocalObjectReference - - -
-

The name of the secret in the pod’s namespace to select from.

-
-key
- -string - -
-

The key of the secret to select from. Must be a valid secret key.

-
-

SecretRef -

-

-(Appears on: -Customization) -

-

-

SecretRef is reference to Kubernetes secret.

-

- - - - - - - - - - - - - -
FieldDescription
-name
- -string - -
-
-

SeedJob -

-

-(Appears on: -JenkinsSpec) -

-

-

SeedJob defines configuration for seed job -More info: https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configuration/#configure-seed-jobs-and-pipelines.

-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldDescription
-id
- -string - -
-

ID is the unique seed job name

-
-credentialID
- -string - -
-

CredentialID is the Kubernetes secret name which stores repository access credentials

-
-description
- -string - -
-(Optional) -

Description is the description of the seed job

-
-targets
- -string - -
-

Targets is the repository path where are seed job definitions

-
-repositoryBranch
- -string - -
-

RepositoryBranch is the repository branch where are seed job definitions

-
-repositoryUrl
- -string - -
-

RepositoryURL is the repository access URL. Can be SSH or HTTPS.

-
-credentialType
- - -JenkinsCredentialType - - -
-(Optional) -

JenkinsCredentialType is the https://jenkinsci.github.io/kubernetes-credentials-provider-plugin/ credential type

-
-bitbucketPushTrigger
- -bool - -
-(Optional) -

BitbucketPushTrigger is used for Bitbucket web hooks

-
-githubPushTrigger
- -bool - -
-(Optional) -

GitHubPushTrigger is used for GitHub web hooks

-
-buildPeriodically
- -string - -
-(Optional) -

BuildPeriodically is setting for scheduled trigger

-
-pollSCM
- -string - -
-(Optional) -

PollSCM is setting for polling changes in SCM

-
-ignoreMissingFiles
- -bool - -
-(Optional) -

IgnoreMissingFiles is setting for Job DSL API plugin to ignore files that miss

-
-additionalClasspath
- -string - -
-(Optional) -

AdditionalClasspath is setting for Job DSL API plugin to set Additional Classpath

-
-failOnMissingPlugin
- -bool - -
-(Optional) -

FailOnMissingPlugin is setting for Job DSL API plugin that fails job if required plugin is missing

-
-unstableOnDeprecation
- -bool - -
-(Optional) -

UnstableOnDeprecation is setting for Job DSL API plugin that sets build status as unstable if build using deprecated features

-
-

Service -

-

-(Appears on: -JenkinsSpec) -

-

-

Service defines Kubernetes service attributes

-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldDescription
-annotations
- -map[string]string - -
-(Optional) -

Annotations is an unstructured key value map stored with a resource that may be -set by external tools to store and retrieve arbitrary metadata. They are not -queryable and should be preserved when modifying objects. -More info: http://kubernetes.io/docs/user-guide/annotations

-
-labels
- -map[string]string - -
-(Optional) -

Route service traffic to pods with label keys and values matching this -selector. If empty or not present, the service is assumed to have an -external process managing its endpoints, which Kubernetes will not -modify. Only applies to types ClusterIP, NodePort, and LoadBalancer. -Ignored if type is ExternalName. -More info: https://kubernetes.io/docs/concepts/services-networking/service/

-
-type
- - -Kubernetes core/v1.ServiceType - - -
-(Optional) -

Type determines how the Service is exposed. Defaults to ClusterIP. Valid -options are ExternalName, ClusterIP, NodePort, and LoadBalancer. -“ExternalName” maps to the specified externalName. -“ClusterIP” allocates a cluster-internal IP address for load-balancing to -endpoints. Endpoints are determined by the selector or if that is not -specified, by manual construction of an Endpoints object. If clusterIP is -“None”, no virtual IP is allocated and the endpoints are published as a -set of endpoints rather than a stable IP. -“NodePort” builds on ClusterIP and allocates a port on every node which -routes to the clusterIP. -“LoadBalancer” builds on NodePort and creates an -external load-balancer (if supported in the current cloud) which routes -to the clusterIP. -More info: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services—service-types

-
-port
- -int32 - -
-

The port that are exposed by this service. -More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies

-
-nodePort
- -int32 - -
-(Optional) -

The port on each node on which this service is exposed when type=NodePort or LoadBalancer. -Usually assigned by the system. If specified, it will be allocated to the service -if unused or else creation of the service will fail. -Default is to auto-allocate a port if the ServiceType of this Service requires one. -More info: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport

-
-loadBalancerSourceRanges
- -[]string - -
-(Optional) -

If specified and supported by the platform, this will restrict traffic through the cloud-provider -load-balancer will be restricted to the specified client IPs. This field will be ignored if the -cloud-provider does not support the feature.” -More info: https://kubernetes.io/docs/tasks/administer-cluster/securing-a-cluster/#restricting-cloud-metadata-api-access

-
-loadBalancerIP
- -string - -
-(Optional) -

Only applies to Service Type: LoadBalancer -LoadBalancer will get created with the IP specified in this field. -This feature depends on whether the underlying cloud-provider supports specifying -the loadBalancerIP when a load balancer is created. -This field will be ignored if the cloud-provider does not support the feature.

-
-

ServiceAccount -

-

-(Appears on: -JenkinsSpec) -

-

-

ServiceAccount defines Kubernetes service account attributes

-

- - - - - - - - - - - - - -
FieldDescription
-annotations
- -map[string]string - -
-(Optional) -

Annotations is an unstructured key value map stored with a resource that may be -set by external tools to store and retrieve arbitrary metadata. They are not -queryable and should be preserved when modifying objects. -More info: http://kubernetes.io/docs/user-guide/annotations

-
-

Slack -

-

-(Appears on: -Notification) -

-

-

Slack is handler for Slack notification channel.

-

- - - - - - - - - - - - - -
FieldDescription
-webHookURLSecretKeySelector
- - -SecretKeySelector - - -
-

The web hook URL to Slack App

-
-
-

-Generated with gen-crd-api-reference-docs -on git commit fe81e5a. -

- - - -
Last modified January 18, 2021 -
-
- - -
-
-
- - - - -
- - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/docs/getting-started/v0.6.x/aks/index.html b/docs/docs/getting-started/v0.6.x/aks/index.html deleted file mode 100644 index e270dc028..000000000 --- a/docs/docs/getting-started/v0.6.x/aks/index.html +++ /dev/null @@ -1,986 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -AKS | Jenkins Operator - - - - - - - - - - - - - - - - - - - - - - - - - - - - AKS | Jenkins Operator - - -
- - - -
-
-
-
-
- - - - - -
- - - - -
- - - - -
-
- - - - - - - - - - - -
-
- - - -
-

AKS

-
Additional configuration for Azure Kubernetes Service
-

Azure AKS managed Kubernetes service adds to every pod the following environment variables:

-
- name: KUBERNETES_PORT_443_TCP_ADDR
-  value:
-- name: KUBERNETES_PORT
-  value: tcp://
-- name: KUBERNETES_PORT_443_TCP
-  value: tcp://
-- name: KUBERNETES_SERVICE_HOST
-  value:
-

The operator is aware of it and omits these environment variables when checking if a Jenkins pod environment has been changed. It prevents the -restart of a Jenkins pod over and over again.

- - - -
Last modified December 8, 2021 -
-
- - -
-
-
- - - - -
- - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/docs/getting-started/v0.6.x/configuring-backup-and-restore/index.html b/docs/docs/getting-started/v0.6.x/configuring-backup-and-restore/index.html deleted file mode 100644 index 44d1f1e5d..000000000 --- a/docs/docs/getting-started/v0.6.x/configuring-backup-and-restore/index.html +++ /dev/null @@ -1,1072 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Configuring backup and restore | Jenkins Operator - - - - - - - - - - - - - - - - - - - - - - - - - - - - Configuring backup and restore | Jenkins Operator - - -
- - - -
-
-
-
-
- - - - - -
- - - - -
- - - - -
-
- - - - - - - - - - - - - - - -
-
- - - -
-

Configuring backup and restore

-
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

- -

Create PVC

- -

Save to the file named pvc.yaml:

-
apiVersion: v1
-kind: PersistentVolumeClaim
-metadata:
-  name: <pvc_name>
-  namespace: <namespace>
-spec:
-  accessModes:
-  - ReadWriteOnce
-  resources:
-    requests:
-      storage: 500Gi
-

Run the following command:

-
$ kubectl -n <namespace> create -f pvc.yaml
-

Configure Jenkins CR

-
apiVersion: jenkins.io/v1alpha2
-kind: Jenkins
-metadata:
-  name: <cr_name>
-  namespace: <namespace>
-spec:
-  master:
-    securityContext:
-      runAsUser: 1000
-      fsGroup: 1000
-    containers:
-    - name: jenkins-master
-      image: jenkins/jenkins:2.277.4-lts-alpine
-    - name: backup # container responsible for the backup and restore
-      env:
-      - name: BACKUP_DIR
-        value: /backup
-      - name: JENKINS_HOME
-        value: /jenkins-home
-      - name: BACKUP_COUNT
-        value: "3" # keep only the 2 most recent backups
-      image: virtuslab/jenkins-operator-backup-pvc:v0.1.0 # look at backup/pvc directory
-      imagePullPolicy: IfNotPresent
-      volumeMounts:
-      - mountPath: /jenkins-home # Jenkins home volume
-        name: jenkins-home
-      - mountPath: /backup # backup volume
-        name: backup
-    volumes:
-    - name: backup # PVC volume where backups will be stored
-      persistentVolumeClaim:
-        claimName: <pvc_name>
-  backup:
-    containerName: backup # container name is responsible for backup
-    action:
-      exec:
-        command:
-        - /home/user/bin/backup.sh # this command is invoked on "backup" container to make backup, for example /home/user/bin/backup.sh <backup_number>, <backup_number> is passed by operator
-    getLatestAction:
-      exec:
-        command:
-        - /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:
-    containerName: backup # container name is responsible for restore backup
-    action:
-      exec:
-        command:
-        - /home/user/bin/restore.sh # this command is invoked on "backup" container to make restore backup, for example /home/user/bin/restore.sh <backup_number>, <backup_number> is passed by operator
-    #recoveryOnce: <backup_number> # if want to restore specific backup configure this field and then Jenkins will be restarted and desired backup will be restored
- - -
Last modified December 8, 2021 -
-
- - -
-
-
- - - - -
- - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/docs/getting-started/v0.6.x/configuring-seed-jobs-and-pipelines/index.html b/docs/docs/getting-started/v0.6.x/configuring-seed-jobs-and-pipelines/index.html deleted file mode 100644 index b4373ed64..000000000 --- a/docs/docs/getting-started/v0.6.x/configuring-seed-jobs-and-pipelines/index.html +++ /dev/null @@ -1,1273 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Configuring Seed Jobs and Pipelines | Jenkins Operator - - - - - - - - - - - - - - - - - - - - - - - - - - - - Configuring Seed Jobs and Pipelines | Jenkins Operator - - -
- - - -
-
-
-
-
- - - - - -
- - - - -
- - - - -
- -
- - - -
-

Configuring Seed Jobs and Pipelines

-
How to configure Jenkins with Operator
- - -

Configure Seed Jobs and Pipelines

- -

Jenkins operator uses job-dsl and kubernetes-credentials-provider plugins for configuring jobs -and deploy keys.

- -

Prepare job definitions and pipelines

- -

First you have to prepare pipelines and job definition in your GitHub repository using the following structure:

-
cicd/
-├── jobs
-│   └── k8s.jenkins
-└── pipelines
-    └── k8s.jenkins
-

cicd/jobs/k8s.jenkins is a job definition:

-
#!/usr/bin/env groovy
-
-pipelineJob('k8s-e2e') {
-    displayName('Kubernetes Plugin E2E Test')
-
-    logRotator {
-        numToKeep(10)
-        daysToKeep(30)
-    }
-
-    configure { project ->
-        project / 'properties' / 'org.jenkinsci.plugins.workflow.job.properties.DurabilityHintJobProperty' {
-            hint('PERFORMANCE_OPTIMIZED')
-        }
-    }
-
-    definition {
-        cpsScm {
-            scm {
-                git {
-                    remote {
-                        url('https://github.com/jenkinsci/kubernetes-operator.git')
-                        credentials('jenkins-operator')
-                    }
-                    branches('*/master')
-                }
-            }
-            scriptPath('cicd/pipelines/k8s.jenkins')
-        }
-    }
-}
-

cicd/pipelines/k8s.jenkins is an actual Jenkins pipeline:

-
#!/usr/bin/env groovy
-
-def label = "k8s-${UUID.randomUUID().toString()}"
-def home = "/home/jenkins"
-def workspace = "${home}/workspace/build-jenkins-operator"
-def workdir = "${workspace}/src/github.com/jenkinsci/kubernetes-operator/"
-
-podTemplate(label: label,
-        containers: [
-                containerTemplate(name: 'alpine', image: 'alpine:3.11', ttyEnabled: true, command: 'cat'),
-        ],
-        ) {
-    node(label) {
-        stage('Run shell') {
-            container('alpine') {
-                sh 'echo "hello world"'
-            }
-        }
-    }
-}
-

Configure Seed Jobs

- -

Jenkins Seed Jobs are configured using Jenkins.spec.seedJobs section from your custom resource manifest:

-
apiVersion: jenkins.io/v1alpha2
-kind: Jenkins
-metadata:
-  name: example
-spec:
-  seedJobs:
-  - id: jenkins-operator
-    targets: "cicd/jobs/*.jenkins"
-    description: "Jenkins Operator repository"
-    repositoryBranch: master
-    repositoryUrl: https://github.com/jenkinsci/kubernetes-operator.git
-

Jenkins Operator will automatically discover and configure all the seed jobs.

- -

You can verify if deploy keys were successfully configured in the Jenkins Credentials tab.

- -

jenkins

- -

You can verify if your pipelines were successfully configured in the Jenkins Seed Job console output.

- -

jenkins

- -

If your GitHub repository is private you have to configure SSH or username/password authentication.

- -

SSH authentication

- -

Generate SSH Keys

- -

There are two methods of SSH private key generation:

-
$ openssl genrsa -out <filename> 2048
-

or

-
$ ssh-keygen -t rsa -b 2048
-$ ssh-keygen -p -f <filename> -m pem
-

Then copy content from generated file.

- -

Public key

- -

If you want to upload your public key to your Git server you need to extract it.

- -

If key was generated by openssl then you need to type this to extract public key:

-
$ openssl rsa -in <filename> -pubout > <filename>.pub
-

If key was generated by ssh-keygen the public key content is located in .pub and there is no need to extract public key

- -

Configure SSH authentication

- -

Configure a seed job like this:

-
apiVersion: jenkins.io/v1alpha2
-kind: Jenkins
-metadata:
-  name: example
-spec:
-  seedJobs:
-  - id: jenkins-operator-ssh
-    credentialType: basicSSHUserPrivateKey
-    credentialID: k8s-ssh
-    targets: "cicd/jobs/*.jenkins"
-    description: "Jenkins Operator repository"
-    repositoryBranch: master
-    repositoryUrl: git@github.com:jenkinsci/kubernetes-operator.git
-

and create a Kubernetes Secret (name of secret should be the same from credentialID field):

-
apiVersion: v1
-kind: Secret
-metadata:
-  name: k8s-ssh
-  labels:
-    "jenkins.io/credentials-type": "basicSSHUserPrivateKey"
-  annotations:
-    "jenkins.io/credentials-description" : "ssh github.com:jenkinsci/kubernetes-operator"
-stringData:
-  privateKey: |
-    -----BEGIN RSA PRIVATE KEY-----
-    MIIJKAIBAAKCAgEAxxDpleJjMCN5nusfW/AtBAZhx8UVVlhhhIKXvQ+dFODQIdzO
-    oDXybs1zVHWOj31zqbbJnsfsVZ9Uf3p9k6xpJ3WFY9b85WasqTDN1xmSd6swD4N8
-    ...
-  username: github_user_name
-

Username & password authentication

- -

Configure the seed job like:

-
apiVersion: jenkins.io/v1alpha2
-kind: Jenkins
-metadata:
-  name: example
-spec:
-  seedJobs:
-  - id: jenkins-operator-user-pass
-    credentialType: usernamePassword
-    credentialID: k8s-user-pass
-    targets: "cicd/jobs/*.jenkins"
-    description: "Jenkins Operator repository"
-    repositoryBranch: master
-    repositoryUrl: https://github.com/jenkinsci/kubernetes-operator.git
-

and create a Kubernetes Secret (name of secret should be the same from credentialID field):

-
apiVersion: v1
-kind: Secret
-metadata:
-  name: k8s-user-pass
-stringData:
-  username: github_user_name
-  password: password_or_token
-

External authentication

- -

You can use external credential type if you want to configure authentication using Configuration As Code or Groovy Script.

- -

Example:

-
apiVersion: jenkins.io/v1alpha2
-kind: Jenkins
-metadata:
-  name: example
-spec:
-  seedJobs:
-  - id: jenkins-operator-external
-    credentialType: external
-    credentialID: k8s-external
-    targets: "cicd/jobs/*.jenkins"
-    description: "Jenkins Operator repository"
-    repositoryBranch: master
-    repositoryUrl: https://github.com/jenkinsci/kubernetes-operator.git
-

Remember that credentialID must match the id of the credentials configured in Jenkins. Consult the -Jenkins docs for using credentials for details.

- -

HTTP Proxy for downloading plugins

- -

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.:

-
spec:
-  master:
-    containers:
-      - name: jenkins-master
-        env:
-          - name: CURL_OPTIONS
-            value: -L -x <proxy_url>
-

In CURL_OPTIONS var you can set additional arguments to curl command.

- -

Pulling Docker images from private repositories

- -

To pull a Docker Image from private repository you can use imagePullSecrets.

- -

Please follow the instructions on creating a secret with a docker config.

- -

Docker Hub Configuration

- -

To use Docker Hub additional steps are required.

- -

Edit the previously created secret:

-
kubectl -n <namespace> edit secret <name>
-

The .dockerconfigjson key’s value needs to be replaced with a modified version.

- -

After modifications, it needs to be encoded as a Base64 value before setting the .dockerconfigjson key.

- -

Example config file to modify and use:

-
{
-    "auths":{
-        "https://index.docker.io/v1/":{
-            "username":"user",
-            "password":"password",
-            "email":"yourdockeremail@gmail.com",
-            "auth":"base64 of string user:password"
-        },
-        "auth.docker.io":{
-            "username":"user",
-            "password":"password",
-            "email":"yourdockeremail@gmail.com",
-            "auth":"base64 of string user:password"
-        },
-        "registry.docker.io":{
-            "username":"user",
-            "password":"password",
-            "email":"yourdockeremail@gmail.com",
-            "auth":"base64 of string user:password"
-        },
-        "docker.io":{
-            "username":"user",
-            "password":"password",
-            "email":"yourdockeremail@gmail.com",
-            "auth":"base64 of string user:password"
-        },
-        "https://registry-1.docker.io/v2/": {
-            "username":"user",
-            "password":"password",
-            "email":"yourdockeremail@gmail.com",
-            "auth":"base64 of string user:password"
-        },
-        "registry-1.docker.io/v2/": {
-            "username":"user",
-            "password":"password",
-            "email":"yourdockeremail@gmail.com",
-            "auth":"base64 of string user:password"
-        },
-        "registry-1.docker.io": {
-            "username":"user",
-            "password":"password",
-            "email":"yourdockeremail@gmail.com",
-            "auth":"base64 of string user:password"
-        },
-        "https://registry-1.docker.io": {
-            "username":"user",
-            "password":"password",
-            "email":"yourdockeremail@gmail.com",
-            "auth":"base64 of string user:password"
-        }
-    }
-}
- - -
Last modified December 8, 2021 -
-
- - -
-
-
- - - - -
- - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/docs/getting-started/v0.6.x/custom-backup-and-restore/index.html b/docs/docs/getting-started/v0.6.x/custom-backup-and-restore/index.html deleted file mode 100644 index f4b16e781..000000000 --- a/docs/docs/getting-started/v0.6.x/custom-backup-and-restore/index.html +++ /dev/null @@ -1,1158 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Custom backup and restore providers | Jenkins Operator - - - - - - - - - - - - - - - - - - - - - - - - - - - - Custom backup and restore providers | Jenkins Operator - - -
- - - -
-
-
-
-
- - - - - -
- - - - -
- - - - -
- -
- - - -
-

Custom backup and restore providers

-
Custom backup and restore provider
- - -

With enough effort one can create a custom backup and restore provider -for the Jenkins Operator.

- -

Requirements

- -

Two commands (e.g. scripts) are required:

- -
    -
  • a backup command, e.g. backup.sh that takes one argument, a backup number
  • -
  • a restore command, e.g. backup.sh that takes one argument, a backup number
  • -
- -

Both scripts need to return an exit code of 0 on success and 1 or greater for failure.

- -

One of those scripts (or the entry point of the container) needs to be responsible -for backup cleanup or rotation if required, or an external system.

- -

How it works

- -

The mechanism relies on basic Kubernetes and UNIX functionalities.

- -

The backup (and restore) container runs as a sidecar in the same -Kubernetes pod as the Jenkins master.

- -

Name of the backup and restore containers can be set as necessary using -spec.backup.containerName and spec.restore.containerName. -In most cases it will be the same container, but we allow for less common use cases.

- -

The operator will call a backup or restore commands inside a sidecar container when necessary:

- -
    -
  • backup command (defined in spec.backup.action.exec.command) -will be called every N seconds configurable in: spec.backup.interval -and on pod shutdown (if enabled in spec.backup.makeBackupBeforePodDeletion) -with an integer representing the current backup number as first and only argument
  • -
  • restore command (defined in spec.restore.action.exec.command) -will be called at Jenkins startup -with an integer representing the backup number to restore as first and only argument -(can be overridden using spec.restore.recoveryOnce)
  • -
- -

Example AWS S3 backup using the CLI

- -

This example shows abbreviated version of a simple AWS S3 backup implementation -using: aws-cli, bash and kube2iam.

- -

In addition to your normal Jenkins CustomResource some additional settings -for backup and restore are required, e.g.:

-
kind: Jenkins
-apiVersion: jenkins.io/v1alpha1
-metadata:
-  name: example
-  namespace: jenkins
-spec:
-  master:
-    masterAnnotations:
-      iam.amazonaws.com/role: "my-example-backup-role" # tell kube2iam where the AWS IAM role is
-    containers:
-      - name: jenkins-master
-        ...
-      - name: backup # container responsible for backup and restore
-        image: quay.io/virtuslab/aws-cli:1.16.263-2
-        workingDir: /home/user/bin/
-        command: # our container entry point
-          - sleep
-          - infinity
-        env:
-          - name: BACKUP_BUCKET
-            value: my-example-bucket # the S3 bucket name to use
-          - name: BACKUP_PATH
-            value: my-backup-path # the S3 bucket path prefix to use
-          - name: JENKINS_HOME
-            value: /jenkins-home # the path to mount jenkins home dir in the backup container
-        volumeMounts:
-          - mountPath: /jenkins-home # Jenkins home volume
-            name: jenkins-home
-          - mountPath: /home/user/bin/backup.sh
-            name: backup-scripts
-            subPath: backup.sh
-            readOnly: true
-          - mountPath: /home/user/bin/restore.sh
-            name: backup-scripts
-            subPath: restore.sh
-            readOnly: true
-    volumes:
-      - name: backup-scripts
-        configMap:
-          defaultMode: 0754
-          name: jenkins-operator-backup-s3
-    securityContext: # make sure both containers use the same UID and GUID
-      runAsUser: 1000
-      fsGroup: 1000
-  ...
-  backup:
-    containerName: backup # container name responsible for backup
-    interval: 3600 # how often make a backup in seconds
-    makeBackupBeforePodDeletion: true # trigger backup just before deleting the pod
-    action:
-      exec:
-        command:
-          # this command is invoked on "backup" container to create a backup,
-          # <backup_number> is passed by operator,
-          # for example /home/user/bin/backup.sh <backup_number>
-          - /home/user/bin/backup.sh
-  restore:
-    containerName: backup # container name is responsible for restore backup
-    action:
-      exec:
-        command:
-          # this command is invoked on "backup" container to restore a backup,
-          # <backup_number> is passed by operator
-          # for example /home/user/bin/restore.sh <backup_number>
-          - /home/user/bin/restore.sh
-#    recoveryOnce: <backup_number> # if want to restore specific backup configure this field and then Jenkins will be restarted and desired backup will be restored
-

The actual backup and restore scripts will be provided in a ConfigMap:

-
kind: ConfigMap
-apiVersion: v1
-metadata:
-  name: jenkins-operator-backup-s3
-  namespace: jenkins
-  labels:
-    app: jenkins-operator
-data:
-  backup.sh: |-
-    #!/bin/bash -xeu
-    [[ ! $# -eq 1 ]] && echo "Usage: $0 backup_number" && exit 1;
-    [[ -z "${BACKUP_BUCKET}" ]] && echo "Required 'BACKUP_BUCKET' env not set" && exit 1;
-    [[ -z "${BACKUP_PATH}" ]] && echo "Required 'BACKUP_PATH' env not set" && exit 1;
-    [[ -z "${JENKINS_HOME}" ]] && echo "Required 'JENKINS_HOME' env not set" && exit 1;
-
-    backup_number=$1
-    echo "Running backup #${backup_number}"
-
-    BACKUP_TMP_DIR=$(mktemp -d)
-    tar -C ${JENKINS_HOME} -czf "${BACKUP_TMP_DIR}/${backup_number}.tar.gz" --exclude jobs/*/workspace* -c jobs && \
-
-    aws s3 cp ${BACKUP_TMP_DIR}/${backup_number}.tar.gz s3://${BACKUP_BUCKET}/${BACKUP_PATH}/${backup_number}.tar.gz
-    echo Done
-
-  restore.sh: |-
-    #!/bin/bash -xeu
-    [[ ! $# -eq 1 ]] && echo "Usage: $0 backup_number" && exit 1
-    [[ -z "${BACKUP_BUCKET}" ]] && echo "Required 'BACKUP_BUCKET' env not set" && exit 1;
-    [[ -z "${BACKUP_PATH}" ]] && echo "Required 'BACKUP_PATH' env not set" && exit 1;
-    [[ -z "${JENKINS_HOME}" ]] && echo "Required 'JENKINS_HOME' env not set" && exit 1;
-
-    backup_number=$1
-    echo "Running restore #${backup_number}"
-
-    BACKUP_TMP_DIR=$(mktemp -d)
-    aws s3 cp s3://${BACKUP_BUCKET}/${BACKUP_PATH}/${backup_number}.tar.gz ${BACKUP_TMP_DIR}/${backup_number}.tar.gz
-
-    tar -C ${JENKINS_HOME} -zxf "${BACKUP_TMP_DIR}/${backup_number}.tar.gz"
-    echo Done
-

In our example we will use S3 bucket lifecycle policy to keep -the number of backups under control, e.g. Cloud Formation fragment:

-
    Type: AWS::S3::Bucket
-    Properties:
-      BucketName: my-example-bucket
-      ...
-      LifecycleConfiguration:
-        Rules:
-          - Id: BackupCleanup
-            Status: Enabled
-            Prefix: my-backup-path
-            ExpirationInDays: 7
-            NoncurrentVersionExpirationInDays: 14
-            AbortIncompleteMultipartUpload:
-              DaysAfterInitiation: 3
- - -
Last modified December 8, 2021 -
-
- - -
-
-
- - - - -
- - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/docs/getting-started/v0.6.x/customizing-jenkins/index.html b/docs/docs/getting-started/v0.6.x/customizing-jenkins/index.html deleted file mode 100644 index cc3e749e4..000000000 --- a/docs/docs/getting-started/v0.6.x/customizing-jenkins/index.html +++ /dev/null @@ -1,1163 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Customizing Jenkins | Jenkins Operator - - - - - - - - - - - - - - - - - - - - - - - - - - - - Customizing Jenkins | Jenkins Operator - - -
- - - -
-
-
-
-
- - - - - -
- - - - -
- - - - -
- -
- - - -
-

Customizing Jenkins

-
How to customize Jenkins
- - -

How to customize Jenkins

- -

Jenkins can be customized with plugins. -Plugin’s configuration is applied as groovy scripts or the configuration as code plugin. -Any plugin working for Jenkins can be installed by the Jenkins Operator.

- -

Pre-installed plugins:

- -
    -
  • configuration-as-code v1.54
  • -
  • git v4.9.0
  • -
  • job-dsl v1.77
  • -
  • kubernetes-credentials-provider v0.20
  • -
  • kubernetes v1.30.04
  • -
  • workflow-aggregator v2.6
  • -
  • workflow-job v2.42
  • -
- -

Rest of the plugins can be found in plugins repository.

- -

Install plugins

- -

Edit Custom Resource under spec.master.plugins:

-
apiVersion: jenkins.io/v1alpha2
-kind: Jenkins
-metadata:
-  name: example
-spec:
-  master:
-   plugins:
-   - name: simple-theme-plugin
-     version: "0.6"
-

Under spec.master.basePlugins you can find plugins for a valid Jenkins Operator:

-
apiVersion: jenkins.io/v1alpha2
-kind: Jenkins
-metadata:
-  name: example
-spec:
-  master:
-    basePlugins:
-    - name: kubernetes
-      version: "1.30.04"
-    - name: workflow-job
-      version: "2.42"
-    - name: workflow-aggregator
-      version: "2.6"
-    - name: git
-      version: "4.9.0"
-    - name: job-dsl
-      version: "1.77"
-    - name: configuration-as-code
-      version: "1.54"
-    - name: kubernetes-credentials-provider
-      version: "0.20"
-

You can change their versions.

- -

The Jenkins Operator will then automatically install plugins after the Jenkins master pod restart.

- -

Apply plugin’s config

- -

By using a ConfigMap you can create your own Jenkins customized configuration. -Then you must reference the ConfigMap in the Jenkins pod customization file in spec.groovyScripts or spec.configurationAsCode

- -

Create a ConfigMap with specific name (eg. jenkins-operator-user-configuration). Then, modify the Jenkins manifest:

-
apiVersion: jenkins.io/v1alpha2
-kind: Jenkins
-metadata:
-  name: example
-spec:
-  configurationAsCode:
-    configurations: 
-    - name: jenkins-operator-user-configuration
-  groovyScripts:
-    configurations:
-    - name: jenkins-operator-user-configuration
-

Here is an example of jenkins-operator-user-configuration:

-
apiVersion: v1
-kind: ConfigMap
-metadata:
-  name: jenkins-operator-user-configuration
-data:
-  1-configure-theme.groovy: | 
-    import jenkins.*
-    import jenkins.model.*
-    import hudson.*
-    import hudson.model.*
-    import org.jenkinsci.plugins.simpletheme.ThemeElement
-    import org.jenkinsci.plugins.simpletheme.CssTextThemeElement
-    import org.jenkinsci.plugins.simpletheme.CssUrlThemeElement
-
-    Jenkins jenkins = Jenkins.getInstance()
-
-    def decorator = Jenkins.instance.getDescriptorByType(org.codefirst.SimpleThemeDecorator.class)
-
-    List<ThemeElement> configElements = new ArrayList<>();
-    configElements.add(new CssTextThemeElement("DEFAULT"));
-    configElements.add(new CssUrlThemeElement("https://cdn.rawgit.com/afonsof/jenkins-material-theme/gh-pages/dist/material-light-green.css"));
-    decorator.setElements(configElements);
-    decorator.save();
-
-    jenkins.save()
-  1-system-message.yaml: |
-    jenkins:
-      systemMessage: "Configuration as Code integration works!!!"
-
    -
  • *.groovy is Groovy script configuration
  • -
  • *.yaml is configuration as code
  • -
- -

If you want to correct your configuration you can edit it while the Jenkins Operator is running. -Jenkins will reconcile and apply the new configuration.

- -

How to use secrets from a Groovy scripts

- -

If you configured spec.groovyScripts.secret.name, then this secret is available to use from map Groovy scripts. -The secrets are loaded to secrets map.

- -

Create a secret with for example the name jenkins-conf-secrets.

-
kind: Secret
-apiVersion: v1
-type: Opaque
-metadata:
-  name: jenkins-conf-secrets
-  namespace: default
-data:
-  SYSTEM_MESSAGE: SGVsbG8gd29ybGQ=
-

Then modify the Jenkins pod manifest by changing spec.groovyScripts.secret.name to jenkins-conf-secrets.

-
apiVersion: jenkins.io/v1alpha2
-kind: Jenkins
-metadata:
-  name: example
-spec:
-  configurationAsCode:
-    configurations: 
-    - name: jenkins-operator-user-configuration
-    secret:
-      name: jenkins-conf-secrets
-  groovyScripts:
-    configurations:
-    - name: jenkins-operator-user-configuration
-    secret:
-      name: jenkins-conf-secrets
-

Now you can test that the secret is mounted by applying this ConfigMap for Groovy script:

-
apiVersion: v1
-kind: ConfigMap
-metadata:
-  name: jenkins-operator-user-configuration
-data:
-  1-system-message.groovy: | 
-    import jenkins.*
-    import jenkins.model.*
-    import hudson.*
-    import hudson.model.*
-    Jenkins jenkins = Jenkins.getInstance()
-    
-    jenkins.setSystemMessage(secrets["SYSTEM_MESSAGE"])
-    jenkins.save()
-

Or by applying this configuration as code:

-
apiVersion: v1
-kind: ConfigMap
-metadata:
-  name: jenkins-operator-user-configuration
-data:
-  1-system-message.yaml: |
-    jenkins:
-      systemMessage: ${SYSTEM_MESSAGE}
-

After this, you should see the Hello world system message from the Jenkins homepage.

- - - -
Last modified December 8, 2021 -
-
- - -
-
-
- - - - -
- - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/docs/getting-started/v0.6.x/deploying-jenkins/index.html b/docs/docs/getting-started/v0.6.x/deploying-jenkins/index.html deleted file mode 100644 index 0464b564c..000000000 --- a/docs/docs/getting-started/v0.6.x/deploying-jenkins/index.html +++ /dev/null @@ -1,1066 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Deploying Jenkins | Jenkins Operator - - - - - - - - - - - - - - - - - - - - - - - - - - - - Deploying Jenkins | Jenkins Operator - - -
- - - -
-
-
-
-
- - - - - -
- - - - -
- - - - -
-
- - - - - - - - - - - - - -
-
- - - -
-

Deploying Jenkins

-
Deploy production ready Jenkins manifest
- - - - -
-

This document describes the procedure for deploying Jenkins.

- -
- - -

Prerequisites

- -

The Operator needs to have been deployed beforehand. The procedure for deploying Jenkins described here doesn’t apply to -installation of Operator via Helm chart unless jenkins.enabled was set to false. -That’s because by default, installation via Helm chart also covers deploying Jenkins.

- -

Deploying Jenkins instance

- -

Once Jenkins Operator is up and running let’s deploy actual Jenkins instance. -Create manifest e.g. jenkins_instance.yaml with following data and save it on drive.

-
apiVersion: jenkins.io/v1alpha2
-kind: Jenkins
-metadata:
-  name: example
-  namespace: default
-spec:
-  configurationAsCode:
-    configurations: []
-    secret:
-      name: ""
-  groovyScripts:
-    configurations: []
-    secret:
-      name: ""
-  jenkinsAPISettings:
-    authorizationStrategy: createUser
-  master:
-    disableCSRFProtection: false
-    containers:
-      - name: jenkins-master
-        image: jenkins/jenkins:2.277.4-lts-alpine
-        imagePullPolicy: Always
-        livenessProbe:
-          failureThreshold: 12
-          httpGet:
-            path: /login
-            port: http
-            scheme: HTTP
-          initialDelaySeconds: 100
-          periodSeconds: 10
-          successThreshold: 1
-          timeoutSeconds: 5
-        readinessProbe:
-          failureThreshold: 10
-          httpGet:
-            path: /login
-            port: http
-            scheme: HTTP
-          initialDelaySeconds: 80
-          periodSeconds: 10
-          successThreshold: 1
-          timeoutSeconds: 1
-        resources:
-          limits:
-            cpu: 1500m
-            memory: 3Gi
-          requests:
-            cpu: "1"
-            memory: 500Mi
-  seedJobs:
-    - id: jenkins-operator
-      targets: "cicd/jobs/*.jenkins"
-      description: "Jenkins Operator repository"
-      repositoryBranch: master
-      repositoryUrl: https://github.com/jenkinsci/kubernetes-operator.git
-

Deploy a Jenkins to Kubernetes:

-
kubectl create -f jenkins_instance.yaml
-

Watch the Jenkins instance being created:

-
kubectl get pods -w
-

Get the Jenkins credentials:

-
kubectl get secret jenkins-operator-credentials-<cr_name> -o 'jsonpath={.data.user}' | base64 -d
-kubectl get secret jenkins-operator-credentials-<cr_name> -o 'jsonpath={.data.password}' | base64 -d
-

Connect to the Jenkins instance (minikube):

-
minikube service jenkins-operator-http-<cr_name> --url
-

Connect to the Jenkins instance (actual Kubernetes cluster):

-
kubectl port-forward jenkins-<cr_name> 8080:8080
-

Then open browser with address http://localhost:8080.

- -

jenkins

- - - -
Last modified December 8, 2021 -
-
- - -
-
-
- - - - -
- - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/docs/getting-started/v0.6.x/index.html b/docs/docs/getting-started/v0.6.x/index.html deleted file mode 100644 index 0086662c8..000000000 --- a/docs/docs/getting-started/v0.6.x/index.html +++ /dev/null @@ -1,1243 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - -v0.6.x | Jenkins Operator - - - - - - - - - - - - - - - - - - - - v0.6.x | Jenkins Operator - - -
- - - -
-
-
-
-
- - - - - -
- - - - -
- - - - -
-
- - - - - - - - - - - - - -
-
- - - -
-

v0.6.x

-
How to work with Jenkins Operator 0.6.x version. We recommend migrating to a newer version.
- - - - -
-

This document describes a getting started guide for Jenkins Operator v0.6.x and also additional configuration.

- -
- - -

First Steps

- -

Prepare your Kubernetes cluster and set up your kubectl access.

- -

Once you have a running Kubernetes cluster you can focus on installing Jenkins Operator according to the -Installation guide.

- -
- - - - -
- - - - -
-
- Installing the Operator -
-

How to install Jenkins Operator -

-
- - - - - - - - - - - - - - - - - - - - - - - - - -
-
- Deploying Jenkins -
-

Deploy production ready Jenkins manifest -

-
- - - - - - - - - - - - - - - - - -
-
- Customizing Jenkins -
-

How to customize Jenkins -

-
- - - - - - - - - - - - - - - - - - - -
-
- Configuring Seed Jobs and Pipelines -
-

How to configure Jenkins with Operator -

-
- - - - - - - - - - - -
-
- Configuring backup and restore -
-

Prevent loss of job history -

-
- - - - - - - -
-
- Separate namespaces for Jenkins and Operator -
-

How to install Jenkins and Jenkins Operator in separate namespaces -

-
- - - - - - - - - -
-
- Custom backup and restore providers -
-

Custom backup and restore provider -

-
- - - - - -
-
- AKS -
-

Additional configuration for Azure Kubernetes Service -

-
- - - - - -
-
- LDAP -
-

Additional configuration for LDAP -

-
- - - - - -
-
- OpenShift -
-

Additional configuration for OpenShift -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- Schema -
-

API Schema definitions for Jenkins CRD -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - -
Last modified December 8, 2021 -
-
- -
-
-
- - - - -
- - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/docs/getting-started/v0.6.x/index.xml b/docs/docs/getting-started/v0.6.x/index.xml deleted file mode 100644 index a7eb315a5..000000000 --- a/docs/docs/getting-started/v0.6.x/index.xml +++ /dev/null @@ -1,5128 +0,0 @@ - - - Jenkins Operator – v0.6.x - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.6.x/ - Recent Hugo news from gohugo.io - Hugo -- gohugo.io - Wed, 08 Dec 2021 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/img/hugo.png - GoHugo.io - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.6.x/ - - - - - - - - - - - - Docs: Installing the Operator - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.6.x/installing-the-operator/ - Wed, 08 Dec 2021 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.6.x/installing-the-operator/ - - - - - - - -<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> Docker Hub repository.</p> - -</div> - - -<h2 id="requirements">Requirements</h2> - -<p>To run <strong>Jenkins Operator</strong>, you will need:</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.</p> - -<h2 id="deploy-jenkins-operator-using-yaml-s">Deploy Jenkins Operator using YAML&rsquo;s</h2> - -<p>First, install Jenkins Custom Resource Definition:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl apply -f https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/config/crd/bases/jenkins.io_jenkins.yaml </code></pre></div> -<p>Then, install the Operator and other required resources:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl apply -f https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/deploy/all-in-one-v1alpha2.yaml</code></pre></div> -<p>Watch <strong>Jenkins Operator</strong> instance being created:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl get pods -w</code></pre></div> -<p>Now <strong>Jenkins Operator</strong> should be up and running in the <code>default</code> namespace. -For deploying Jenkins, refer to <a href="https://jenkinsci.github.io/kubernetes-operator/kubernetes-operator/docs/getting-started/latest/deploying-jenkins/">Deploy Jenkins section</a>.</p> - -<h2 id="deploy-jenkins-operator-using-helm-chart">Deploy Jenkins Operator using Helm Chart</h2> - -<p>Alternatively, you can also use Helm to install the Operator (and optionally, by default, Jenkins). It requires the Helm 3+ for deployment.</p> - -<p>Create a namespace for the operator:</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 namespace &lt;your-namespace&gt;</code></pre></div> -<p>To install, you need only to type these commands:</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">$ helm repo add jenkins https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/chart -$ helm install &lt;name&gt; jenkins/jenkins-operator -n &lt;your-namespace&gt;</code></pre></div> -<p>To add custom labels and annotations, you can use <code>values.yaml</code> file or pass them into <code>helm install</code> command, 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">$ helm install &lt;name&gt; jenkins/jenkins-operator -n &lt;your-namespace&gt; --set jenkins.labels.LabelKey<span style="color:#ce5c00;font-weight:bold">=</span>LabelValue,jenkins.annotations.AnnotationKey<span style="color:#ce5c00;font-weight:bold">=</span>AnnotationValue</code></pre></div> -<p>You can further customize Jenkins using <code>values.yaml</code>: -<h3 id="JenkinsConfiguration">Jenkins instance configuration -</h3></p> - -<table aria-colspan="4"> -<thead aria-colspan="4"> -<tr> -<th></th> -<th>Field</th> -<th>Default value</th> -<th>Description</th> -</tr> -</thead> -<tbody aria-colspan="4"> -<tr></tr> -<tr> -<td colspan="1"> -<code>jenkins</code> -</td> -<td colspan="3"> -<p>operator is section for configuring operator deployment</p> -<table> -<tr> -<td> -<code>enabled</code> -</td> -<td> -true -</td> -<td> -Enabled can enable or disable the Jenkins instance. -Set to false if you have configured CR already and/or you want to deploy an operator only. -</td> -</tr> -<tr> -<td> -<code>apiVersion</code> -</td> -<td>jenkins.io/v1alpha2</td> -<td> -Version of the CR manifest. The recommended and default value is <code>jenkins.io/v1alpha2</code>. -<a href="#github.io/kubernetes-operator/docs/getting-started/v0.1.x/migration-guide-v1alpha1-to-v1alpha2/">More info</a> -</td> -</tr> -<tr> -<td> -<code>name</code> -</td> -<td> -jenkins -</td> -<td> -Name of resource. The pod name will be <code>jenkins-&lt;name&gt;</code> (name will be set as suffix). -</td> -</tr> -<tr> -<td> -<code>namespace</code> -</td> -<td> -default -</td> -<td> -Namespace the resources will be deployed to. It's not recommended to use default namespace. -Create new namespace for jenkins (e.g. <code>kubectl create -n jenkins</code>) -</td> -</tr> -<tr> -<td> -<code>labels</code> -</td> -<td> -{} -</td> -<td> -Labels are injected into metadata labels field. -</td> -</tr> -<tr> -<td> -<code>annotations</code> -</td> -<td> -{} -</td> -<td> -Annotations are injected into metadata annotations field. -</td> -</tr> -<tr> -<td> -<code>image</code> -</td> -<td> -jenkins/jenkins:lts -</td> -<td> -Image is the name (and tag) of the Jenkins instance. -It's recommended to use LTS (tag: "lts") version. -</td> -</tr> -<tr> -<td> -<code>env</code> -</td> -<td> -[] -</td> -<td> -Env contains jenkins container environment variables. -</td> -</tr> -<tr> -<td> -<code>imagePullPolicy</code> -</td> -<td> -Always -</td> -<td> -Defines policy for pulling images -</td> -</tr> -<tr> -<td> -<code>priorityClassName</code> -</td> -<td> -"" -</td> -<td> -PriorityClassName indicates the importance of a Pod relative to other Pods. -<a href="https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/">More info</a> -</td> -</tr> -<tr> -<td> -<code>disableCSRFProtection</code> -</td> -<td> -false -</td> -<td> -disableCSRFProtection can enable or disable operator built-in CSRF protection. -Set it to true if you are using OpenShift Jenkins Plugin. -<a href="https://github.com/jenkinsci/kubernetes-operator/pull/193">More info</a> -</td> -</tr> -<tr> -<td> -<code>imagePullSecrets</code> -</td> -<td> -[] -</td> -<td> -Used if you want to pull images from private repository -<a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configuration/#pulling-docker-images-from-private-repositories">More info</a> -</td> -</tr> -<tr> -<td> -<code>notifications</code> -</td> -<td> -[] -</td> -<td> -Notifications is feature that notify user about Jenkins reconciliation status -<a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/notifications/">More info</a> -</td> -</tr> -<tr> -<td> -<code>basePlugins</code> -</td> -<td> -<pre> -- name: kubernetes - version: "1.25.2" -- name: workflow-job - version: "2.39" -- name: workflow-aggregator - version: "2.6" -- name: git - version: "4.2.2" -- name: job-dsl - version: "1.77" -- name: configuration-as-code - version: "1.38" -- name: kubernetes-credentials - -provider - version: "0.13" -</pre> -</td> -<td> -Plugins installed and required by the operator -shouldn't contain plugins defined by user -You can change their versions here -<a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/customization/#install-plugins">More info</a> -</td> -</tr> -<tr> -<td> -<code>plugins</code> -</td> -<td> -[] -</td> -<td> -Plugins required by the user. You can define plugins here. -<a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/customization/#install-plugins">More info</a> -Example: -<pre> -plugins: - - name: simple-theme-plugin - version: 0.5.1 -</pre> -</td> -</tr> -<tr> -<td> -<code>seedJobs</code> -</td> -<td> -[] -</td> -<td> -Placeholder for jenkins seed jobs -For seed job creation tutorial, check:<br /> <a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configuring-seed-jobs-and-pipelines/#prepare-job-definitions-and-pipelines">Prepare seed jobs</a> -<br /><a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configuring-seed-jobs-and-pipelines/#configure-seed-jobs">Configure seed jobs</a> -<br />Example: -<code> -<pre> -seedJobs: -- id: jenkins-operator - targets: "cicd/jobs/*.jenkins" - description: "Jenkins Operator repository" - repositoryBranch: master - repositoryUrl: - - https://github.com/jenkinsci/kubernetes-operator.git -</pre> -</code> -</td> -</tr> -<tr> -<td> -<code>resources</code> -</td> -<td> -<pre> -limits: - cpu: 1500m - memory: 3Gi -requests: - cpu: 1 - memory: 500M -</pre> -</td> -<td> -Resource limit/request for Jenkins -<a href="https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container">More info</a> -</td> -</tr> -<tr> -<td> -<code>volumes</code> -</td> -<td> -<pre> -- name: backup - persistentVolumeClaim: - claimName: jenkins-backup -</pre> -</td> -<td> -Volumes used by Jenkins -By default, we are only using PVC volume for storing backups. -</td> -</tr> -<tr> -<td> -<code>volumeMounts</code> -</td> -<td> -[] -</td> -<td> -volumeMounts are mounts for Jenkins pod. -</td> -</tr> -<tr> -<td> -<code>securityContext</code> -</td> -<td> -runAsUser: 1000 -fsGroup: 1000 -</td> -<td> -SecurityContext for pod. -</td> -</tr> -<tr> -<td><code>service</code></td> -<td>not implemented</td> -<td>Http Jenkins service. See https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/schema/#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Service for details.</td> -</tr> -<tr> -<td><code>slaveService</code></td> -<td>not implemented</td> -<td>Slave Jenkins service. See https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/schema/#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Service for details.</td> -</tr> -<tr> -<td> -<code>livenessProbe</code> -</td> -<td> -<pre> -livenessProbe: - failureThreshold: 12 - httpGet: - path: /login - port: http - scheme: HTTP - initialDelaySeconds: 80 - periodSeconds: 10 - successThreshold: 1 - timeoutSeconds: 5 -</pre> -</td> -<td> -livenessProbe for Pod -</td> -</tr> -<tr> -<td> -<code>readinessProbe</code> -</td> -<td> -<pre> -readinessProbe: - failureThreshold: 3 - httpGet: - path: /login - port: http - scheme: HTTP - initialDelaySeconds: 30 - periodSeconds: 10 - successThreshold: 1 - timeoutSeconds: 1 -</pre> -</td> -<td> -readinessProbe for Pod -</td> -</tr> -<tr> -<td> -<code> -backup -</code> -<p> -<em> -<a href="#Backup"> -Backup -</a> -</em> -</p> -</td> -<td> -</td> -<td> -Backup is section for configuring operator's backup feature -By default backup feature is enabled and pre-configured -This section simplifies the configuration described here: <a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configuring-backup-and-restore/">Configuring backup and restore</a> -For customization tips see <a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/custom-backup-and-restore">Custom backup and restore</a> -</td> -</tr> -<tr> -<td> -<code>configuration</code> -<p> -<em> -<a href="#Configuration"> -Configuration -</a> -</em> -</p> -</td> -<td></td> -<td> -Section where we can configure Jenkins instance. -See <a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/customizing-jenkins/">Customizing Jenkins</a> for details -</td> -</tr> -</table> -</td> -</tr> -</tbody> -</table> - -<h3 id="configuring-operator-deployment">Configuring operator deployment</h3> - -<table aria-colspan="4"> - <thead aria-colspan="4"> - <tr> - <th></th> - <th>Field</th> - <th>Default value</th> - <th>Description</th> - </tr> - </thead> - <tbody aria-colspan="4"> - <tr></tr> - <tr> - <td colspan="1"> - <code>operator</code> - </td> - <td colspan="3"> - <p>operator is section for configuring operator deployment</p> - <table> - <tr> - <td> - <code>replicaCount</code></br> - </td> - <td> - 1 - </td> - <td> - Number of Replicas. - </td> - </tr> - <tr> - <td> - <code>image</code> - </td> - <td> - virtuslab/jenkins-operator:v0.4.0 - </td> - <td> - Name (and tag) of the Jenkins Operator image. - </td> - </tr> - <tr> - <td> - <code>imagePullPolicy</code> - </td> - <td> - IfNotPresent - </td> - <td> - Defines policy for pulling images. - </td> - </tr> - <tr> - <td> - <code>imagePullSecrets</code> - </td> - <td> - [] - </td> - <td> - Used if you want to pull images from private repository. - </td> - </tr> - <tr> - <td> - <code>nameOverride</code> - </td> - <td> - "" - </td> - <td> - nameOverride overrides the app name. - </td> - </tr> - <tr> - <td> - <code>fullnameOverride</code> - </td> - <td> - "" - </td> - <td> - fullnameOverride overrides the deployment name - </td> - </tr> - <tr> - <td> - <code>resources</code> - </td> - <td> - {} - </td> - <td> - </td> - </tr> - <tr> - <td> - <code>nodeSelector</code> - </td> - <td> - {} - </td> - <td> - </td> - </tr> - <tr> - <td> - <code>tolerations</code> - </td> - <td> - {} - </td> - <td> - </td> - </tr> - <tr> - <td> - <code>affinity</code> - </td> - <td> - {} - </td> - <td> - </td> - </tr> - </table> - </td> - </tr> - </tbody> -</table> - -<p><h3 id="Backup">Backup -</h3> -<p> -(<em>Appears on:</em> -<a href="#JenkinsConfiguration">JenkinsConfiguration</a>) -</p> -<p> -Backup defines configuration of Jenkins backup. -</p></p> - -<table> -<thead> -<tr> -<th>Field</th> -<th>Default value</th> -<th>Description</th> -</tr> -</thead> - <tbody> - <tr> - <td> - <code>enabled</code> - </td> - <td> - true - </td> - <td> - Enabled is enable/disable switch for backup feature. - </td> - </tr> - <tr> - <td> - <code>image</code> - </td> - <td> - virtuslab/jenkins-operator-backup-pvc:v0.0.8 - </td> - <td> - Image used by backup feature. - </td> - </tr> - <tr> - <td> - <code>containerName</code> - </td> - <td> - backup - </td> - <td> - Backup container name. - </td> - </tr> - <tr> - <td> - <code>interval</code> - </td> - <td> - 30 - </td> - <td> - Defines how often make backup in seconds. - </td> - </tr> - <tr> - <td> - <code>makeBackupBeforePodDeletion</code> - </td> - <td> - true - </td> - <td> - When enabled will make backup before pod deletion. - </td> - </tr> - <tr> - <td> - <code>backupCommand</code> - </td> - <td> - /home/user/bin/backup.sh - </td> - <td> - Backup container command. - </td> - </tr> - <tr> - <td> - <code>restoreCommand</code> - </td> - <td> - /home/user/bin/restore.sh - </td> - <td> - Backup restore command. - </td> - </tr> - <tr> - <td> - <code>pvc</code> - </td> - <td colspan="2"> - <p>Persistent Volume Claim Kubernetes resource</p> - <br/> - <table colspan="2" style="width:100%"> - <tbody> - <tr> - <td> - <code>enabled</code> - </td> - <td> - true - </td> - <td> - Enable/disable switch for PVC - </td> - </tr> - <tr> - <td> - <code>enabled</code> - </td> - <td> - true - </td> - <td> - Enable/disable switch for PVC - </td> - </tr> - <tr> - <td> - <code>size</code> - </td> - <td> - 5Gi - </td> - <td> - Size of PVC - </td> - </tr> - <tr> - <td> - <code>className</code> - </td> - <td> - "" - </td> - <td> - StorageClassName for PVC - <a href="https://kubernetes.io/docs/concepts/storage/persistent-volumes/#class-1">More info</a> - </td> - </tr> - </tbody> - </table> - </td> - </tr> - <tr> - <td> - <code>env</code> - </td> - <td> -<pre> -- name: BACKUP_DIR - value: /backup -- name: JENKINS_HOME - value: /jenkins-home -- name: BACKUP_COUNT - value: "3" -</pre> - </td> - <td> - Contains container environment variables. - PVC backup provider handles these variables:<br /> - BACKUP_DIR - path for storing backup files (default: "/backup")<br /> - JENKINS_HOME - path to jenkins home (default: "/jenkins-home")<br /> - BACKUP_COUNT - define how much recent backups will be kept<br /> - </td> - </td> - </tr> - <tr> - <td> - <code>volumeMounts</code> - </td> - <td> -<pre> -- name: jenkins-home - mountPath: /jenkins-home -- mountPath: /backup - name: backup -</pre> - </td> - <td> - Holds the mount points for volumes. - </td> - </tr> - </tbody> -</table> - - -<p><h4 id="Configuration">Configuration - </h3> - <p> - (<em>Appears on:</em> - <a href="#JenkinsConfiguration">Jenkins instance configuration</a>) - </p></p> - -<p><table> - <thead> - <tr> - <th>Field</th> - <th>Default value</th> - <th>Description</th> - </tr> - </thead> - <tbody> - <tr> - <td> - <code>configurationAsCode</code> - </td> - <td> - {} - </td> - <td> - ConfigurationAsCode defines configuration of Jenkins customization via Configuration as Code Jenkins plugin. -Example:<br /> -<pre> -- configMapName: jenkins-casc - content: {} -</pre> - </td> - </tr> - <tr> - <td> - <code>groovyScripts</code> - </td> - <td> - {} - </td> - <td> - GroovyScripts defines configuration of Jenkins customization via groovy scripts. - Example:<br /> -<pre> -- configMapName: jenkins-gs - content: {} -</pre> - </td> - </tr> - <tr> - <td> - <code>secretRefName</code> - </td> - <td> - &ldquo;&rdquo; - </td> - <td> - secretRefName of existing secret (previously created). - </td> - </tr> - <tr> - <td> - <code>secretData</code> - </td> - <td> - {} - </td> - <td> - If secretRefName is empty, secretData creates new secret and fills with data provided in secretData. - </td> - </tr> - </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 <code>{git-hash}</code>, {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> - - - - - - Docs: Deploying Jenkins - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.6.x/deploying-jenkins/ - Wed, 08 Dec 2021 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.6.x/deploying-jenkins/ - - - - - - - -<div class="pageinfo pageinfo-primary"> -<p>This document describes the procedure for deploying Jenkins.</p> - -</div> - - -<h2 id="prerequisites">Prerequisites</h2> - -<p>The Operator needs to have been deployed beforehand. The procedure for deploying Jenkins described here doesn&rsquo;t apply to -installation of Operator via Helm chart unless <code>jenkins.enabled</code> was set to false. -That’s because by default, installation via Helm chart also covers deploying Jenkins.</p> - -<h2 id="deploying-jenkins-instance">Deploying Jenkins instance</h2> - -<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-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>namespace<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>default<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurationAsCode<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurations<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">]</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>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><span style="color:#4e9a06">&#34;&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>groovyScripts<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurations<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">]</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>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><span style="color:#4e9a06">&#34;&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkinsAPISettings<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>authorizationStrategy<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>createUser<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>disableCSRFProtection<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">false</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>containers<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-master<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>image<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins/jenkins<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">2.277</span><span style="color:#0000cf;font-weight:bold">.4</span>-lts-alpine<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>imagePullPolicy<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Always<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>livenessProbe<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>failureThreshold<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">12</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>httpGet<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>path<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/login<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>port<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>http<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>scheme<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>HTTP<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>initialDelaySeconds<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">100</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>periodSeconds<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">10</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>successThreshold<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>timeoutSeconds<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">5</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>readinessProbe<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>failureThreshold<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">10</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>httpGet<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>path<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/login<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>port<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>http<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>scheme<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>HTTP<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>initialDelaySeconds<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">80</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>periodSeconds<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">10</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>successThreshold<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>timeoutSeconds<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>limits<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>cpu<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>1500m<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>memory<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>3Gi<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>requests<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>cpu<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;1&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>memory<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>500Mi<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>seedJobs<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>id<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>targets<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;cicd/jobs/*.jenkins&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>description<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Jenkins Operator repository&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>repositoryBranch<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>master<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>repositoryUrl<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>https<span style="color:#000;font-weight:bold">:</span>//github.com/jenkinsci/kubernetes-operator.git</code></pre></div> -<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> -<p>Get the Jenkins credentials:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl get secret jenkins-operator-credentials-&lt;cr_name&gt; -o <span style="color:#4e9a06">&#39;jsonpath={.data.user}&#39;</span> <span style="color:#000;font-weight:bold">|</span> base64 -d -kubectl get secret jenkins-operator-credentials-&lt;cr_name&gt; -o <span style="color:#4e9a06">&#39;jsonpath={.data.password}&#39;</span> <span style="color:#000;font-weight:bold">|</span> base64 -d</code></pre></div> -<p>Connect to the Jenkins instance (minikube):</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">minikube service jenkins-operator-http-&lt;cr_name&gt; --url</code></pre></div> -<p>Connect to the Jenkins instance (actual Kubernetes cluster):</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl port-forward jenkins-&lt;cr_name&gt; 8080:8080</code></pre></div> -<p>Then open browser with address <code>http://localhost:8080</code>.</p> - -<p><img src="https://jenkinsci.github.io/kubernetes-operator/kubernetes-operator/img/jenkins.png" alt="jenkins" /></p> - - - - - - Docs: Customizing Jenkins - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.6.x/customizing-jenkins/ - Wed, 08 Dec 2021 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.6.x/customizing-jenkins/ - - - - - -<h2 id="how-to-customize-jenkins">How to customize Jenkins</h2> - -<p>Jenkins can be customized with plugins. -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:</p> - -<ul> -<li>configuration-as-code v1.54</li> -<li>git v4.9.0</li> -<li>job-dsl v1.77</li> -<li>kubernetes-credentials-provider v0.20</li> -<li>kubernetes v1.30.04</li> -<li>workflow-aggregator v2.6</li> -<li>workflow-job v2.42</li> -</ul> - -<p>Rest of the plugins can be found in <a href="https://plugins.jenkins.io/">plugins repository</a>.</p> - -<h4 id="install-plugins">Install plugins</h4> - -<p>Edit Custom Resource under <code>spec.master.plugins</code>:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.io/v1alpha2<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>example<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>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>plugins<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>simple-theme-plugin<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;0.6&#34;</span></code></pre></div> -<p>Under <code>spec.master.basePlugins</code> you can find plugins for a valid <strong>Jenkins Operator</strong>:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.io/v1alpha2<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>example<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>master<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>basePlugins<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>kubernetes<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;1.30.04&#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.42&#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.9.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>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.54&#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.20&#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> - -<h4 id="apply-plugin-s-config">Apply plugin&rsquo;s config</h4> - -<p>By using a <a href="https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/">ConfigMap</a> you can create your own <strong>Jenkins</strong> customized configuration. -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>Create a <strong><code>ConfigMap</code></strong> with specific name (eg. <code>jenkins-operator-user-configuration</code>). Then, modify the <strong>Jenkins</strong> manifest:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.io/v1alpha2<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>example<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurationAsCode<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurations<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-user-configuration<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>groovyScripts<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurations<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-user-configuration</code></pre></div> -<p>Here is an example of <code>jenkins-operator-user-configuration</code>:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>v1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>ConfigMap<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-user-configuration<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>data<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>-configure-theme.groovy<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">| -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">import jenkins.*</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.model.*<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>hudson.*<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>hudson.model.*<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>org.jenkinsci.plugins.simpletheme.ThemeElement<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>org.jenkinsci.plugins.simpletheme.CssTextThemeElement<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>org.jenkinsci.plugins.simpletheme.CssUrlThemeElement<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins<span style="color:#f8f8f8;text-decoration:underline"> </span>=<span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins.getInstance()<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>def<span style="color:#f8f8f8;text-decoration:underline"> </span>decorator<span style="color:#f8f8f8;text-decoration:underline"> </span>=<span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins.instance.getDescriptorByType(org.codefirst.SimpleThemeDecorator.class)<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>List&lt;ThemeElement&gt;<span style="color:#f8f8f8;text-decoration:underline"> </span>configElements<span style="color:#f8f8f8;text-decoration:underline"> </span>=<span style="color:#f8f8f8;text-decoration:underline"> </span>new<span style="color:#f8f8f8;text-decoration:underline"> </span>ArrayList&lt;&gt;();<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configElements.add(new<span style="color:#f8f8f8;text-decoration:underline"> </span>CssTextThemeElement(<span style="color:#4e9a06">&#34;DEFAULT&#34;</span>));<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configElements.add(new<span style="color:#f8f8f8;text-decoration:underline"> </span>CssUrlThemeElement(<span style="color:#4e9a06">&#34;https://cdn.rawgit.com/afonsof/jenkins-material-theme/gh-pages/dist/material-light-green.css&#34;</span>));<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>decorator.setElements(configElements);<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>decorator.save();<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.save()<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>-system-message.yaml<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">| -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">jenkins:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>systemMessage<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Configuration as Code integration works!!!&#34;</span></code></pre></div> -<ul> -<li><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. -Jenkins will reconcile and apply the new configuration.</p> - -<h2 id="how-to-use-secrets-from-a-groovy-scripts">How to use secrets from a Groovy scripts</h2> - -<p>If you configured <code>spec.groovyScripts.secret.name</code>, then this secret is available to use from map Groovy scripts. -The secrets are loaded to <code>secrets</code> map.</p> - -<p>Create a <a href="https://kubernetes.io/docs/concepts/configuration/secret/">secret</a> with for example the name <code>jenkins-conf-secrets</code>.</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Secret<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>v1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>type<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Opaque<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-conf-secrets<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>namespace<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>default<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>data<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>SYSTEM_MESSAGE<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>SGVsbG8gd29ybGQ=</code></pre></div> -<p>Then modify the <strong>Jenkins</strong> pod manifest by changing <code>spec.groovyScripts.secret.name</code> to <code>jenkins-conf-secrets</code>.</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.io/v1alpha2<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>example<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurationAsCode<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurations<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-user-configuration<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>secret<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-conf-secrets<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>groovyScripts<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurations<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-user-configuration<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>secret<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-conf-secrets</code></pre></div> -<p>Now you can test that the secret is mounted by applying this <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"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-user-configuration<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>data<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>-system-message.groovy<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">| -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">import jenkins.*</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.model.*<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>hudson.*<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>hudson.model.*<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins<span style="color:#f8f8f8;text-decoration:underline"> </span>=<span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins.getInstance()<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.setSystemMessage(secrets<span style="color:#000;font-weight:bold">[</span><span style="color:#4e9a06">&#34;SYSTEM_MESSAGE&#34;</span><span style="color:#000;font-weight:bold">]</span>)<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.save()</code></pre></div> -<p>Or by applying this configuration as code:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>v1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>ConfigMap<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-user-configuration<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>data<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>-system-message.yaml<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">| -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">jenkins:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>systemMessage<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>${SYSTEM_MESSAGE}</code></pre></div> -<p>After this, you should see the <code>Hello world</code> system message from the <strong>Jenkins</strong> homepage.</p> - - - - - - Docs: Configuring Seed Jobs and Pipelines - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.6.x/configuring-seed-jobs-and-pipelines/ - Wed, 08 Dec 2021 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.6.x/configuring-seed-jobs-and-pipelines/ - - - - - -<h2 id="configure-seed-jobs-and-pipelines">Configure Seed Jobs and Pipelines</h2> - -<p>Jenkins operator uses <a href="https://github.com/jenkinsci/job-dsl-plugin">job-dsl</a> and <a href="https://jenkinsci.github.io/kubernetes-credentials-provider-plugin/">kubernetes-credentials-provider</a> plugins for configuring jobs -and deploy keys.</p> - -<h2 id="prepare-job-definitions-and-pipelines">Prepare job definitions and pipelines</h2> - -<p>First you have to prepare pipelines and job definition in your GitHub repository using the following structure:</p> -<pre><code>cicd/ -├── jobs -│   └── k8s.jenkins -└── pipelines - └── k8s.jenkins</code></pre> -<p><strong><code>cicd/jobs/k8s.jenkins</code></strong> is a job definition:</p> -<pre><code>#!/usr/bin/env groovy - -pipelineJob('k8s-e2e') { - displayName('Kubernetes Plugin E2E Test') - - logRotator { - numToKeep(10) - daysToKeep(30) - } - - configure { project -> - project / 'properties' / 'org.jenkinsci.plugins.workflow.job.properties.DurabilityHintJobProperty' { - hint('PERFORMANCE_OPTIMIZED') - } - } - - definition { - cpsScm { - scm { - git { - remote { - url('https://github.com/jenkinsci/kubernetes-operator.git') - credentials('jenkins-operator') - } - branches('*/master') - } - } - scriptPath('cicd/pipelines/k8s.jenkins') - } - } -}</code></pre> -<p><strong><code>cicd/pipelines/k8s.jenkins</code></strong> is an actual Jenkins pipeline:</p> -<pre><code>#!/usr/bin/env groovy - -def label = "k8s-${UUID.randomUUID().toString()}" -def home = "/home/jenkins" -def workspace = "${home}/workspace/build-jenkins-operator" -def workdir = "${workspace}/src/github.com/jenkinsci/kubernetes-operator/" - -podTemplate(label: label, - containers: [ - containerTemplate(name: 'alpine', image: 'alpine:3.11', ttyEnabled: true, command: 'cat'), - ], - ) { - node(label) { - stage('Run shell') { - container('alpine') { - sh 'echo "hello world"' - } - } - } -}</code></pre> -<h2 id="configure-seed-jobs">Configure Seed Jobs</h2> - -<p>Jenkins Seed Jobs are configured using <code>Jenkins.spec.seedJobs</code> section from your custom resource manifest:</p> -<pre><code>apiVersion: jenkins.io/v1alpha2 -kind: Jenkins -metadata: - name: example -spec: - seedJobs: - - id: jenkins-operator - targets: "cicd/jobs/*.jenkins" - description: "Jenkins Operator repository" - repositoryBranch: master - repositoryUrl: https://github.com/jenkinsci/kubernetes-operator.git</code></pre> -<p><strong>Jenkins Operator</strong> will automatically discover and configure all the seed jobs.</p> - -<p>You can verify if deploy keys were successfully configured in the Jenkins <strong>Credentials</strong> tab.</p> - -<p><img src="https://jenkinsci.github.io/kubernetes-operator/kubernetes-operator/img/jenkins-credentials.png" alt="jenkins" /></p> - -<p>You can verify if your pipelines were successfully configured in the Jenkins Seed Job console output.</p> - -<p><img src="https://jenkinsci.github.io/kubernetes-operator/kubernetes-operator/img/jenkins-seed.png" alt="jenkins" /></p> - -<p>If your GitHub repository is <strong>private</strong> you have to configure SSH or username/password authentication.</p> - -<h3 id="ssh-authentication">SSH authentication</h3> - -<h4 id="generate-ssh-keys">Generate SSH Keys</h4> - -<p>There are two methods of SSH private key generation:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">$ openssl genrsa -out &lt;filename&gt; <span style="color:#0000cf;font-weight:bold">2048</span></code></pre></div> -<p>or</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">$ ssh-keygen -t rsa -b <span style="color:#0000cf;font-weight:bold">2048</span> -$ ssh-keygen -p -f &lt;filename&gt; -m pem</code></pre></div> -<p>Then copy content from generated file.</p> - -<h4 id="public-key">Public key</h4> - -<p>If you want to upload your public key to your Git server you need to extract it.</p> - -<p>If key was generated by <code>openssl</code> then you need to type this to extract public key:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">$ openssl rsa -in &lt;filename&gt; -pubout &gt; &lt;filename&gt;.pub</code></pre></div> -<p>If key was generated by <code>ssh-keygen</code> the public key content is located in <filename>.pub and there is no need to extract public key</p> - -<h4 id="configure-ssh-authentication">Configure SSH authentication</h4> - -<p>Configure a seed job like this:</p> -<pre><code>apiVersion: jenkins.io/v1alpha2 -kind: Jenkins -metadata: - name: example -spec: - seedJobs: - - id: jenkins-operator-ssh - credentialType: basicSSHUserPrivateKey - credentialID: k8s-ssh - targets: "cicd/jobs/*.jenkins" - description: "Jenkins Operator repository" - repositoryBranch: master - repositoryUrl: git@github.com:jenkinsci/kubernetes-operator.git</code></pre> -<p>and create a Kubernetes Secret (name of secret should be the same from <code>credentialID</code> field):</p> -<pre><code>apiVersion: v1 -kind: Secret -metadata: - name: k8s-ssh - labels: - "jenkins.io/credentials-type": "basicSSHUserPrivateKey" - annotations: - "jenkins.io/credentials-description" : "ssh github.com:jenkinsci/kubernetes-operator" -stringData: - privateKey: | - -----BEGIN RSA PRIVATE KEY----- - MIIJKAIBAAKCAgEAxxDpleJjMCN5nusfW/AtBAZhx8UVVlhhhIKXvQ+dFODQIdzO - oDXybs1zVHWOj31zqbbJnsfsVZ9Uf3p9k6xpJ3WFY9b85WasqTDN1xmSd6swD4N8 - ... - username: github_user_name</code></pre> -<h3 id="username-password-authentication">Username &amp; password authentication</h3> - -<p>Configure the seed job like:</p> -<pre><code>apiVersion: jenkins.io/v1alpha2 -kind: Jenkins -metadata: - name: example -spec: - seedJobs: - - id: jenkins-operator-user-pass - credentialType: usernamePassword - credentialID: k8s-user-pass - targets: "cicd/jobs/*.jenkins" - description: "Jenkins Operator repository" - repositoryBranch: master - repositoryUrl: https://github.com/jenkinsci/kubernetes-operator.git</code></pre> -<p>and create a Kubernetes Secret (name of secret should be the same from <code>credentialID</code> field):</p> -<pre><code>apiVersion: v1 -kind: Secret -metadata: - name: k8s-user-pass -stringData: - username: github_user_name - password: password_or_token</code></pre> -<h3 id="external-authentication">External authentication</h3> - -<p>You can use <code>external</code> credential type if you want to configure authentication using Configuration As Code or Groovy Script.</p> - -<p>Example:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.io/v1alpha2<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>example<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>seedJobs<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>id<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-external<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>credentialType<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>external<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>credentialID<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>k8s-external<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>targets<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;cicd/jobs/*.jenkins&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>description<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Jenkins Operator repository&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>repositoryBranch<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>master<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>repositoryUrl<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>https<span style="color:#000;font-weight:bold">:</span>//github.com/jenkinsci/kubernetes-operator.git</code></pre></div> -<p>Remember that <code>credentialID</code> must match the id of the credentials configured in Jenkins. Consult the -<a href="https://www.jenkins.io/doc/book/using/using-credentials/">Jenkins docs for using credentials</a> for details.</p> - -<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 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"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-master<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>env<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>CURL_OPTIONS<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-L<span style="color:#f8f8f8;text-decoration:underline"> </span>-x<span style="color:#f8f8f8;text-decoration:underline"> </span>&lt;proxy_url&gt;</code></pre></div> -<p>In <code>CURL_OPTIONS</code> var you can set additional arguments to <code>curl</code> command.</p> - -<h2 id="pulling-docker-images-from-private-repositories">Pulling Docker images from private repositories</h2> - -<p>To pull a Docker Image from private repository you can use <code>imagePullSecrets</code>.</p> - -<p>Please follow the instructions on <a href="https://kubernetes.io/docs/concepts/containers/images/?origin_team=T42NTAGHM#creating-a-secret-with-a-docker-config">creating a secret with a docker config</a>.</p> - -<h3 id="docker-hub-configuration">Docker Hub Configuration</h3> - -<p>To use Docker Hub additional steps are required.</p> - -<p>Edit the previously created secret:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl -n &lt;namespace&gt; edit secret &lt;name&gt;</code></pre></div> -<p>The <code>.dockerconfigjson</code> key&rsquo;s value needs to be replaced with a modified version.</p> - -<p>After modifications, it needs to be encoded as a Base64 value before setting the <code>.dockerconfigjson</code> key.</p> - -<p>Example config file to modify and use:</p> -<pre><code>{ - "auths":{ - "https://index.docker.io/v1/":{ - "username":"user", - "password":"password", - "email":"yourdockeremail@gmail.com", - "auth":"base64 of string user:password" - }, - "auth.docker.io":{ - "username":"user", - "password":"password", - "email":"yourdockeremail@gmail.com", - "auth":"base64 of string user:password" - }, - "registry.docker.io":{ - "username":"user", - "password":"password", - "email":"yourdockeremail@gmail.com", - "auth":"base64 of string user:password" - }, - "docker.io":{ - "username":"user", - "password":"password", - "email":"yourdockeremail@gmail.com", - "auth":"base64 of string user:password" - }, - "https://registry-1.docker.io/v2/": { - "username":"user", - "password":"password", - "email":"yourdockeremail@gmail.com", - "auth":"base64 of string user:password" - }, - "registry-1.docker.io/v2/": { - "username":"user", - "password":"password", - "email":"yourdockeremail@gmail.com", - "auth":"base64 of string user:password" - }, - "registry-1.docker.io": { - "username":"user", - "password":"password", - "email":"yourdockeremail@gmail.com", - "auth":"base64 of string user:password" - }, - "https://registry-1.docker.io": { - "username":"user", - "password":"password", - "email":"yourdockeremail@gmail.com", - "auth":"base64 of string user:password" - } - } -}</code></pre> - - - - - Docs: Configuring backup and restore - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.6.x/configuring-backup-and-restore/ - Wed, 08 Dec 2021 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.6.x/configuring-backup-and-restore/ - - - - - -<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> - -<h4 id="create-pvc">Create PVC</h4> - -<p>Save to the file named pvc.yaml:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>v1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>PersistentVolumeClaim<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>&lt;pvc_name<span style="color:#8f5902;font-style:italic">&gt; -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">namespace: &lt;namespace&gt;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>accessModes<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>ReadWriteOnce<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>requests<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>storage<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>500Gi</code></pre></div> -<p>Run the following command:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">$ kubectl -n &lt;namespace&gt; create -f pvc.yaml</code></pre></div> -<h4 id="configure-jenkins-cr">Configure Jenkins CR</h4> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.io/v1alpha2<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>&lt;cr_name<span style="color:#8f5902;font-style:italic">&gt; -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">namespace: &lt;namespace&gt;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>master<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>securityContext<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>runAsUser<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1000</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>fsGroup<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1000</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>containers<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-master<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>image<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins/jenkins<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">2.277</span><span style="color:#0000cf;font-weight:bold">.4</span>-lts-alpine<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># container responsible for the backup and restore</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>env<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>BACKUP_DIR<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/backup<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>JENKINS_HOME<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/jenkins-home<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>BACKUP_COUNT<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;3&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># keep only the 2 most recent backups</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>image<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>virtuslab/jenkins-operator-backup-pvc<span style="color:#000;font-weight:bold">:</span>v0<span style="color:#0000cf;font-weight:bold">.1</span><span style="color:#0000cf;font-weight:bold">.0</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># look at backup/pvc directory</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>imagePullPolicy<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>IfNotPresent<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>volumeMounts<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>mountPath<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/jenkins-home<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># Jenkins home volume</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-home<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>mountPath<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># backup volume</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>volumes<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># PVC volume where backups will be stored</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>persistentVolumeClaim<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>claimName<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>&lt;pvc_name<span style="color:#8f5902;font-style:italic">&gt; -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">backup:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>containerName<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># container name is responsible for backup</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>action<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>command<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>/home/user/bin/backup.sh<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># this command is invoked on &#34;backup&#34; container to make backup, for example /home/user/bin/backup.sh &lt;backup_number&gt;, &lt;backup_number&gt; is passed by operator</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>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; 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"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>containerName<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># container name is responsible for restore backup</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>action<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>command<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>/home/user/bin/restore.sh<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># this command is invoked on &#34;backup&#34; container to make restore backup, for example /home/user/bin/restore.sh &lt;backup_number&gt;, &lt;backup_number&gt; is passed by operator</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">#recoveryOnce: &lt;backup_number&gt; # if want to restore specific backup configure this field and then Jenkins will be restarted and desired backup will be restored</span></code></pre></div> - - - - - Docs: Separate namespaces for Jenkins and Operator - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.6.x/separate-namespaces/ - Wed, 08 Dec 2021 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.6.x/separate-namespaces/ - - - - - -<h2 id="create-namespaces">Create namespaces</h2> - -<p>You need to create two namespaces, for example we&rsquo;ll call them <strong>jenkins</strong> for Jenkins and <strong>jenkins-operator</strong> for Jenkins Operator.</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 ns jenkins-operator -$ kubectl create ns jenkins</code></pre></div> -<h2 id="create-necessary-resources-in-jenkins-operator-namespace">Create necessary resources in Jenkins Operator namespace</h2> - -<p>Next, you need to install resources necessary for the Operator to work in the <code>jenkins-operator</code> namespace. To do that, -copy the manifest you see below to <code>jenkins-operator-rbac.yaml</code>file.</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">---<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>v1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>ServiceAccount<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>---<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#8f5902;font-style:italic"># permissions to do leader election.</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>rbac.authorization.k8s.io/v1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Role<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>leader-election-role<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>rules<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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:#4e9a06">&#34;&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>coordination.k8s.io<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>configmaps<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>leases<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>get<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>list<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>watch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>create<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>update<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>patch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>delete<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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:#4e9a06">&#34;&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>events<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>create<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>patch<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>apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>rbac.authorization.k8s.io/v1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>RoleBinding<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>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>leader-election-rolebinding<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>roleRef<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroup<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>rbac.authorization.k8s.io<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>Role<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>leader-election-role<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>subjects<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>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>ServiceAccount<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<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>apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>rbac.authorization.k8s.io/v1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Role<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>rules<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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>apps<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>daemonsets<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>deployments<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>replicasets<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>statefulsets<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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:#4e9a06">&#39;*&#39;</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>apiGroups<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>apps<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>deployments/finalizers<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>update<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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>build.openshift.io<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>buildconfigs<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>builds<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>get<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>list<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>watch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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:#4e9a06">&#34;&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>configmaps<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>secrets<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>services<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>create<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>get<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>list<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>update<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>watch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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:#4e9a06">&#34;&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>events<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>create<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>get<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>list<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>patch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>watch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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:#4e9a06">&#34;&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>persistentvolumeclaims<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>get<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>list<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>watch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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:#4e9a06">&#34;&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>pods<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>create<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>delete<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>get<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>list<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>patch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>update<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>watch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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:#4e9a06">&#34;&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>pods<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>pods/exec<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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:#4e9a06">&#39;*&#39;</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>apiGroups<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:#4e9a06">&#34;&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>pods/log<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>get<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>list<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>watch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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:#4e9a06">&#34;&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>pods/portforward<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>create<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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:#4e9a06">&#34;&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>serviceaccounts<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>create<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>get<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>list<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>update<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>watch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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>image.openshift.io<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>imagestreams<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>get<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>list<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>watch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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>jenkins.io<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#39;*&#39;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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:#4e9a06">&#39;*&#39;</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>apiGroups<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>jenkins.io<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<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>verbs<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>create<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>delete<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>get<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>list<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>patch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>update<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>watch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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>jenkins.io<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins/finalizers<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>update<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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>jenkins.io<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins/status<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>get<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>patch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>update<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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>rbac.authorization.k8s.io<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>rolebindings<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>roles<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>create<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>get<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>list<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>update<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>watch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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>route.openshift.io<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>routes<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>create<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>get<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>list<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>update<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>watch<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>apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>rbac.authorization.k8s.io/v1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>RoleBinding<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>subjects<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>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>ServiceAccount<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<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>roleRef<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroup<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>rbac.authorization.k8s.io<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>Role<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</code></pre></div> -<p>Now install the required resources in <code>jenkins-operator</code> namespace with:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl apply -n jenkins-operator -f jenkins-operator-rbac.yaml</code></pre></div> -<p>There&rsquo;s only one thing left to install in <code>jenkins-operator</code> namespace, and that is the Operator itself. The manifest -below contains the Operator as defined in all-in-one manifest found in <a href="https://jenkinsci.github.io/kubernetes-operator/kubernetes-operator/docs/getting-started/latest/installing-the-operator/">Installing the Operator</a> -page, the only difference is that the one here sets <code>WATCH_NAMESPACE</code> to the <code>jenkins</code> namespace we created.</p> - -<p>Copy its content to <code>jenkins-operator.yaml</code> file.</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">apiVersion: apps/v1 -kind: Deployment -metadata: - name: jenkins-operator - labels: - control-plane: controller-manager -spec: - selector: - matchLabels: - control-plane: controller-manager - replicas: <span style="color:#0000cf;font-weight:bold">1</span> - template: - metadata: - labels: - control-plane: controller-manager - spec: - serviceAccountName: jenkins-operator - securityContext: - runAsUser: <span style="color:#0000cf;font-weight:bold">65532</span> - containers: - - command: - - /manager - args: - - --leader-elect - image: virtuslab/jenkins-operator:v0.6.0 - name: jenkins-operator - imagePullPolicy: IfNotPresent - securityContext: - allowPrivilegeEscalation: <span style="color:#204a87">false</span> - livenessProbe: - httpGet: - path: /healthz - port: <span style="color:#0000cf;font-weight:bold">8081</span> - initialDelaySeconds: <span style="color:#0000cf;font-weight:bold">15</span> - periodSeconds: <span style="color:#0000cf;font-weight:bold">20</span> - readinessProbe: - httpGet: - path: /readyz - port: <span style="color:#0000cf;font-weight:bold">8081</span> - initialDelaySeconds: <span style="color:#0000cf;font-weight:bold">5</span> - periodSeconds: <span style="color:#0000cf;font-weight:bold">10</span> - resources: - limits: - cpu: 100m - memory: 30Mi - requests: - cpu: 100m - memory: 20Mi - env: - - name: WATCH_NAMESPACE - value: jenkins - terminationGracePeriodSeconds: <span style="color:#0000cf;font-weight:bold">10</span></code></pre></div> -<p>Install the Operator in <code>jenkins-operator</code> namespace with:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl apply -n jenkins-operator -f jenkins-operator.yaml</code></pre></div> -<p>You have installed the Operator in <code>jenkins-operator</code> namespace, watching for Jenkins in <code>jenkins</code> namespace. Now -there are two things left to do: creating necessary Role and RoleBinding for the Operator in <code>jenkins</code> namespace, and -deploying actual Jenkins instance there.</p> - -<h2 id="create-necessary-resources-in-jenkins-namespace">Create necessary resources in Jenkins namespace</h2> - -<p>Below you can find manifest with RBAC that needs to be created in <code>jenkins</code> namespace. Copy its content to <code>jenkins-ns-rbac.yaml</code> file.</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>rbac.authorization.k8s.io/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>Role<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>rules<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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>apps<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>daemonsets<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>deployments<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>replicasets<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>statefulsets<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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:#4e9a06">&#39;*&#39;</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>apiGroups<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>apps<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>deployments/finalizers<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>update<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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>build.openshift.io<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>buildconfigs<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>builds<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>get<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>list<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>watch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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:#4e9a06">&#34;&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>configmaps<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>secrets<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>services<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>create<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>get<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>list<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>update<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>watch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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:#4e9a06">&#34;&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>events<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>create<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>get<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>list<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>patch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>watch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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:#4e9a06">&#34;&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>persistentvolumeclaims<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>get<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>list<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>watch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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:#4e9a06">&#34;&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>pods<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>create<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>delete<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>get<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>list<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>patch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>update<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>watch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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:#4e9a06">&#34;&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>pods<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>pods/exec<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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:#4e9a06">&#39;*&#39;</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>apiGroups<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:#4e9a06">&#34;&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>pods/log<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>get<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>list<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>watch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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:#4e9a06">&#34;&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>pods/portforward<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>create<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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:#4e9a06">&#34;&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>serviceaccounts<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>create<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>get<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>list<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>update<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>watch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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>image.openshift.io<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>imagestreams<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>get<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>list<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>watch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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>jenkins.io<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#39;*&#39;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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:#4e9a06">&#39;*&#39;</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>apiGroups<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>jenkins.io<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<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>verbs<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>create<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>delete<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>get<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>list<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>patch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>update<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>watch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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>jenkins.io<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins/finalizers<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>update<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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>jenkins.io<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins/status<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>get<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>patch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>update<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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>rbac.authorization.k8s.io<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>rolebindings<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>roles<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>create<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>get<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>list<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>update<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>watch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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>route.openshift.io<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>routes<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>create<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>get<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>list<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>update<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>watch<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>apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>rbac.authorization.k8s.io/v1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>RoleBinding<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>subjects<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>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>ServiceAccount<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<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>namespace<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>roleRef<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroup<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>rbac.authorization.k8s.io<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>Role<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</code></pre></div> -<p>Now apply it with:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl apply -n jenkins -f jenkins-ns-rbac.yaml</code></pre></div> -<p>The last thing to do is to deploy Jenkins. Below you can find an example Jenkins resource manifest. -It&rsquo;s the same as one used in <a href="https://jenkinsci.github.io/kubernetes-operator/kubernetes-operator/docs/getting-started/latest/deploying-jenkins/">Deploying Jenkins</a>. -Copy it to <code>jenkins-instance.yaml</code></p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.io/v1alpha2<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>example<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurationAsCode<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurations<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">]</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>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><span style="color:#4e9a06">&#34;&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>groovyScripts<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurations<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">]</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>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><span style="color:#4e9a06">&#34;&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkinsAPISettings<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>authorizationStrategy<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>createUser<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>disableCSRFProtection<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">false</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>containers<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-master<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>image<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins/jenkins<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">2.277</span><span style="color:#0000cf;font-weight:bold">.4</span>-lts-alpine<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>imagePullPolicy<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Always<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>livenessProbe<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>failureThreshold<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">12</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>httpGet<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>path<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/login<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>port<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>http<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>scheme<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>HTTP<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>initialDelaySeconds<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">100</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>periodSeconds<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">10</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>successThreshold<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>timeoutSeconds<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">5</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>readinessProbe<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>failureThreshold<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">10</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>httpGet<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>path<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/login<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>port<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>http<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>scheme<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>HTTP<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>initialDelaySeconds<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">80</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>periodSeconds<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">10</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>successThreshold<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>timeoutSeconds<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>limits<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>cpu<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>1500m<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>memory<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>3Gi<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>requests<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>cpu<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;1&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>memory<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>500Mi<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>seedJobs<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>id<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>targets<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;cicd/jobs/*.jenkins&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>description<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Jenkins Operator repository&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>repositoryBranch<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>master<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>repositoryUrl<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>https<span style="color:#000;font-weight:bold">:</span>//github.com/jenkinsci/kubernetes-operator.git</code></pre></div> -<p>Now you can deploy it with:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl apply -n jenkins -f jenkins-instance.yaml</code></pre></div> -<p>With this, you have just set up Jenkins Operator and Jenkins in separate namespaces. Now the Operator will run in -its own namespace (<code>jenkins-operator</code>), watch for CRs in <code>jenkins</code> namespace, and deploy Jenkins there.</p> - - - - - - Docs: Custom backup and restore providers - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.6.x/custom-backup-and-restore/ - Wed, 08 Dec 2021 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.6.x/custom-backup-and-restore/ - - - - - -<p>With enough effort one can create a custom backup and restore provider -for the Jenkins Operator.</p> - -<h2 id="requirements">Requirements</h2> - -<p>Two commands (e.g. scripts) are required:</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> - -<p>One of those scripts (or the entry point of the container) needs to be responsible -for backup cleanup or rotation if required, or an external system.</p> - -<h2 id="how-it-works">How it works</h2> - -<p>The mechanism relies on basic Kubernetes and UNIX functionalities.</p> - -<p>The backup (and restore) container runs as a sidecar in the same -Kubernetes pod as the Jenkins master.</p> - -<p>Name of the backup and restore containers can be set as necessary using -<code>spec.backup.containerName</code> and <code>spec.restore.containerName</code>. -In most cases it will be the same container, but we allow for less common use cases.</p> - -<p>The operator will call a backup or restore commands inside a sidecar container when necessary:</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> - -<p>This example shows abbreviated version of a simple AWS S3 backup implementation -using: <code>aws-cli</code>, <code>bash</code> and <code>kube2iam</code>.</p> - -<p>In addition to your normal <code>Jenkins</code> <code>CustomResource</code> some additional settings -for backup and restore are required, e.g.:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.io/v1alpha1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>example<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>namespace<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>master<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>masterAnnotations<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>iam.amazonaws.com/role<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;my-example-backup-role&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># tell kube2iam where the AWS IAM role is</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>containers<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-master<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>...<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># container responsible for backup and restore</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>image<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>quay.io/virtuslab/aws-cli<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.16</span><span style="color:#0000cf;font-weight:bold">.263</span><span style="color:#0000cf;font-weight:bold">-2</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>workingDir<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/home/user/bin/<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>command<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># our container entry point</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>sleep<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>infinity<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>env<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>BACKUP_BUCKET<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>my-example-bucket<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># the S3 bucket name to use</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>BACKUP_PATH<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>my-backup-path<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># the S3 bucket path prefix to use</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>JENKINS_HOME<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/jenkins-home<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># the path to mount jenkins home dir in the backup container</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>volumeMounts<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>mountPath<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/jenkins-home<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># Jenkins home volume</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-home<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>mountPath<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/home/user/bin/backup.sh<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup-scripts<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>subPath<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup.sh<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>readOnly<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">true</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>mountPath<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/home/user/bin/restore.sh<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup-scripts<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>subPath<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>restore.sh<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>readOnly<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">true</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>volumes<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup-scripts<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configMap<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>defaultMode<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">0754</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-backup-s3<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>securityContext<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># make sure both containers use the same UID and GUID</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>runAsUser<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1000</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>fsGroup<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1000</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>...<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>containerName<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># container name responsible for backup</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>interval<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">3600</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># how often make a backup in seconds</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>makeBackupBeforePodDeletion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">true</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># trigger backup just before deleting the pod</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>action<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>command<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># this command is invoked on &#34;backup&#34; container to create a backup,</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># &lt;backup_number&gt; is passed by operator,</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># for example /home/user/bin/backup.sh &lt;backup_number&gt;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>/home/user/bin/backup.sh<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>restore<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>containerName<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># container name is responsible for restore backup</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>action<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>command<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># this command is invoked on &#34;backup&#34; container to restore a backup,</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># &lt;backup_number&gt; is passed by operator</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># for example /home/user/bin/restore.sh &lt;backup_number&gt;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>/home/user/bin/restore.sh<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#8f5902;font-style:italic"># recoveryOnce: &lt;backup_number&gt; # if want to restore specific backup configure this field and then Jenkins will be restarted and desired backup will be restored</span></code></pre></div> -<p>The actual backup and restore scripts will be provided in a <code>ConfigMap</code>:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>ConfigMap<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>v1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-backup-s3<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>namespace<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>labels<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>app<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>data<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup.sh<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>|<span style="color:#8f5902;font-style:italic">- -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">#!/bin/bash -xeu</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">[</span><span style="color:#f8f8f8;text-decoration:underline"> </span>!<span style="color:#f8f8f8;text-decoration:underline"> </span>$<span style="color:#8f5902;font-style:italic"># -eq 1 ]] &amp;&amp; echo &#34;Usage: $0 backup_number&#34; &amp;&amp; exit 1;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">[</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-z<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;${BACKUP_BUCKET}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">]</span><span style="color:#000;font-weight:bold">]</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Required &#39;BACKUP_BUCKET&#39; env not set&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exit<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>;<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">[</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-z<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;${BACKUP_PATH}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">]</span><span style="color:#000;font-weight:bold">]</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Required &#39;BACKUP_PATH&#39; env not set&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exit<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>;<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">[</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-z<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;${JENKINS_HOME}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">]</span><span style="color:#000;font-weight:bold">]</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Required &#39;JENKINS_HOME&#39; env not set&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exit<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>;<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup_number=$<span style="color:#0000cf;font-weight:bold">1</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Running backup #${backup_number}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>BACKUP_TMP_DIR=$(mktemp<span style="color:#f8f8f8;text-decoration:underline"> </span>-d)<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>tar<span style="color:#f8f8f8;text-decoration:underline"> </span>-C<span style="color:#f8f8f8;text-decoration:underline"> </span>${JENKINS_HOME}<span style="color:#f8f8f8;text-decoration:underline"> </span>-czf<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;${BACKUP_TMP_DIR}/${backup_number}.tar.gz&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>--exclude<span style="color:#f8f8f8;text-decoration:underline"> </span>jobs/<span style="color:#8f5902;font-style:italic">*/workspace*</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-c<span style="color:#f8f8f8;text-decoration:underline"> </span>jobs<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>\<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>aws<span style="color:#f8f8f8;text-decoration:underline"> </span>s3<span style="color:#f8f8f8;text-decoration:underline"> </span>cp<span style="color:#f8f8f8;text-decoration:underline"> </span>${BACKUP_TMP_DIR}/${backup_number}.tar.gz<span style="color:#f8f8f8;text-decoration:underline"> </span>s3<span style="color:#000;font-weight:bold">:</span>//${BACKUP_BUCKET}/${BACKUP_PATH}/${backup_number}.tar.gz<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span>Done<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>restore.sh<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>|<span style="color:#8f5902;font-style:italic">- -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">#!/bin/bash -xeu</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">[</span><span style="color:#f8f8f8;text-decoration:underline"> </span>!<span style="color:#f8f8f8;text-decoration:underline"> </span>$<span style="color:#8f5902;font-style:italic"># -eq 1 ]] &amp;&amp; echo &#34;Usage: $0 backup_number&#34; &amp;&amp; exit 1</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">[</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-z<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;${BACKUP_BUCKET}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">]</span><span style="color:#000;font-weight:bold">]</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Required &#39;BACKUP_BUCKET&#39; env not set&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exit<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>;<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">[</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-z<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;${BACKUP_PATH}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">]</span><span style="color:#000;font-weight:bold">]</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Required &#39;BACKUP_PATH&#39; env not set&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exit<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>;<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">[</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-z<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;${JENKINS_HOME}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">]</span><span style="color:#000;font-weight:bold">]</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Required &#39;JENKINS_HOME&#39; env not set&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exit<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>;<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup_number=$<span style="color:#0000cf;font-weight:bold">1</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Running restore #${backup_number}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>BACKUP_TMP_DIR=$(mktemp<span style="color:#f8f8f8;text-decoration:underline"> </span>-d)<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>aws<span style="color:#f8f8f8;text-decoration:underline"> </span>s3<span style="color:#f8f8f8;text-decoration:underline"> </span>cp<span style="color:#f8f8f8;text-decoration:underline"> </span>s3<span style="color:#000;font-weight:bold">:</span>//${BACKUP_BUCKET}/${BACKUP_PATH}/${backup_number}.tar.gz<span style="color:#f8f8f8;text-decoration:underline"> </span>${BACKUP_TMP_DIR}/${backup_number}.tar.gz<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>tar<span style="color:#f8f8f8;text-decoration:underline"> </span>-C<span style="color:#f8f8f8;text-decoration:underline"> </span>${JENKINS_HOME}<span style="color:#f8f8f8;text-decoration:underline"> </span>-zxf<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;${BACKUP_TMP_DIR}/${backup_number}.tar.gz&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span>Done</code></pre></div> -<p>In our example we will use S3 bucket lifecycle policy to keep -the number of backups under control, e.g. Cloud Formation fragment:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#f8f8f8;text-decoration:underline"> </span>Type<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>AWS<span style="color:#000;font-weight:bold">:</span><span style="color:#000;font-weight:bold">:</span>S3<span style="color:#000;font-weight:bold">:</span><span style="color:#000;font-weight:bold">:</span>Bucket<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Properties<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>BucketName<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>my-example-bucket<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>...<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>LifecycleConfiguration<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Rules<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>Id<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>BackupCleanup<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Status<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Enabled<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Prefix<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>my-backup-path<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>ExpirationInDays<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">7</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>NoncurrentVersionExpirationInDays<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">14</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>AbortIncompleteMultipartUpload<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>DaysAfterInitiation<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">3</span></code></pre></div> - - - - - Docs: AKS - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.6.x/aks/ - Wed, 08 Dec 2021 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.6.x/aks/ - - - - <p>Azure AKS managed Kubernetes service adds to every pod the following environment variables:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>KUBERNETES_PORT_443_TCP_ADDR<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>KUBERNETES_PORT<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>tcp<span style="color:#000;font-weight:bold">:</span>//<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>KUBERNETES_PORT_443_TCP<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>tcp<span style="color:#000;font-weight:bold">:</span>//<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>KUBERNETES_SERVICE_HOST<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span></code></pre></div> -<p>The operator is aware of it and omits these environment variables when checking if a Jenkins pod environment has been changed. It prevents the -restart of a Jenkins pod over and over again.</p> - - - - - - Docs: LDAP - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.6.x/ldap/ - Wed, 08 Dec 2021 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.6.x/ldap/ - - - - - -<p>Configuring LDAP is not supported out of the box, but can be achieved through -plugins and some well tuned configurations.</p> - -<p>The plugin we will use is: <a href="https://plugins.jenkins.io/ldap/">https://plugins.jenkins.io/ldap/</a></p> - -<blockquote> -<p>Note: This is an example of how LDAP authentication can be achieved. The LDAP -plugin is from a third-party, and there may be other alternatives that suits -your use case better. Use this guide with a grain of salt.</p> -</blockquote> - -<h2 id="requirements">Requirements</h2> - -<ul> -<li><p>LDAP server accessible from the Kubernetes cluster where your Jenkins -instance will live.</p></li> - -<li><p>Credentials to a manager account in your AD. Jenkins Operator will use -this account to authenticate with Jenkins for health checks, seed jobs, etc.</p></li> -</ul> - -<h2 id="steps">Steps</h2> - -<p>In your Jenkins configuration, add the following plugin:</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">plugins<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># Check https://plugins.jenkins.io/ldap/ to find the latest version.</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>ldap<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.7&#34;</span></code></pre></div> -<p>Easiest step is to then start up Jenkins then navigate to your instance&rsquo;s -&ldquo;Configure Global Security&rdquo; page and configure it accordingly.</p> - -<p><code>http://jenkins.example.com/configureSecurity/</code></p> - -<p>Once it&rsquo;s set up and tested, you can navigate to your JCasC page and export -the LDAP settings.</p> - -<p><code>https://jenkins.example.com/configuration-as-code/</code></p> - -<p>Feed the relevant new settings into your Kubernetes ConfigMap for your JCasC -settings.</p> - -<p>Here&rsquo;s a snippet of the LDAP-related configurations:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>v1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>ConfigMap<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-casc<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>data<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>ldap.yaml<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">| -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">jenkins:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>securityRealm<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>ldap<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>displayNameAttributeName<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;name&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>groupSearchBase<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;OU=Groups,OU=MyCompany&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>groupSearchFilter<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;(&amp; (cn={0}) (objectclass=group) )&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>inhibitInferRootDN<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">false</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>managerDN<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;CN=Jenkins Admin,OU=UsersSystem,OU=UsersOther,OU=MyCompany,DC=mycompany,DC=local&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>managerPasswordSecret<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;${LDAP_MANAGER_PASSWORD}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>rootDN<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;DC=mycompany,DC=local&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>server<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;MyCompany.local&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>userSearch<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;SamAccountName={0}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>userSearchBase<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;OU=MyCompany&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>disableMailAddressResolver<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">false</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>disableRolePrefixing<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">true</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>groupIdStrategy<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;caseInsensitive&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>userIdStrategy<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;caseInsensitive&#34;</span></code></pre></div> -<blockquote> -<p>Note the use of <code>${LDAP_MANAGER_PASSWORD}</code> above. You can reference -Kubernetes secrets in your JCasC ConfigMaps by adding the following to your -Jenkins object:</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">&gt;<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>&gt;<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:#8f5902;font-style:italic">&gt; </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">configurationAsCode:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#8f5902;font-style:italic">&gt; </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">configurations:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#8f5902;font-style:italic">&gt; </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">- name: jenkins-casc</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#8f5902;font-style:italic">&gt; </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">secret:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#8f5902;font-style:italic">&gt; </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"># This here</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#8f5902;font-style:italic">&gt; </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">name: jenkins-casc-secrets</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>&gt;<span style="color:#f8f8f8;text-decoration:underline"> </span>```<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>&gt;<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>&gt;<span style="color:#f8f8f8;text-decoration:underline"> </span>```yaml<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>&gt;<span style="color:#f8f8f8;text-decoration:underline"> </span>apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>v1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>&gt;<span style="color:#f8f8f8;text-decoration:underline"> </span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Secret<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>&gt;<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><span style="color:#8f5902;font-style:italic">&gt; </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">name: jenkins-cred-conf-secrets</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>&gt;<span style="color:#f8f8f8;text-decoration:underline"> </span>stringData<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#8f5902;font-style:italic">&gt; </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">LDAP_MANAGER_PASSWORD: &lt;password-for-manager-created-in-ldap&gt;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>&gt;<span style="color:#f8f8f8;text-decoration:underline"> </span>```<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>&gt;<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>&gt;<span style="color:#f8f8f8;text-decoration:underline"> </span>Schema<span style="color:#f8f8f8;text-decoration:underline"> </span>reference<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span>v1alpha2.ConfigurationAsCode<span style="color:#000;font-weight:bold">]</span>(./schema/<span style="color:#8f5902;font-style:italic">#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.ConfigurationAsCode)</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>Finally<span style="color:#f8f8f8;text-decoration:underline"> </span>you<span style="color:#f8f8f8;text-decoration:underline"> </span>must<span style="color:#f8f8f8;text-decoration:underline"> </span>configure<span style="color:#f8f8f8;text-decoration:underline"> </span>the<span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> </span>operator<span style="color:#f8f8f8;text-decoration:underline"> </span>to<span style="color:#f8f8f8;text-decoration:underline"> </span>use<span style="color:#f8f8f8;text-decoration:underline"> </span>the<span style="color:#f8f8f8;text-decoration:underline"> </span>manager<span style="color:#4e9a06">&#39;s -</span><span style="color:#4e9a06">credentials from the AD. -</span><span style="color:#4e9a06"> -</span><span style="color:#4e9a06">This is because this procedure will disable Jenkins&#39;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>own<span style="color:#f8f8f8;text-decoration:underline"> </span>user<span style="color:#f8f8f8;text-decoration:underline"> </span>database<span style="color:#000;font-weight:bold">,</span><span style="color:#f8f8f8;text-decoration:underline"> </span>and<span style="color:#f8f8f8;text-decoration:underline"> </span>the<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> </span>operator<span style="color:#f8f8f8;text-decoration:underline"> </span>still<span style="color:#f8f8f8;text-decoration:underline"> </span>needs<span style="color:#f8f8f8;text-decoration:underline"> </span>to<span style="color:#f8f8f8;text-decoration:underline"> </span>be<span style="color:#f8f8f8;text-decoration:underline"> </span>able<span style="color:#f8f8f8;text-decoration:underline"> </span>to<span style="color:#f8f8f8;text-decoration:underline"> </span>talk<span style="color:#f8f8f8;text-decoration:underline"> </span>to<span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> </span>in<span style="color:#f8f8f8;text-decoration:underline"> </span>an<span style="color:#f8f8f8;text-decoration:underline"> </span>authorized<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>manner.<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>Create<span style="color:#f8f8f8;text-decoration:underline"> </span>the<span style="color:#f8f8f8;text-decoration:underline"> </span>following<span style="color:#f8f8f8;text-decoration:underline"> </span>Kubernetes<span style="color:#f8f8f8;text-decoration:underline"> </span>secret<span style="color:#000;font-weight:bold">:</span></code></pre></div> -<p>yaml -apiVersion: v1 -kind: Secret -metadata: - name: jenkins-operator-credentials-<jenkins-cr-name> - namespace: <jenkins-cr-namespace> -stringData: - user: <username-for-manager-created-in-ldap> - password: <password-for-manager-created-in-ldap> -```</p> - -<p>Note: Values in stringData do not need to be base64 encoded. They are -encoded by Kubernetes when the manifest is applied.</p> -</blockquote> - - - - - - Docs: OpenShift - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.6.x/openshift/ - Wed, 08 Dec 2021 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.6.x/openshift/ - - - - - -<h2 id="release-0-6-0-is-not-compatible-with-openshift-and-jenkinsimage-crd-was-removed-from-it">Release 0.6.0 is not compatible with OpenShift and JenkinsImage crd was removed from it.</h2> - - - - - - Docs: Schema - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.6.x/schema/ - Wed, 08 Dec 2021 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.6.x/schema/ - - - - - -<div class="pageinfo pageinfo-primary"> -<p>This document contains API scheme for <code>jenkins-operator</code> Custom Resource Definition manifest</p> - -</div> - - -<p>Packages:</p> -<ul> -<li> -<a href="#jenkins.io">jenkins.io</a> -</li> -</ul> -<h2 id="jenkins.io">jenkins.io</h2> -<p> -<p>Package v1alpha2 contains API Schema definitions for the jenkins.io v1alpha2 API group</p> -</p> -Resource Types: -<ul><li> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.Jenkins">Jenkins</a> -</li></ul> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Jenkins">Jenkins -</h3> -<p> -<p>Jenkins is the Schema for the jenkins API</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>apiVersion</code></br> -string</td> -<td> -<code> -jenkins.io/v1alpha2 -</code> -</td> -</tr> -<tr> -<td> -<code>kind</code></br> -string -</td> -<td><code>Jenkins</code></td> -</tr> -<tr> -<td> -<code>metadata</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#objectmeta-v1-meta"> -Kubernetes meta/v1.ObjectMeta -</a> -</em> -</td> -<td> -Refer to the Kubernetes API documentation for the fields of the -<code>metadata</code> field. -</td> -</tr> -<tr> -<td> -<code>spec</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsSpec"> -JenkinsSpec -</a> -</em> -</td> -<td> -<p>Spec defines the desired state of the Jenkins</p> -<br/> -<br/> -<table> -<tr> -<td> -<code>master</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsMaster"> -JenkinsMaster -</a> -</em> -</td> -<td> -<p>Master represents Jenkins master pod properties and Jenkins plugins. -Every single change here requires a pod restart.</p> -</td> -</tr> -<tr> -<td> -<code>seedJobs</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.SeedJob"> -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.SeedJob -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>SeedJobs defines list of Jenkins Seed Job configurations -More info: <a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configuring-seed-jobs-and-pipelines#configure-seed-jobs-and-pipelines">https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configuration#configure-seed-jobs-and-pipelines</a></p> -</td> -</tr> -<tr> -<td> -<code>notifications</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Notification"> -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Notification -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Notifications defines list of a services which are used to inform about Jenkins status -Can be used to integrate chat services like Slack, Microsoft Teams or Mailgun</p> -</td> -</tr> -<tr> -<td> -<code>service</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Service"> -Service -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Service is Kubernetes service of Jenkins master HTTP pod -Defaults to : -port: 8080 -type: ClusterIP</p> -</td> -</tr> -<tr> -<td> -<code>slaveService</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Service"> -Service -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Service is Kubernetes service of Jenkins slave pods -Defaults to : -port: 50000 -type: ClusterIP</p> -</td> -</tr> -<tr> -<td> -<code>backup</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Backup"> -Backup -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Backup defines configuration of Jenkins backup -More info: <a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configure-backup-and-restore/">https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configure-backup-and-restore/</a></p> -</td> -</tr> -<tr> -<td> -<code>restore</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Restore"> -Restore -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Backup defines configuration of Jenkins backup restore -More info: <a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configure-backup-and-restore/">https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configure-backup-and-restore/</a></p> -</td> -</tr> -<tr> -<td> -<code>groovyScripts</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.GroovyScripts"> -GroovyScripts -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>GroovyScripts defines configuration of Jenkins customization via groovy scripts</p> -</td> -</tr> -<tr> -<td> -<code>configurationAsCode</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.ConfigurationAsCode"> -ConfigurationAsCode -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>ConfigurationAsCode defines configuration of Jenkins customization via Configuration as Code Jenkins plugin</p> -</td> -</tr> -<tr> -<td> -<code>roles</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#roleref-v1-rbac"> -[]Kubernetes rbac/v1.RoleRef -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Roles defines list of extra RBAC roles for the Jenkins Master pod service account</p> -</td> -</tr> -<tr> -<td> -<code>serviceAccount</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.ServiceAccount"> -ServiceAccount -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>ServiceAccount defines Jenkins master service account attributes</p> -</td> -</tr> -<tr> -<td> -<code>jenkinsAPISettings</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsAPISettings"> -JenkinsAPISettings -</a> -</em> -</td> -<td> -<p>JenkinsAPISettings defines configuration used by the operator to gain admin access to the Jenkins API</p> -</td> -</tr> -</table> -</td> -</tr> -<tr> -<td> -<code>status</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsStatus"> -JenkinsStatus -</a> -</em> -</td> -<td> -<p>Status defines the observed state of Jenkins</p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.AppliedGroovyScript">AppliedGroovyScript -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.JenkinsStatus">JenkinsStatus</a>) -</p> -<p> -<p>AppliedGroovyScript is the applied groovy script in Jenkins by the operator.</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>configurationType</code></br> -<em> -string -</em> -</td> -<td> -<p>ConfigurationType is the name of the configuration type(base-groovy, user-groovy, user-casc)</p> -</td> -</tr> -<tr> -<td> -<code>source</code></br> -<em> -string -</em> -</td> -<td> -<p>Source is the name of source where is located groovy script</p> -</td> -</tr> -<tr> -<td> -<code>name</code></br> -<em> -string -</em> -</td> -<td> -<p>Name is the name of the groovy script</p> -</td> -</tr> -<tr> -<td> -<code>hash</code></br> -<em> -string -</em> -</td> -<td> -<p>Hash is the hash of the groovy script and secrets which it uses</p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.AuthorizationStrategy">AuthorizationStrategy -(<code>string</code> alias)</p></h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.JenkinsAPISettings">JenkinsAPISettings</a>) -</p> -<p> -<p>AuthorizationStrategy defines authorization strategy of the operator for the Jenkins API</p> -</p> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Backup">Backup -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.JenkinsSpec">JenkinsSpec</a>) -</p> -<p> -<p>Backup defines configuration of Jenkins backup.</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>containerName</code></br> -<em> -string -</em> -</td> -<td> -<p>ContainerName is the container name responsible for backup operation</p> -</td> -</tr> -<tr> -<td> -<code>action</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Handler"> -Handler -</a> -</em> -</td> -<td> -<p>Action defines action which performs backup in backup container sidecar</p> -</td> -</tr> -<tr> -<td> -<code>interval</code></br> -<em> -uint64 -</em> -</td> -<td> -<p>Interval tells how often make backup in seconds -Defaults to 30.</p> -</td> -</tr> -<tr> -<td> -<code>makeBackupBeforePodDeletion</code></br> -<em> -bool -</em> -</td> -<td> -<p>MakeBackupBeforePodDeletion tells operator to make backup before Jenkins master pod deletion</p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.ConfigMapRef">ConfigMapRef -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.Customization">Customization</a>) -</p> -<p> -<p>ConfigMapRef is reference to Kubernetes ConfigMap.</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>name</code></br> -<em> -string -</em> -</td> -<td> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.ConfigurationAsCode">ConfigurationAsCode -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.JenkinsSpec">JenkinsSpec</a>) -</p> -<p> -<p>ConfigurationAsCode defines configuration of Jenkins customization via Configuration as Code Jenkins plugin.</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>Customization</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Customization"> -Customization -</a> -</em> -</td> -<td> -<p> -(Members of <code>Customization</code> are embedded into this type.) -</p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Container">Container -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.JenkinsMaster">JenkinsMaster</a>) -</p> -<p> -<p>Container defines Kubernetes container attributes.</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>name</code></br> -<em> -string -</em> -</td> -<td> -<p>Name of the container specified as a DNS_LABEL. -Each container in a pod must have a unique name (DNS_LABEL).</p> -</td> -</tr> -<tr> -<td> -<code>image</code></br> -<em> -string -</em> -</td> -<td> -<p>Docker image name. -More info: <a href="https://kubernetes.io/docs/concepts/containers/images">https://kubernetes.io/docs/concepts/containers/images</a></p> -</td> -</tr> -<tr> -<td> -<code>imagePullPolicy</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#pullpolicy-v1-core"> -Kubernetes core/v1.PullPolicy -</a> -</em> -</td> -<td> -<p>Image pull policy. -One of Always, Never, IfNotPresent. -Defaults to Always.</p> -</td> -</tr> -<tr> -<td> -<code>resources</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#resourcerequirements-v1-core"> -Kubernetes core/v1.ResourceRequirements -</a> -</em> -</td> -<td> -<p>Compute Resources required by this container. -More info: <a href="https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/">https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/</a></p> -</td> -</tr> -<tr> -<td> -<code>command</code></br> -<em> -[]string -</em> -</td> -<td> -<em>(Optional)</em> -<p>Entrypoint array. Not executed within a shell. -The docker image&rsquo;s ENTRYPOINT is used if this is not provided. -Variable references $(VAR_NAME) are expanded using the container&rsquo;s environment. If a variable -cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax -can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, -regardless of whether the variable exists or not. -More info: <a href="https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell">https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell</a></p> -</td> -</tr> -<tr> -<td> -<code>args</code></br> -<em> -[]string -</em> -</td> -<td> -<em>(Optional)</em> -<p>Arguments to the entrypoint. -The docker image&rsquo;s CMD is used if this is not provided. -Variable references $(VAR_NAME) are expanded using the container&rsquo;s environment. If a variable -cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax -can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, -regardless of whether the variable exists or not. -More info: <a href="https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell">https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell</a></p> -</td> -</tr> -<tr> -<td> -<code>workingDir</code></br> -<em> -string -</em> -</td> -<td> -<em>(Optional)</em> -<p>Container&rsquo;s working directory. -If not specified, the container runtime&rsquo;s default will be used, which -might be configured in the container image.</p> -</td> -</tr> -<tr> -<td> -<code>ports</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#containerport-v1-core"> -[]Kubernetes core/v1.ContainerPort -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>List of ports to expose from the container. Exposing a port here gives -the system additional information about the network connections a -container uses, but is primarily informational. Not specifying a port here -DOES NOT prevent that port from being exposed. Any port which is -listening on the default &ldquo;0.0.0.0&rdquo; address inside a container will be -accessible from the network.</p> -</td> -</tr> -<tr> -<td> -<code>envFrom</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#envfromsource-v1-core"> -[]Kubernetes core/v1.EnvFromSource -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>List of sources to populate environment variables in the container. -The keys defined within a source must be a C_IDENTIFIER. All invalid keys -will be reported as an event when the container is starting. When a key exists in multiple -sources, the value associated with the last source will take precedence. -Values defined by an Env with a duplicate key will take precedence.</p> -</td> -</tr> -<tr> -<td> -<code>env</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#envvar-v1-core"> -[]Kubernetes core/v1.EnvVar -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>List of environment variables to set in the container.</p> -</td> -</tr> -<tr> -<td> -<code>volumeMounts</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#volumemount-v1-core"> -[]Kubernetes core/v1.VolumeMount -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<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> -<td> -<code>livenessProbe</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#probe-v1-core"> -Kubernetes core/v1.Probe -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Periodic probe of container liveness. -Container will be restarted if the probe fails.</p> -</td> -</tr> -<tr> -<td> -<code>readinessProbe</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#probe-v1-core"> -Kubernetes core/v1.Probe -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Periodic probe of container service readiness. -Container will be removed from service endpoints if the probe fails.</p> -</td> -</tr> -<tr> -<td> -<code>lifecycle</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#lifecycle-v1-core"> -Kubernetes core/v1.Lifecycle -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Actions that the management system should take in response to container lifecycle events.</p> -</td> -</tr> -<tr> -<td> -<code>securityContext</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#securitycontext-v1-core"> -Kubernetes core/v1.SecurityContext -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Security options the pod should run with. -More info: <a href="https://kubernetes.io/docs/concepts/policy/security-context/">https://kubernetes.io/docs/concepts/policy/security-context/</a> -More info: <a href="https://kubernetes.io/docs/tasks/configure-pod-container/security-context/">https://kubernetes.io/docs/tasks/configure-pod-container/security-context/</a></p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Customization">Customization -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.ConfigurationAsCode">ConfigurationAsCode</a>, -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.GroovyScripts">GroovyScripts</a>) -</p> -<p> -<p>Customization defines configuration of Jenkins customization.</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>secret</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.SecretRef"> -SecretRef -</a> -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>configurations</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.ConfigMapRef"> -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.ConfigMapRef -</a> -</em> -</td> -<td> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.GroovyScripts">GroovyScripts -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.JenkinsSpec">JenkinsSpec</a>) -</p> -<p> -<p>GroovyScripts defines configuration of Jenkins customization via groovy scripts.</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>Customization</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Customization"> -Customization -</a> -</em> -</td> -<td> -<p> -(Members of <code>Customization</code> are embedded into this type.) -</p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Handler">Handler -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.Backup">Backup</a>, -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.Restore">Restore</a>) -</p> -<p> -<p>Handler defines a specific action that should be taken.</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>exec</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#execaction-v1-core"> -Kubernetes core/v1.ExecAction -</a> -</em> -</td> -<td> -<p>Exec specifies the action to take.</p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Image">Image -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.JenkinsImageSpec">JenkinsImageSpec</a>) -</p> -<p> -<p>Defines Jenkins Plugin structure</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>name</code></br> -<em> -string -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>version</code></br> -<em> -string -</em> -</td> -<td> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsAPISettings">JenkinsAPISettings -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.JenkinsSpec">JenkinsSpec</a>) -</p> -<p> -<p>JenkinsAPISettings defines configuration used by the operator to gain admin access to the Jenkins API</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>authorizationStrategy</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.AuthorizationStrategy"> -AuthorizationStrategy -</a> -</em> -</td> -<td> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsCredentialType">JenkinsCredentialType -(<code>string</code> alias)</p></h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.SeedJob">SeedJob</a>) -</p> -<p> -<p>JenkinsCredentialType defines type of Jenkins credential used to seed job mechanism.</p> -</p> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsImage">JenkinsImage -</h3> -<p> -<p>JenkinsImage is the Schema for the jenkinsimages API</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>metadata</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#objectmeta-v1-meta"> -Kubernetes meta/v1.ObjectMeta -</a> -</em> -</td> -<td> -Refer to the Kubernetes API documentation for the fields of the -<code>metadata</code> field. -</td> -</tr> -<tr> -<td> -<code>spec</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsImageSpec"> -JenkinsImageSpec -</a> -</em> -</td> -<td> -<br/> -<br/> -<table> -<tr> -<td> -<code>image</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Image"> -Image -</a> -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>plugins</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsPlugin"> -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsPlugin -</a> -</em> -</td> -<td> -</td> -</tr> -</table> -</td> -</tr> -<tr> -<td> -<code>status</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsImageStatus"> -JenkinsImageStatus -</a> -</em> -</td> -<td> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsImageSpec">JenkinsImageSpec -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.JenkinsImage">JenkinsImage</a>) -</p> -<p> -<p>JenkinsImageSpec defines the desired state of JenkinsImage</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>image</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Image"> -Image -</a> -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>plugins</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsPlugin"> -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsPlugin -</a> -</em> -</td> -<td> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsImageStatus">JenkinsImageStatus -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.JenkinsImage">JenkinsImage</a>) -</p> -<p> -<p>JenkinsImageStatus defines the observed state of JenkinsImage</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>image</code></br> -<em> -string -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>md5sum</code></br> -<em> -string -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>installedPlugins</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsPlugin"> -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsPlugin -</a> -</em> -</td> -<td> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsMaster">JenkinsMaster -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.JenkinsSpec">JenkinsSpec</a>) -</p> -<p> -<p>JenkinsMaster defines the Jenkins master pod attributes and plugins, -every single change requires a Jenkins master pod restart.</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>annotations</code></br> -<em> -map[string]string -</em> -</td> -<td> -<em>(Optional)</em> -<p>Annotations is an unstructured key value map stored with a resource that may be -set by external tools to store and retrieve arbitrary metadata. They are not -queryable and should be preserved when modifying objects. -More info: <a href="http://kubernetes.io/docs/user-guide/annotations">http://kubernetes.io/docs/user-guide/annotations</a></p> -</td> -</tr> -<tr> -<td> -<code>masterAnnotations</code></br> -<em> -map[string]string -</em> -</td> -<td> -<em>(Optional)</em> -<p>Annotations is an unstructured key value map stored with a resource that may be -set by external tools to store and retrieve arbitrary metadata. They are not -queryable and should be preserved when modifying objects. -More info: <a href="http://kubernetes.io/docs/user-guide/annotations">http://kubernetes.io/docs/user-guide/annotations</a> -Deprecated: will be removed in the future, please use Annotations(annotations)</p> -</td> -</tr> -<tr> -<td> -<code>labels</code></br> -<em> -map[string]string -</em> -</td> -<td> -<em>(Optional)</em> -<p>Map of string keys and values that can be used to organize and categorize -(scope and select) objects. May match selectors of replication controllers -and services. -More info: <a href="http://kubernetes.io/docs/user-guide/labels">http://kubernetes.io/docs/user-guide/labels</a></p> -</td> -</tr> -<tr> -<td> -<code>nodeSelector</code></br> -<em> -map[string]string -</em> -</td> -<td> -<em>(Optional)</em> -<p>NodeSelector is a selector which must be true for the pod to fit on a node. -Selector which must match a node&rsquo;s labels for the pod to be scheduled on that node. -More info: <a href="https://kubernetes.io/docs/concepts/configuration/assign-pod-node/">https://kubernetes.io/docs/concepts/configuration/assign-pod-node/</a></p> -</td> -</tr> -<tr> -<td> -<code>securityContext</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#podsecuritycontext-v1-core"> -Kubernetes core/v1.PodSecurityContext -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>SecurityContext that applies to all the containers of the Jenkins -Master. As per kubernetes specification, it can be overridden -for each container individually. -Defaults to: -runAsUser: 1000 -fsGroup: 1000</p> -</td> -</tr> -<tr> -<td> -<code>containers</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Container"> -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Container -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>List of containers belonging to the pod. -Containers cannot currently be added or removed. -There must be at least one container in a Pod. -Defaults to: -- image: jenkins/jenkins:lts -imagePullPolicy: Always -livenessProbe: -failureThreshold: 12 -httpGet: -path: /login -port: http -scheme: HTTP -initialDelaySeconds: 80 -periodSeconds: 10 -successThreshold: 1 -timeoutSeconds: 5 -name: jenkins-master -readinessProbe: -failureThreshold: 3 -httpGet: -path: /login -port: http -scheme: HTTP -initialDelaySeconds: 30 -periodSeconds: 10 -successThreshold: 1 -timeoutSeconds: 1 -resources: -limits: -cpu: 1500m -memory: 3Gi -requests: -cpu: &ldquo;1&rdquo; -memory: 600Mi</p> -</td> -</tr> -<tr> -<td> -<code>imagePullSecrets</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#localobjectreference-v1-core"> -[]Kubernetes core/v1.LocalObjectReference -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. -If specified, these secrets will be passed to individual puller implementations for them to use. For example, -in the case of docker, only DockerConfig type secrets are honored. -More info: <a href="https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod">https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod</a></p> -</td> -</tr> -<tr> -<td> -<code>volumes</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#volume-v1-core"> -[]Kubernetes core/v1.Volume -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>List of volumes that can be mounted by containers belonging to the pod. -More info: <a href="https://kubernetes.io/docs/concepts/storage/volumes">https://kubernetes.io/docs/concepts/storage/volumes</a></p> -</td> -</tr> -<tr> -<td> -<code>tolerations</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#toleration-v1-core"> -[]Kubernetes core/v1.Toleration -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>If specified, the pod&rsquo;s tolerations.</p> -</td> -</tr> -<tr> -<td> -<code>basePlugins</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Plugin"> -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Plugin -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>BasePlugins contains plugins required by operator -Defaults to : -- name: kubernetes -version: &ldquo;1.28.6&rdquo; -- name: workflow-job -version: &ldquo;2.40&rdquo; -- name: workflow-aggregator -version: &ldquo;2.6&rdquo; -- name: git -version: &ldquo;4.5.0&rdquo; -- name: job-dsl -version: &ldquo;1.77&rdquo; -- name: configuration-as-code -version: &ldquo;1.46&rdquo; -- name: kubernetes-credentials-provider -version: &ldquo;0.15&rdquo;</p> -</td> -</tr> -<tr> -<td> -<code>plugins</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Plugin"> -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Plugin -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Plugins contains plugins required by user</p> -</td> -</tr> -<tr> -<td> -<code>disableCSRFProtection</code></br> -<em> -bool -</em> -</td> -<td> -<p>DisableCSRFProtection allows you to toggle CSRF Protection on Jenkins</p> -</td> -</tr> -<tr> -<td> -<code>priorityClassName</code></br> -<em> -string -</em> -</td> -<td> -<em>(Optional)</em> -<p>PriorityClassName for Jenkins master pod</p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsPlugin">JenkinsPlugin -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.JenkinsImageSpec">JenkinsImageSpec</a>, -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.JenkinsImageStatus">JenkinsImageStatus</a>) -</p> -<p> -<p>Defines Jenkins Plugin structure</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>name</code></br> -<em> -string -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>version</code></br> -<em> -string -</em> -</td> -<td> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsSpec">JenkinsSpec -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.Jenkins">Jenkins</a>) -</p> -<p> -<p>JenkinsSpec defines the desired state of the Jenkins.</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>master</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsMaster"> -JenkinsMaster -</a> -</em> -</td> -<td> -<p>Master represents Jenkins master pod properties and Jenkins plugins. -Every single change here requires a pod restart.</p> -</td> -</tr> -<tr> -<td> -<code>seedJobs</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.SeedJob"> -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.SeedJob -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>SeedJobs defines list of Jenkins Seed Job configurations -More info: <a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configuration#configure-seed-jobs-and-pipelines">https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configuration#configure-seed-jobs-and-pipelines</a></p> -</td> -</tr> -<tr> -<td> -<code>notifications</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Notification"> -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Notification -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Notifications defines list of a services which are used to inform about Jenkins status -Can be used to integrate chat services like Slack, Microsoft Teams or Mailgun</p> -</td> -</tr> -<tr> -<td> -<code>service</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Service"> -Service -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Service is Kubernetes service of Jenkins master HTTP pod -Defaults to : -port: 8080 -type: ClusterIP</p> -</td> -</tr> -<tr> -<td> -<code>slaveService</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Service"> -Service -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Service is Kubernetes service of Jenkins slave pods -Defaults to : -port: 50000 -type: ClusterIP</p> -</td> -</tr> -<tr> -<td> -<code>backup</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Backup"> -Backup -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Backup defines configuration of Jenkins backup -More info: <a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configure-backup-and-restore/">https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configure-backup-and-restore/</a></p> -</td> -</tr> -<tr> -<td> -<code>restore</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Restore"> -Restore -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Backup defines configuration of Jenkins backup restore -More info: <a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configure-backup-and-restore/">https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configure-backup-and-restore/</a></p> -</td> -</tr> -<tr> -<td> -<code>groovyScripts</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.GroovyScripts"> -GroovyScripts -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>GroovyScripts defines configuration of Jenkins customization via groovy scripts</p> -</td> -</tr> -<tr> -<td> -<code>configurationAsCode</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.ConfigurationAsCode"> -ConfigurationAsCode -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>ConfigurationAsCode defines configuration of Jenkins customization via Configuration as Code Jenkins plugin</p> -</td> -</tr> -<tr> -<td> -<code>roles</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#roleref-v1-rbac"> -[]Kubernetes rbac/v1.RoleRef -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Roles defines list of extra RBAC roles for the Jenkins Master pod service account</p> -</td> -</tr> -<tr> -<td> -<code>serviceAccount</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.ServiceAccount"> -ServiceAccount -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>ServiceAccount defines Jenkins master service account attributes</p> -</td> -</tr> -<tr> -<td> -<code>jenkinsAPISettings</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsAPISettings"> -JenkinsAPISettings -</a> -</em> -</td> -<td> -<p>JenkinsAPISettings defines configuration used by the operator to gain admin access to the Jenkins API</p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsStatus">JenkinsStatus -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.Jenkins">Jenkins</a>) -</p> -<p> -<p>JenkinsStatus defines the observed state of Jenkins</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>operatorVersion</code></br> -<em> -string -</em> -</td> -<td> -<em>(Optional)</em> -<p>OperatorVersion is the operator version which manages this CR</p> -</td> -</tr> -<tr> -<td> -<code>provisionStartTime</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#time-v1-meta"> -Kubernetes meta/v1.Time -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>ProvisionStartTime is a time when Jenkins master pod has been created</p> -</td> -</tr> -<tr> -<td> -<code>baseConfigurationCompletedTime</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#time-v1-meta"> -Kubernetes meta/v1.Time -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>BaseConfigurationCompletedTime is a time when Jenkins base configuration phase has been completed</p> -</td> -</tr> -<tr> -<td> -<code>userConfigurationCompletedTime</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#time-v1-meta"> -Kubernetes meta/v1.Time -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>UserConfigurationCompletedTime is a time when Jenkins user configuration phase has been completed</p> -</td> -</tr> -<tr> -<td> -<code>restoredBackup</code></br> -<em> -uint64 -</em> -</td> -<td> -<em>(Optional)</em> -<p>RestoredBackup is the restored backup number after Jenkins master pod restart</p> -</td> -</tr> -<tr> -<td> -<code>lastBackup</code></br> -<em> -uint64 -</em> -</td> -<td> -<em>(Optional)</em> -<p>LastBackup is the latest backup number</p> -</td> -</tr> -<tr> -<td> -<code>pendingBackup</code></br> -<em> -uint64 -</em> -</td> -<td> -<em>(Optional)</em> -<p>PendingBackup is the pending backup number</p> -</td> -</tr> -<tr> -<td> -<code>backupDoneBeforePodDeletion</code></br> -<em> -bool -</em> -</td> -<td> -<em>(Optional)</em> -<p>BackupDoneBeforePodDeletion tells if backup before pod deletion has been made</p> -</td> -</tr> -<tr> -<td> -<code>userAndPasswordHash</code></br> -<em> -string -</em> -</td> -<td> -<em>(Optional)</em> -<p>UserAndPasswordHash is a SHA256 hash made from user and password</p> -</td> -</tr> -<tr> -<td> -<code>createdSeedJobs</code></br> -<em> -[]string -</em> -</td> -<td> -<em>(Optional)</em> -<p>CreatedSeedJobs contains list of seed job id already created in Jenkins</p> -</td> -</tr> -<tr> -<td> -<code>appliedGroovyScripts</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.AppliedGroovyScript"> -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.AppliedGroovyScript -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>AppliedGroovyScripts is a list with all applied groovy scripts in Jenkins by the operator</p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Mailgun">Mailgun -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.Notification">Notification</a>) -</p> -<p> -<p>Mailgun is handler for Mailgun email service notification channel.</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>domain</code></br> -<em> -string -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>apiKeySecretKeySelector</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.SecretKeySelector"> -SecretKeySelector -</a> -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>recipient</code></br> -<em> -string -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>from</code></br> -<em> -string -</em> -</td> -<td> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.MicrosoftTeams">MicrosoftTeams -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.Notification">Notification</a>) -</p> -<p> -<p>MicrosoftTeams is handler for Microsoft MicrosoftTeams notification channel.</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>webHookURLSecretKeySelector</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.SecretKeySelector"> -SecretKeySelector -</a> -</em> -</td> -<td> -<p>The web hook URL to MicrosoftTeams App</p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Notification">Notification -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.JenkinsSpec">JenkinsSpec</a>) -</p> -<p> -<p>Notification is a service configuration used to send notifications about Jenkins status.</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>level</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.NotificationLevel"> -NotificationLevel -</a> -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>verbose</code></br> -<em> -bool -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>name</code></br> -<em> -string -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>slack</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Slack"> -github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Slack -</a> -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>teams</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.MicrosoftTeams"> -github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.MicrosoftTeams -</a> -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>mailgun</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Mailgun"> -github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Mailgun -</a> -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>smtp</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.SMTP"> -github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.SMTP -</a> -</em> -</td> -<td> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.NotificationLevel">NotificationLevel -(<code>string</code> alias)</p></h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.Notification">Notification</a>) -</p> -<p> -<p>NotificationLevel defines the level of a Notification.</p> -</p> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Plugin">Plugin -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.JenkinsMaster">JenkinsMaster</a>) -</p> -<p> -<p>Plugin defines Jenkins plugin.</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>name</code></br> -<em> -string -</em> -</td> -<td> -<p>Name is the name of Jenkins plugin</p> -</td> -</tr> -<tr> -<td> -<code>version</code></br> -<em> -string -</em> -</td> -<td> -<p>Version is the version of Jenkins plugin</p> -</td> -</tr> -<tr> -<td> -<code>downloadURL</code></br> -<em> -string -</em> -</td> -<td> -<p>DownloadURL is the custom url from where plugin has to be downloaded.</p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Restore">Restore -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.JenkinsSpec">JenkinsSpec</a>) -</p> -<p> -<p>Restore defines configuration of Jenkins backup restore operation.</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>containerName</code></br> -<em> -string -</em> -</td> -<td> -<p>ContainerName is the container name responsible for restore backup operation</p> -</td> -</tr> -<tr> -<td> -<code>action</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Handler"> -Handler -</a> -</em> -</td> -<td> -<p>Action defines action which performs restore backup in restore container sidecar</p> -</td> -</tr> -<tr> -<td> -<code>getLatestAction</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Handler"> -Handler -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>GetLatestAction defines action which returns the latest backup number. If there is no backup &ldquo;-1&rdquo; should be -returned.</p> -</td> -</tr> -<tr> -<td> -<code>recoveryOnce</code></br> -<em> -uint64 -</em> -</td> -<td> -<em>(Optional)</em> -<p>RecoveryOnce if want to restore specific backup set this field and then Jenkins will be restarted and desired backup will be restored</p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.SMTP">SMTP -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.Notification">Notification</a>) -</p> -<p> -<p>SMTP is handler for sending emails via this protocol.</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>usernameSecretKeySelector</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.SecretKeySelector"> -SecretKeySelector -</a> -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>passwordSecretKeySelector</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.SecretKeySelector"> -SecretKeySelector -</a> -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>port</code></br> -<em> -int -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>server</code></br> -<em> -string -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>tlsInsecureSkipVerify</code></br> -<em> -bool -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>from</code></br> -<em> -string -</em> -</td> -<td> -</td> -</tr> -<tr> -<td> -<code>to</code></br> -<em> -string -</em> -</td> -<td> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.SecretKeySelector">SecretKeySelector -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.Mailgun">Mailgun</a>, -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.MicrosoftTeams">MicrosoftTeams</a>, -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.SMTP">SMTP</a>, -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.Slack">Slack</a>) -</p> -<p> -<p>SecretKeySelector selects a key of a Secret.</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>secret</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#localobjectreference-v1-core"> -Kubernetes core/v1.LocalObjectReference -</a> -</em> -</td> -<td> -<p>The name of the secret in the pod&rsquo;s namespace to select from.</p> -</td> -</tr> -<tr> -<td> -<code>key</code></br> -<em> -string -</em> -</td> -<td> -<p>The key of the secret to select from. Must be a valid secret key.</p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.SecretRef">SecretRef -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.Customization">Customization</a>) -</p> -<p> -<p>SecretRef is reference to Kubernetes secret.</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>name</code></br> -<em> -string -</em> -</td> -<td> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.SeedJob">SeedJob -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.JenkinsSpec">JenkinsSpec</a>) -</p> -<p> -<p>SeedJob defines configuration for seed job -More info: <a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configuration/#configure-seed-jobs-and-pipelines">https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configuration/#configure-seed-jobs-and-pipelines</a>.</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>id</code></br> -<em> -string -</em> -</td> -<td> -<p>ID is the unique seed job name</p> -</td> -</tr> -<tr> -<td> -<code>credentialID</code></br> -<em> -string -</em> -</td> -<td> -<p>CredentialID is the Kubernetes secret name which stores repository access credentials</p> -</td> -</tr> -<tr> -<td> -<code>description</code></br> -<em> -string -</em> -</td> -<td> -<em>(Optional)</em> -<p>Description is the description of the seed job</p> -</td> -</tr> -<tr> -<td> -<code>targets</code></br> -<em> -string -</em> -</td> -<td> -<p>Targets is the repository path where are seed job definitions</p> -</td> -</tr> -<tr> -<td> -<code>repositoryBranch</code></br> -<em> -string -</em> -</td> -<td> -<p>RepositoryBranch is the repository branch where are seed job definitions</p> -</td> -</tr> -<tr> -<td> -<code>repositoryUrl</code></br> -<em> -string -</em> -</td> -<td> -<p>RepositoryURL is the repository access URL. Can be SSH or HTTPS.</p> -</td> -</tr> -<tr> -<td> -<code>credentialType</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsCredentialType"> -JenkinsCredentialType -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>JenkinsCredentialType is the <a href="https://jenkinsci.github.io/kubernetes-credentials-provider-plugin/">https://jenkinsci.github.io/kubernetes-credentials-provider-plugin/</a> credential type</p> -</td> -</tr> -<tr> -<td> -<code>bitbucketPushTrigger</code></br> -<em> -bool -</em> -</td> -<td> -<em>(Optional)</em> -<p>BitbucketPushTrigger is used for Bitbucket web hooks</p> -</td> -</tr> -<tr> -<td> -<code>githubPushTrigger</code></br> -<em> -bool -</em> -</td> -<td> -<em>(Optional)</em> -<p>GitHubPushTrigger is used for GitHub web hooks</p> -</td> -</tr> -<tr> -<td> -<code>buildPeriodically</code></br> -<em> -string -</em> -</td> -<td> -<em>(Optional)</em> -<p>BuildPeriodically is setting for scheduled trigger</p> -</td> -</tr> -<tr> -<td> -<code>pollSCM</code></br> -<em> -string -</em> -</td> -<td> -<em>(Optional)</em> -<p>PollSCM is setting for polling changes in SCM</p> -</td> -</tr> -<tr> -<td> -<code>ignoreMissingFiles</code></br> -<em> -bool -</em> -</td> -<td> -<em>(Optional)</em> -<p>IgnoreMissingFiles is setting for Job DSL API plugin to ignore files that miss</p> -</td> -</tr> -<tr> -<td> -<code>additionalClasspath</code></br> -<em> -string -</em> -</td> -<td> -<em>(Optional)</em> -<p>AdditionalClasspath is setting for Job DSL API plugin to set Additional Classpath</p> -</td> -</tr> -<tr> -<td> -<code>failOnMissingPlugin</code></br> -<em> -bool -</em> -</td> -<td> -<em>(Optional)</em> -<p>FailOnMissingPlugin is setting for Job DSL API plugin that fails job if required plugin is missing</p> -</td> -</tr> -<tr> -<td> -<code>unstableOnDeprecation</code></br> -<em> -bool -</em> -</td> -<td> -<em>(Optional)</em> -<p>UnstableOnDeprecation is setting for Job DSL API plugin that sets build status as unstable if build using deprecated features</p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Service">Service -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.JenkinsSpec">JenkinsSpec</a>) -</p> -<p> -<p>Service defines Kubernetes service attributes</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>annotations</code></br> -<em> -map[string]string -</em> -</td> -<td> -<em>(Optional)</em> -<p>Annotations is an unstructured key value map stored with a resource that may be -set by external tools to store and retrieve arbitrary metadata. They are not -queryable and should be preserved when modifying objects. -More info: <a href="http://kubernetes.io/docs/user-guide/annotations">http://kubernetes.io/docs/user-guide/annotations</a></p> -</td> -</tr> -<tr> -<td> -<code>labels</code></br> -<em> -map[string]string -</em> -</td> -<td> -<em>(Optional)</em> -<p>Route service traffic to pods with label keys and values matching this -selector. If empty or not present, the service is assumed to have an -external process managing its endpoints, which Kubernetes will not -modify. Only applies to types ClusterIP, NodePort, and LoadBalancer. -Ignored if type is ExternalName. -More info: <a href="https://kubernetes.io/docs/concepts/services-networking/service/">https://kubernetes.io/docs/concepts/services-networking/service/</a></p> -</td> -</tr> -<tr> -<td> -<code>type</code></br> -<em> -<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#servicetype-v1-core"> -Kubernetes core/v1.ServiceType -</a> -</em> -</td> -<td> -<em>(Optional)</em> -<p>Type determines how the Service is exposed. Defaults to ClusterIP. Valid -options are ExternalName, ClusterIP, NodePort, and LoadBalancer. -&ldquo;ExternalName&rdquo; maps to the specified externalName. -&ldquo;ClusterIP&rdquo; allocates a cluster-internal IP address for load-balancing to -endpoints. Endpoints are determined by the selector or if that is not -specified, by manual construction of an Endpoints object. If clusterIP is -&ldquo;None&rdquo;, no virtual IP is allocated and the endpoints are published as a -set of endpoints rather than a stable IP. -&ldquo;NodePort&rdquo; builds on ClusterIP and allocates a port on every node which -routes to the clusterIP. -&ldquo;LoadBalancer&rdquo; builds on NodePort and creates an -external load-balancer (if supported in the current cloud) which routes -to the clusterIP. -More info: <a href="https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services---service-types">https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services&mdash;service-types</a></p> -</td> -</tr> -<tr> -<td> -<code>port</code></br> -<em> -int32 -</em> -</td> -<td> -<p>The port that are exposed by this service. -More info: <a href="https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies">https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies</a></p> -</td> -</tr> -<tr> -<td> -<code>nodePort</code></br> -<em> -int32 -</em> -</td> -<td> -<em>(Optional)</em> -<p>The port on each node on which this service is exposed when type=NodePort or LoadBalancer. -Usually assigned by the system. If specified, it will be allocated to the service -if unused or else creation of the service will fail. -Default is to auto-allocate a port if the ServiceType of this Service requires one. -More info: <a href="https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport">https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport</a></p> -</td> -</tr> -<tr> -<td> -<code>loadBalancerSourceRanges</code></br> -<em> -[]string -</em> -</td> -<td> -<em>(Optional)</em> -<p>If specified and supported by the platform, this will restrict traffic through the cloud-provider -load-balancer will be restricted to the specified client IPs. This field will be ignored if the -cloud-provider does not support the feature.&rdquo; -More info: <a href="https://kubernetes.io/docs/tasks/administer-cluster/securing-a-cluster/#restricting-cloud-metadata-api-access">https://kubernetes.io/docs/tasks/administer-cluster/securing-a-cluster/#restricting-cloud-metadata-api-access</a></p> -</td> -</tr> -<tr> -<td> -<code>loadBalancerIP</code></br> -<em> -string -</em> -</td> -<td> -<em>(Optional)</em> -<p>Only applies to Service Type: LoadBalancer -LoadBalancer will get created with the IP specified in this field. -This feature depends on whether the underlying cloud-provider supports specifying -the loadBalancerIP when a load balancer is created. -This field will be ignored if the cloud-provider does not support the feature.</p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.ServiceAccount">ServiceAccount -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.JenkinsSpec">JenkinsSpec</a>) -</p> -<p> -<p>ServiceAccount defines Kubernetes service account attributes</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>annotations</code></br> -<em> -map[string]string -</em> -</td> -<td> -<em>(Optional)</em> -<p>Annotations is an unstructured key value map stored with a resource that may be -set by external tools to store and retrieve arbitrary metadata. They are not -queryable and should be preserved when modifying objects. -More info: <a href="http://kubernetes.io/docs/user-guide/annotations">http://kubernetes.io/docs/user-guide/annotations</a></p> -</td> -</tr> -</tbody> -</table> -<h3 id="github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Slack">Slack -</h3> -<p> -(<em>Appears on:</em> -<a href="#github.com%2fjenkinsci%2fkubernetes-operator%2fpkg%2fapis%2fjenkins%2fv1alpha2.Notification">Notification</a>) -</p> -<p> -<p>Slack is handler for Slack notification channel.</p> -</p> -<table> -<thead> -<tr> -<th>Field</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td> -<code>webHookURLSecretKeySelector</code></br> -<em> -<a href="#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.SecretKeySelector"> -SecretKeySelector -</a> -</em> -</td> -<td> -<p>The web hook URL to Slack App</p> -</td> -</tr> -</tbody> -</table> -<hr/> -<p><em> -Generated with <code>gen-crd-api-reference-docs</code> -on git commit <code>fe81e5a</code>. -</em></p> - - - - - - diff --git a/docs/docs/getting-started/v0.6.x/installing-the-operator/index.html b/docs/docs/getting-started/v0.6.x/installing-the-operator/index.html deleted file mode 100644 index d386e1036..000000000 --- a/docs/docs/getting-started/v0.6.x/installing-the-operator/index.html +++ /dev/null @@ -1,1866 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Installing the Operator | Jenkins Operator - - - - - - - - - - - - - - - - - - - - - - - - - - - - Installing the Operator | Jenkins Operator - - -
- - - -
-
-
-
-
- - - - - -
- - - - -
- - - - -
- -
- - - -
-

Installing the Operator

-
How to install Jenkins Operator
- - - - -
-

This document describes installation procedure for Jenkins Operator. -All container images can be found at virtuslab/jenkins-operator Docker Hub repository.

- -
- - -

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.

- -

Deploy Jenkins Operator using YAML’s

- -

First, install Jenkins Custom Resource Definition:

-
kubectl apply -f https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/config/crd/bases/jenkins.io_jenkins.yaml 
-

Then, install the Operator and other required resources:

-
kubectl apply -f https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/deploy/all-in-one-v1alpha2.yaml
-

Watch Jenkins Operator instance being created:

-
kubectl get pods -w
-

Now Jenkins Operator should be up and running in the default namespace. -For deploying Jenkins, refer to Deploy Jenkins section.

- -

Deploy Jenkins Operator using Helm Chart

- -

Alternatively, you can also use Helm to install the Operator (and optionally, by default, Jenkins). It requires the Helm 3+ for deployment.

- -

Create a namespace for the operator:

-
$ kubectl create namespace <your-namespace>
-

To install, you need only to type these commands:

-
$ helm repo add jenkins https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/chart
-$ helm install <name> jenkins/jenkins-operator -n <your-namespace>
-

To add custom labels and annotations, you can use values.yaml file or pass them into helm install command, e.g.:

-
$ helm install <name> jenkins/jenkins-operator -n <your-namespace> --set jenkins.labels.LabelKey=LabelValue,jenkins.annotations.AnnotationKey=AnnotationValue
-

You can further customize Jenkins using values.yaml: -

Jenkins instance configuration -

- - - - - - - - - - - - - - - - - -
FieldDefault valueDescription
-jenkins - -

operator is section for configuring operator deployment

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-enabled - -true - -Enabled can enable or disable the Jenkins instance. -Set to false if you have configured CR already and/or you want to deploy an operator only. -
-apiVersion -jenkins.io/v1alpha2 -Version of the CR manifest. The recommended and default value is jenkins.io/v1alpha2. -More info -
-name - -jenkins - -Name of resource. The pod name will be jenkins-<name> (name will be set as suffix). -
-namespace - -default - -Namespace the resources will be deployed to. It's not recommended to use default namespace. -Create new namespace for jenkins (e.g. kubectl create -n jenkins) -
-labels - -{} - -Labels are injected into metadata labels field. -
-annotations - -{} - -Annotations are injected into metadata annotations field. -
-image - -jenkins/jenkins:lts - -Image is the name (and tag) of the Jenkins instance. -It's recommended to use LTS (tag: "lts") version. -
-env - -[] - -Env contains jenkins container environment variables. -
-imagePullPolicy - -Always - -Defines policy for pulling images -
-priorityClassName - -"" - -PriorityClassName indicates the importance of a Pod relative to other Pods. -More info -
-disableCSRFProtection - -false - -disableCSRFProtection can enable or disable operator built-in CSRF protection. -Set it to true if you are using OpenShift Jenkins Plugin. -More info -
-imagePullSecrets - -[] - -Used if you want to pull images from private repository -More info -
-notifications - -[] - -Notifications is feature that notify user about Jenkins reconciliation status -More info -
-basePlugins - -
-- name: kubernetes
-  version: "1.25.2"
-- name: workflow-job
-  version: "2.39"
-- name: workflow-aggregator
-  version: "2.6"
-- name: git
-  version: "4.2.2"
-- name: job-dsl
-  version: "1.77"
-- name: configuration-as-code
-  version: "1.38"
-- name: kubernetes-credentials
-        -provider
-  version: "0.13"
-
-
-Plugins installed and required by the operator -shouldn't contain plugins defined by user -You can change their versions here -More info -
-plugins - -[] - -Plugins required by the user. You can define plugins here. -More info -Example: -
-plugins:
- - name: simple-theme-plugin
-   version: 0.5.1
-
-
-seedJobs - -[] - -Placeholder for jenkins seed jobs -For seed job creation tutorial, check:
Prepare seed jobs -
Configure seed jobs -
Example: - -
-seedJobs:
-- id: jenkins-operator
-  targets: "cicd/jobs/*.jenkins"
-  description: "Jenkins Operator repository"
-  repositoryBranch: master
-  repositoryUrl:
-  - https://github.com/jenkinsci/kubernetes-operator.git
-
-
-
-resources - -
-limits:
-  cpu: 1500m
-  memory: 3Gi
-requests:
-  cpu: 1
-  memory: 500M
-
-
-Resource limit/request for Jenkins -More info -
-volumes - -
-- name: backup
-  persistentVolumeClaim:
-    claimName: jenkins-backup
-
-
-Volumes used by Jenkins -By default, we are only using PVC volume for storing backups. -
-volumeMounts - -[] - -volumeMounts are mounts for Jenkins pod. -
-securityContext - -runAsUser: 1000 -fsGroup: 1000 - -SecurityContext for pod. -
servicenot implementedHttp Jenkins service. See https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/schema/#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Service for details.
slaveServicenot implementedSlave Jenkins service. See https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/schema/#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Service for details.
-livenessProbe - -
-livenessProbe:
-  failureThreshold: 12
-  httpGet:
-    path: /login
-    port: http
-    scheme: HTTP
-  initialDelaySeconds: 80
-  periodSeconds: 10
-  successThreshold: 1
-  timeoutSeconds: 5
-
-
-livenessProbe for Pod -
-readinessProbe - -
-readinessProbe:
-  failureThreshold: 3
-  httpGet:
-    path: /login
-    port: http
-    scheme: HTTP
-  initialDelaySeconds: 30
-  periodSeconds: 10
-  successThreshold: 1
-  timeoutSeconds: 1
-
-
-readinessProbe for Pod -
- -backup - -

- - -Backup - - -

-
- -Backup is section for configuring operator's backup feature -By default backup feature is enabled and pre-configured -This section simplifies the configuration described here: Configuring backup and restore -For customization tips see Custom backup and restore -
-configuration -

- - -Configuration - - -

-
-Section where we can configure Jenkins instance. -See Customizing Jenkins for details -
-
- -

Configuring operator deployment

- - - - - - - - - - - - - - - - - -
FieldDefault valueDescription
- operator - -

operator is section for configuring operator deployment

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- replicaCount
-
- 1 - - Number of Replicas. -
- image - - virtuslab/jenkins-operator:v0.4.0 - - Name (and tag) of the Jenkins Operator image. -
- imagePullPolicy - - IfNotPresent - - Defines policy for pulling images. -
- imagePullSecrets - - [] - - Used if you want to pull images from private repository. -
- nameOverride - - "" - - nameOverride overrides the app name. -
- fullnameOverride - - "" - - fullnameOverride overrides the deployment name -
- resources - - {} - -
- nodeSelector - - {} - -
- tolerations - - {} - -
- affinity - - {} - -
-
- -

Backup -

-

-(Appears on: -JenkinsConfiguration) -

-

-Backup defines configuration of Jenkins backup. -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldDefault valueDescription
- enabled - - true - - Enabled is enable/disable switch for backup feature. -
- image - - virtuslab/jenkins-operator-backup-pvc:v0.0.8 - - Image used by backup feature. -
- containerName - - backup - - Backup container name. -
- interval - - 30 - - Defines how often make backup in seconds. -
- makeBackupBeforePodDeletion - - true - - When enabled will make backup before pod deletion. -
- backupCommand - - /home/user/bin/backup.sh - - Backup container command. -
- restoreCommand - - /home/user/bin/restore.sh - - Backup restore command. -
- pvc - -

Persistent Volume Claim Kubernetes resource

-
- - - - - - - - - - - - - - - - - - - - - - - -
- enabled - - true - - Enable/disable switch for PVC -
- enabled - - true - - Enable/disable switch for PVC -
- size - - 5Gi - - Size of PVC -
- className - - "" - - StorageClassName for PVC - More info -
-
- env - -
-- name: BACKUP_DIR
-  value: /backup
-- name: JENKINS_HOME
-  value: /jenkins-home
-- name: BACKUP_COUNT
-  value: "3"
-
-
- Contains container environment variables. - PVC backup provider handles these variables:
- BACKUP_DIR - path for storing backup files (default: "/backup")
- JENKINS_HOME - path to jenkins home (default: "/jenkins-home")
- BACKUP_COUNT - define how much recent backups will be kept
-
- volumeMounts - -
-- name: jenkins-home
-  mountPath: /jenkins-home
-- mountPath: /backup
-  name: backup
-
-
- Holds the mount points for volumes. -
- - -

Configuration -

-

- (Appears on: - Jenkins instance configuration) -

- -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldDefault valueDescription
- configurationAsCode - - {} - - ConfigurationAsCode defines configuration of Jenkins customization via Configuration as Code Jenkins plugin. -Example:
-
-- configMapName: jenkins-casc
-  content: {}
-
-
- groovyScripts - - {} - - GroovyScripts defines configuration of Jenkins customization via groovy scripts. - Example:
-
-- configMapName: jenkins-gs
-  content: {}
-
-
- secretRefName - - “” - - secretRefName of existing secret (previously created). -
- secretData - - {} - - If secretRefName is empty, secretData creates new secret and fills with data provided in secretData. -

- -

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 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
  • -
- - - -
Last modified December 8, 2021 -
-
- - -
-
-
- - - - -
- - - - - - - - - - - - - - diff --git a/docs/docs/getting-started/v0.6.x/ldap/index.html b/docs/docs/getting-started/v0.6.x/ldap/index.html deleted file mode 100644 index 1a69ec34e..000000000 --- a/docs/docs/getting-started/v0.6.x/ldap/index.html +++ /dev/null @@ -1,1092 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -LDAP | Jenkins Operator - - - - - - - - - - - - - - - - - - - - - - - - - - - - LDAP | Jenkins Operator - - -
- - - -
-
-
-
-
- - - - - -
- - - - -
- - - - -
-
- - - - - - - - - - - - - -
-
- - - -
-

LDAP

-
Additional configuration for LDAP
- - -

Configuring LDAP is not supported out of the box, but can be achieved through -plugins and some well tuned configurations.

- -

The plugin we will use is: https://plugins.jenkins.io/ldap/

- -
-

Note: This is an example of how LDAP authentication can be achieved. The LDAP -plugin is from a third-party, and there may be other alternatives that suits -your use case better. Use this guide with a grain of salt.

-
- -

Requirements

- -
    -
  • LDAP server accessible from the Kubernetes cluster where your Jenkins -instance will live.

  • - -
  • Credentials to a manager account in your AD. Jenkins Operator will use -this account to authenticate with Jenkins for health checks, seed jobs, etc.

  • -
- -

Steps

- -

In your Jenkins configuration, add the following plugin:

-
plugins:
-    # Check https://plugins.jenkins.io/ldap/ to find the latest version.
-  - name: ldap
-    version: "2.7"
-

Easiest step is to then start up Jenkins then navigate to your instance’s -“Configure Global Security” page and configure it accordingly.

- -

http://jenkins.example.com/configureSecurity/

- -

Once it’s set up and tested, you can navigate to your JCasC page and export -the LDAP settings.

- -

https://jenkins.example.com/configuration-as-code/

- -

Feed the relevant new settings into your Kubernetes ConfigMap for your JCasC -settings.

- -

Here’s a snippet of the LDAP-related configurations:

-
apiVersion: v1
-kind: ConfigMap
-metadata:
-  name: jenkins-casc
-data:
-  ldap.yaml: |
-    jenkins:
-      securityRealm:
-        ldap:
-          configurations:
-            - displayNameAttributeName: "name"
-              groupSearchBase: "OU=Groups,OU=MyCompany"
-              groupSearchFilter: "(& (cn={0}) (objectclass=group) )"
-              inhibitInferRootDN: false
-              managerDN: "CN=Jenkins Admin,OU=UsersSystem,OU=UsersOther,OU=MyCompany,DC=mycompany,DC=local"
-              managerPasswordSecret: "${LDAP_MANAGER_PASSWORD}"
-              rootDN: "DC=mycompany,DC=local"
-              server: "MyCompany.local"
-              userSearch: "SamAccountName={0}"
-              userSearchBase: "OU=MyCompany"
-          disableMailAddressResolver: false
-          disableRolePrefixing: true
-          groupIdStrategy: "caseInsensitive"
-          userIdStrategy: "caseInsensitive"
-
-

Note the use of ${LDAP_MANAGER_PASSWORD} above. You can reference -Kubernetes secrets in your JCasC ConfigMaps by adding the following to your -Jenkins object:

-
> kind: Jenkins
-> spec:
->   configurationAsCode:
->     configurations:
->       - name: jenkins-casc
->     secret:
->       # This here
->       name: jenkins-casc-secrets
-> ```
->
-> ```yaml
-> apiVersion: v1
-> kind: Secret
-> metadata:
->   name: jenkins-cred-conf-secrets
-> stringData:
->   LDAP_MANAGER_PASSWORD: <password-for-manager-created-in-ldap>
-> ```
->
-> Schema reference: [v1alpha2.ConfigurationAsCode](./schema/#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.ConfigurationAsCode)
-
-Finally you must configure the Jenkins operator to use the manager's
-credentials from the AD.
-
-This is because this procedure will disable Jenkins' own user database, and the
-Jenkins operator still needs to be able to talk to Jenkins in an authorized
-manner.
-
-Create the following Kubernetes secret:
-

yaml -apiVersion: v1 -kind: Secret -metadata: - name: jenkins-operator-credentials- - namespace: -stringData: - user: - password: -```

- -

Note: Values in stringData do not need to be base64 encoded. They are -encoded by Kubernetes when the manifest is applied.

-
- - - -
Last modified December 8, 2021 -
-
- - -
-
-
- - - - -
- - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/docs/getting-started/v0.6.x/openshift/index.html b/docs/docs/getting-started/v0.6.x/openshift/index.html deleted file mode 100644 index baa9fc97d..000000000 --- a/docs/docs/getting-started/v0.6.x/openshift/index.html +++ /dev/null @@ -1,989 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -OpenShift | Jenkins Operator - - - - - - - - - - - - - - - - - - - - - - - - - - - - OpenShift | Jenkins Operator - - -
- - - -
-
-
-
-
- - - - - -
- - - - -
- - - - -
- -
- - - -
-

OpenShift

-
Additional configuration for OpenShift
- - -

Release 0.6.0 is not compatible with OpenShift and JenkinsImage crd was removed from it.

- - - -
Last modified December 8, 2021 -
-
- - -
-
-
- - - - -
- - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/docs/getting-started/v0.6.x/schema/index.html b/docs/docs/getting-started/v0.6.x/schema/index.html deleted file mode 100644 index c83c449be..000000000 --- a/docs/docs/getting-started/v0.6.x/schema/index.html +++ /dev/null @@ -1,3617 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Schema | Jenkins Operator - - - - - - - - - - - - - - - - - - - - - - - - - - - - Schema | Jenkins Operator - - -
- - - -
-
-
-
-
- - - - - -
- - - - -
- - - - -
-
- - - - - - - - - - - -
-
- - - -
-

Schema

-
API Schema definitions for Jenkins CRD
- - -
-

This document contains API scheme for jenkins-operator Custom Resource Definition manifest

- -
- - -

Packages:

- -

jenkins.io

-

-

Package v1alpha2 contains API Schema definitions for the jenkins.io v1alpha2 API group

-

-Resource Types: - -

Jenkins -

-

-

Jenkins is the Schema for the jenkins API

-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldDescription
-apiVersion
-string
- -jenkins.io/v1alpha2 - -
-kind
-string -
Jenkins
-metadata
- - -Kubernetes meta/v1.ObjectMeta - - -
-Refer to the Kubernetes API documentation for the fields of the -metadata field. -
-spec
- - -JenkinsSpec - - -
-

Spec defines the desired state of the Jenkins

-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-master
- - -JenkinsMaster - - -
-

Master represents Jenkins master pod properties and Jenkins plugins. -Every single change here requires a pod restart.

-
-seedJobs
- - -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.SeedJob - - -
-(Optional) -

SeedJobs defines list of Jenkins Seed Job configurations -More info: https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configuration#configure-seed-jobs-and-pipelines

-
-notifications
- - -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Notification - - -
-(Optional) -

Notifications defines list of a services which are used to inform about Jenkins status -Can be used to integrate chat services like Slack, Microsoft Teams or Mailgun

-
-service
- - -Service - - -
-(Optional) -

Service is Kubernetes service of Jenkins master HTTP pod -Defaults to : -port: 8080 -type: ClusterIP

-
-slaveService
- - -Service - - -
-(Optional) -

Service is Kubernetes service of Jenkins slave pods -Defaults to : -port: 50000 -type: ClusterIP

-
-backup
- - -Backup - - -
-(Optional) -

Backup defines configuration of Jenkins backup -More info: https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configure-backup-and-restore/

-
-restore
- - -Restore - - -
-(Optional) -

Backup defines configuration of Jenkins backup restore -More info: https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configure-backup-and-restore/

-
-groovyScripts
- - -GroovyScripts - - -
-(Optional) -

GroovyScripts defines configuration of Jenkins customization via groovy scripts

-
-configurationAsCode
- - -ConfigurationAsCode - - -
-(Optional) -

ConfigurationAsCode defines configuration of Jenkins customization via Configuration as Code Jenkins plugin

-
-roles
- - -[]Kubernetes rbac/v1.RoleRef - - -
-(Optional) -

Roles defines list of extra RBAC roles for the Jenkins Master pod service account

-
-serviceAccount
- - -ServiceAccount - - -
-(Optional) -

ServiceAccount defines Jenkins master service account attributes

-
-jenkinsAPISettings
- - -JenkinsAPISettings - - -
-

JenkinsAPISettings defines configuration used by the operator to gain admin access to the Jenkins API

-
-
-status
- - -JenkinsStatus - - -
-

Status defines the observed state of Jenkins

-
-

AppliedGroovyScript -

-

-(Appears on: -JenkinsStatus) -

-

-

AppliedGroovyScript is the applied groovy script in Jenkins by the operator.

-

- - - - - - - - - - - - - - - - - - - - - - - - - -
FieldDescription
-configurationType
- -string - -
-

ConfigurationType is the name of the configuration type(base-groovy, user-groovy, user-casc)

-
-source
- -string - -
-

Source is the name of source where is located groovy script

-
-name
- -string - -
-

Name is the name of the groovy script

-
-hash
- -string - -
-

Hash is the hash of the groovy script and secrets which it uses

-
-

AuthorizationStrategy -(string alias)

-

-(Appears on: -JenkinsAPISettings) -

-

-

AuthorizationStrategy defines authorization strategy of the operator for the Jenkins API

-

-

Backup -

-

-(Appears on: -JenkinsSpec) -

-

-

Backup defines configuration of Jenkins backup.

-

- - - - - - - - - - - - - - - - - - - - - - - - - -
FieldDescription
-containerName
- -string - -
-

ContainerName is the container name responsible for backup operation

-
-action
- - -Handler - - -
-

Action defines action which performs backup in backup container sidecar

-
-interval
- -uint64 - -
-

Interval tells how often make backup in seconds -Defaults to 30.

-
-makeBackupBeforePodDeletion
- -bool - -
-

MakeBackupBeforePodDeletion tells operator to make backup before Jenkins master pod deletion

-
-

ConfigMapRef -

-

-(Appears on: -Customization) -

-

-

ConfigMapRef is reference to Kubernetes ConfigMap.

-

- - - - - - - - - - - - - -
FieldDescription
-name
- -string - -
-
-

ConfigurationAsCode -

-

-(Appears on: -JenkinsSpec) -

-

-

ConfigurationAsCode defines configuration of Jenkins customization via Configuration as Code Jenkins plugin.

-

- - - - - - - - - - - - - -
FieldDescription
-Customization
- - -Customization - - -
-

-(Members of Customization are embedded into this type.) -

-
-

Container -

-

-(Appears on: -JenkinsMaster) -

-

-

Container defines Kubernetes container attributes.

-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldDescription
-name
- -string - -
-

Name of the container specified as a DNS_LABEL. -Each container in a pod must have a unique name (DNS_LABEL).

-
-image
- -string - -
-

Docker image name. -More info: https://kubernetes.io/docs/concepts/containers/images

-
-imagePullPolicy
- - -Kubernetes core/v1.PullPolicy - - -
-

Image pull policy. -One of Always, Never, IfNotPresent. -Defaults to Always.

-
-resources
- - -Kubernetes core/v1.ResourceRequirements - - -
-

Compute Resources required by this container. -More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/

-
-command
- -[]string - -
-(Optional) -

Entrypoint array. Not executed within a shell. -The docker image’s ENTRYPOINT is used if this is not provided. -Variable references $(VAR_NAME) are expanded using the container’s environment. If a variable -cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax -can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, -regardless of whether the variable exists or not. -More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell

-
-args
- -[]string - -
-(Optional) -

Arguments to the entrypoint. -The docker image’s CMD is used if this is not provided. -Variable references $(VAR_NAME) are expanded using the container’s environment. If a variable -cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax -can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, -regardless of whether the variable exists or not. -More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell

-
-workingDir
- -string - -
-(Optional) -

Container’s working directory. -If not specified, the container runtime’s default will be used, which -might be configured in the container image.

-
-ports
- - -[]Kubernetes core/v1.ContainerPort - - -
-(Optional) -

List of ports to expose from the container. Exposing a port here gives -the system additional information about the network connections a -container uses, but is primarily informational. Not specifying a port here -DOES NOT prevent that port from being exposed. Any port which is -listening on the default “0.0.0.0” address inside a container will be -accessible from the network.

-
-envFrom
- - -[]Kubernetes core/v1.EnvFromSource - - -
-(Optional) -

List of sources to populate environment variables in the container. -The keys defined within a source must be a C_IDENTIFIER. All invalid keys -will be reported as an event when the container is starting. When a key exists in multiple -sources, the value associated with the last source will take precedence. -Values defined by an Env with a duplicate key will take precedence.

-
-env
- - -[]Kubernetes core/v1.EnvVar - - -
-(Optional) -

List of environment variables to set in the container.

-
-volumeMounts
- - -[]Kubernetes core/v1.VolumeMount - - -
-(Optional) -

-Pod volumes to mount into the container’s filesystem. More info: - -https://jenkinsci.github.io/kubernetes-operator/docs/installation/#note-on-restricted-jenkins-controller-pod-volumemounts - -

-
-livenessProbe
- - -Kubernetes core/v1.Probe - - -
-(Optional) -

Periodic probe of container liveness. -Container will be restarted if the probe fails.

-
-readinessProbe
- - -Kubernetes core/v1.Probe - - -
-(Optional) -

Periodic probe of container service readiness. -Container will be removed from service endpoints if the probe fails.

-
-lifecycle
- - -Kubernetes core/v1.Lifecycle - - -
-(Optional) -

Actions that the management system should take in response to container lifecycle events.

-
-securityContext
- - -Kubernetes core/v1.SecurityContext - - -
-(Optional) -

Security options the pod should run with. -More info: https://kubernetes.io/docs/concepts/policy/security-context/ -More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/

-
-

Customization -

-

-(Appears on: -ConfigurationAsCode, -GroovyScripts) -

-

-

Customization defines configuration of Jenkins customization.

-

- - - - - - - - - - - - - - - - - -
FieldDescription
-secret
- - -SecretRef - - -
-
-configurations
- - -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.ConfigMapRef - - -
-
-

GroovyScripts -

-

-(Appears on: -JenkinsSpec) -

-

-

GroovyScripts defines configuration of Jenkins customization via groovy scripts.

-

- - - - - - - - - - - - - -
FieldDescription
-Customization
- - -Customization - - -
-

-(Members of Customization are embedded into this type.) -

-
-

Handler -

-

-(Appears on: -Backup, -Restore) -

-

-

Handler defines a specific action that should be taken.

-

- - - - - - - - - - - - - -
FieldDescription
-exec
- - -Kubernetes core/v1.ExecAction - - -
-

Exec specifies the action to take.

-
-

Image -

-

-(Appears on: -JenkinsImageSpec) -

-

-

Defines Jenkins Plugin structure

-

- - - - - - - - - - - - - - - - - -
FieldDescription
-name
- -string - -
-
-version
- -string - -
-
-

JenkinsAPISettings -

-

-(Appears on: -JenkinsSpec) -

-

-

JenkinsAPISettings defines configuration used by the operator to gain admin access to the Jenkins API

-

- - - - - - - - - - - - - -
FieldDescription
-authorizationStrategy
- - -AuthorizationStrategy - - -
-
-

JenkinsCredentialType -(string alias)

-

-(Appears on: -SeedJob) -

-

-

JenkinsCredentialType defines type of Jenkins credential used to seed job mechanism.

-

-

JenkinsImage -

-

-

JenkinsImage is the Schema for the jenkinsimages API

-

- - - - - - - - - - - - - - - - - - - - - -
FieldDescription
-metadata
- - -Kubernetes meta/v1.ObjectMeta - - -
-Refer to the Kubernetes API documentation for the fields of the -metadata field. -
-spec
- - -JenkinsImageSpec - - -
-
-
- - - - - - - - - -
-image
- - -Image - - -
-
-plugins
- - -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsPlugin - - -
-
-
-status
- - -JenkinsImageStatus - - -
-
-

JenkinsImageSpec -

-

-(Appears on: -JenkinsImage) -

-

-

JenkinsImageSpec defines the desired state of JenkinsImage

-

- - - - - - - - - - - - - - - - - -
FieldDescription
-image
- - -Image - - -
-
-plugins
- - -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsPlugin - - -
-
-

JenkinsImageStatus -

-

-(Appears on: -JenkinsImage) -

-

-

JenkinsImageStatus defines the observed state of JenkinsImage

-

- - - - - - - - - - - - - - - - - - - - - -
FieldDescription
-image
- -string - -
-
-md5sum
- -string - -
-
-installedPlugins
- - -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.JenkinsPlugin - - -
-
-

JenkinsMaster -

-

-(Appears on: -JenkinsSpec) -

-

-

JenkinsMaster defines the Jenkins master pod attributes and plugins, -every single change requires a Jenkins master pod restart.

-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldDescription
-annotations
- -map[string]string - -
-(Optional) -

Annotations is an unstructured key value map stored with a resource that may be -set by external tools to store and retrieve arbitrary metadata. They are not -queryable and should be preserved when modifying objects. -More info: http://kubernetes.io/docs/user-guide/annotations

-
-masterAnnotations
- -map[string]string - -
-(Optional) -

Annotations is an unstructured key value map stored with a resource that may be -set by external tools to store and retrieve arbitrary metadata. They are not -queryable and should be preserved when modifying objects. -More info: http://kubernetes.io/docs/user-guide/annotations -Deprecated: will be removed in the future, please use Annotations(annotations)

-
-labels
- -map[string]string - -
-(Optional) -

Map of string keys and values that can be used to organize and categorize -(scope and select) objects. May match selectors of replication controllers -and services. -More info: http://kubernetes.io/docs/user-guide/labels

-
-nodeSelector
- -map[string]string - -
-(Optional) -

NodeSelector is a selector which must be true for the pod to fit on a node. -Selector which must match a node’s labels for the pod to be scheduled on that node. -More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/

-
-securityContext
- - -Kubernetes core/v1.PodSecurityContext - - -
-(Optional) -

SecurityContext that applies to all the containers of the Jenkins -Master. As per kubernetes specification, it can be overridden -for each container individually. -Defaults to: -runAsUser: 1000 -fsGroup: 1000

-
-containers
- - -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Container - - -
-(Optional) -

List of containers belonging to the pod. -Containers cannot currently be added or removed. -There must be at least one container in a Pod. -Defaults to: -- image: jenkins/jenkins:lts -imagePullPolicy: Always -livenessProbe: -failureThreshold: 12 -httpGet: -path: /login -port: http -scheme: HTTP -initialDelaySeconds: 80 -periodSeconds: 10 -successThreshold: 1 -timeoutSeconds: 5 -name: jenkins-master -readinessProbe: -failureThreshold: 3 -httpGet: -path: /login -port: http -scheme: HTTP -initialDelaySeconds: 30 -periodSeconds: 10 -successThreshold: 1 -timeoutSeconds: 1 -resources: -limits: -cpu: 1500m -memory: 3Gi -requests: -cpu: “1” -memory: 600Mi

-
-imagePullSecrets
- - -[]Kubernetes core/v1.LocalObjectReference - - -
-(Optional) -

ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. -If specified, these secrets will be passed to individual puller implementations for them to use. For example, -in the case of docker, only DockerConfig type secrets are honored. -More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod

-
-volumes
- - -[]Kubernetes core/v1.Volume - - -
-(Optional) -

List of volumes that can be mounted by containers belonging to the pod. -More info: https://kubernetes.io/docs/concepts/storage/volumes

-
-tolerations
- - -[]Kubernetes core/v1.Toleration - - -
-(Optional) -

If specified, the pod’s tolerations.

-
-basePlugins
- - -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Plugin - - -
-(Optional) -

BasePlugins contains plugins required by operator -Defaults to : -- name: kubernetes -version: “1.28.6” -- name: workflow-job -version: “2.40” -- name: workflow-aggregator -version: “2.6” -- name: git -version: “4.5.0” -- name: job-dsl -version: “1.77” -- name: configuration-as-code -version: “1.46” -- name: kubernetes-credentials-provider -version: “0.15”

-
-plugins
- - -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Plugin - - -
-(Optional) -

Plugins contains plugins required by user

-
-disableCSRFProtection
- -bool - -
-

DisableCSRFProtection allows you to toggle CSRF Protection on Jenkins

-
-priorityClassName
- -string - -
-(Optional) -

PriorityClassName for Jenkins master pod

-
-

JenkinsPlugin -

-

-(Appears on: -JenkinsImageSpec, -JenkinsImageStatus) -

-

-

Defines Jenkins Plugin structure

-

- - - - - - - - - - - - - - - - - -
FieldDescription
-name
- -string - -
-
-version
- -string - -
-
-

JenkinsSpec -

-

-(Appears on: -Jenkins) -

-

-

JenkinsSpec defines the desired state of the Jenkins.

-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldDescription
-master
- - -JenkinsMaster - - -
-

Master represents Jenkins master pod properties and Jenkins plugins. -Every single change here requires a pod restart.

-
-seedJobs
- - -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.SeedJob - - -
-(Optional) -

SeedJobs defines list of Jenkins Seed Job configurations -More info: https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configuration#configure-seed-jobs-and-pipelines

-
-notifications
- - -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Notification - - -
-(Optional) -

Notifications defines list of a services which are used to inform about Jenkins status -Can be used to integrate chat services like Slack, Microsoft Teams or Mailgun

-
-service
- - -Service - - -
-(Optional) -

Service is Kubernetes service of Jenkins master HTTP pod -Defaults to : -port: 8080 -type: ClusterIP

-
-slaveService
- - -Service - - -
-(Optional) -

Service is Kubernetes service of Jenkins slave pods -Defaults to : -port: 50000 -type: ClusterIP

-
-backup
- - -Backup - - -
-(Optional) -

Backup defines configuration of Jenkins backup -More info: https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configure-backup-and-restore/

-
-restore
- - -Restore - - -
-(Optional) -

Backup defines configuration of Jenkins backup restore -More info: https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configure-backup-and-restore/

-
-groovyScripts
- - -GroovyScripts - - -
-(Optional) -

GroovyScripts defines configuration of Jenkins customization via groovy scripts

-
-configurationAsCode
- - -ConfigurationAsCode - - -
-(Optional) -

ConfigurationAsCode defines configuration of Jenkins customization via Configuration as Code Jenkins plugin

-
-roles
- - -[]Kubernetes rbac/v1.RoleRef - - -
-(Optional) -

Roles defines list of extra RBAC roles for the Jenkins Master pod service account

-
-serviceAccount
- - -ServiceAccount - - -
-(Optional) -

ServiceAccount defines Jenkins master service account attributes

-
-jenkinsAPISettings
- - -JenkinsAPISettings - - -
-

JenkinsAPISettings defines configuration used by the operator to gain admin access to the Jenkins API

-
-

JenkinsStatus -

-

-(Appears on: -Jenkins) -

-

-

JenkinsStatus defines the observed state of Jenkins

-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldDescription
-operatorVersion
- -string - -
-(Optional) -

OperatorVersion is the operator version which manages this CR

-
-provisionStartTime
- - -Kubernetes meta/v1.Time - - -
-(Optional) -

ProvisionStartTime is a time when Jenkins master pod has been created

-
-baseConfigurationCompletedTime
- - -Kubernetes meta/v1.Time - - -
-(Optional) -

BaseConfigurationCompletedTime is a time when Jenkins base configuration phase has been completed

-
-userConfigurationCompletedTime
- - -Kubernetes meta/v1.Time - - -
-(Optional) -

UserConfigurationCompletedTime is a time when Jenkins user configuration phase has been completed

-
-restoredBackup
- -uint64 - -
-(Optional) -

RestoredBackup is the restored backup number after Jenkins master pod restart

-
-lastBackup
- -uint64 - -
-(Optional) -

LastBackup is the latest backup number

-
-pendingBackup
- -uint64 - -
-(Optional) -

PendingBackup is the pending backup number

-
-backupDoneBeforePodDeletion
- -bool - -
-(Optional) -

BackupDoneBeforePodDeletion tells if backup before pod deletion has been made

-
-userAndPasswordHash
- -string - -
-(Optional) -

UserAndPasswordHash is a SHA256 hash made from user and password

-
-createdSeedJobs
- -[]string - -
-(Optional) -

CreatedSeedJobs contains list of seed job id already created in Jenkins

-
-appliedGroovyScripts
- - -[][]github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.AppliedGroovyScript - - -
-(Optional) -

AppliedGroovyScripts is a list with all applied groovy scripts in Jenkins by the operator

-
-

Mailgun -

-

-(Appears on: -Notification) -

-

-

Mailgun is handler for Mailgun email service notification channel.

-

- - - - - - - - - - - - - - - - - - - - - - - - - -
FieldDescription
-domain
- -string - -
-
-apiKeySecretKeySelector
- - -SecretKeySelector - - -
-
-recipient
- -string - -
-
-from
- -string - -
-
-

MicrosoftTeams -

-

-(Appears on: -Notification) -

-

-

MicrosoftTeams is handler for Microsoft MicrosoftTeams notification channel.

-

- - - - - - - - - - - - - -
FieldDescription
-webHookURLSecretKeySelector
- - -SecretKeySelector - - -
-

The web hook URL to MicrosoftTeams App

-
-

Notification -

-

-(Appears on: -JenkinsSpec) -

-

-

Notification is a service configuration used to send notifications about Jenkins status.

-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldDescription
-level
- - -NotificationLevel - - -
-
-verbose
- -bool - -
-
-name
- -string - -
-
-slack
- - -github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Slack - - -
-
-teams
- - -github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.MicrosoftTeams - - -
-
-mailgun
- - -github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Mailgun - - -
-
-smtp
- - -github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.SMTP - - -
-
-

NotificationLevel -(string alias)

-

-(Appears on: -Notification) -

-

-

NotificationLevel defines the level of a Notification.

-

-

Plugin -

-

-(Appears on: -JenkinsMaster) -

-

-

Plugin defines Jenkins plugin.

-

- - - - - - - - - - - - - - - - - - - - - -
FieldDescription
-name
- -string - -
-

Name is the name of Jenkins plugin

-
-version
- -string - -
-

Version is the version of Jenkins plugin

-
-downloadURL
- -string - -
-

DownloadURL is the custom url from where plugin has to be downloaded.

-
-

Restore -

-

-(Appears on: -JenkinsSpec) -

-

-

Restore defines configuration of Jenkins backup restore operation.

-

- - - - - - - - - - - - - - - - - - - - - - - - - -
FieldDescription
-containerName
- -string - -
-

ContainerName is the container name responsible for restore backup operation

-
-action
- - -Handler - - -
-

Action defines action which performs restore backup in restore container sidecar

-
-getLatestAction
- - -Handler - - -
-(Optional) -

GetLatestAction defines action which returns the latest backup number. If there is no backup “-1” should be -returned.

-
-recoveryOnce
- -uint64 - -
-(Optional) -

RecoveryOnce if want to restore specific backup set this field and then Jenkins will be restarted and desired backup will be restored

-
-

SMTP -

-

-(Appears on: -Notification) -

-

-

SMTP is handler for sending emails via this protocol.

-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldDescription
-usernameSecretKeySelector
- - -SecretKeySelector - - -
-
-passwordSecretKeySelector
- - -SecretKeySelector - - -
-
-port
- -int - -
-
-server
- -string - -
-
-tlsInsecureSkipVerify
- -bool - -
-
-from
- -string - -
-
-to
- -string - -
-
-

SecretKeySelector -

-

-(Appears on: -Mailgun, -MicrosoftTeams, -SMTP, -Slack) -

-

-

SecretKeySelector selects a key of a Secret.

-

- - - - - - - - - - - - - - - - - -
FieldDescription
-secret
- - -Kubernetes core/v1.LocalObjectReference - - -
-

The name of the secret in the pod’s namespace to select from.

-
-key
- -string - -
-

The key of the secret to select from. Must be a valid secret key.

-
-

SecretRef -

-

-(Appears on: -Customization) -

-

-

SecretRef is reference to Kubernetes secret.

-

- - - - - - - - - - - - - -
FieldDescription
-name
- -string - -
-
-

SeedJob -

-

-(Appears on: -JenkinsSpec) -

-

-

SeedJob defines configuration for seed job -More info: https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configuration/#configure-seed-jobs-and-pipelines.

-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldDescription
-id
- -string - -
-

ID is the unique seed job name

-
-credentialID
- -string - -
-

CredentialID is the Kubernetes secret name which stores repository access credentials

-
-description
- -string - -
-(Optional) -

Description is the description of the seed job

-
-targets
- -string - -
-

Targets is the repository path where are seed job definitions

-
-repositoryBranch
- -string - -
-

RepositoryBranch is the repository branch where are seed job definitions

-
-repositoryUrl
- -string - -
-

RepositoryURL is the repository access URL. Can be SSH or HTTPS.

-
-credentialType
- - -JenkinsCredentialType - - -
-(Optional) -

JenkinsCredentialType is the https://jenkinsci.github.io/kubernetes-credentials-provider-plugin/ credential type

-
-bitbucketPushTrigger
- -bool - -
-(Optional) -

BitbucketPushTrigger is used for Bitbucket web hooks

-
-githubPushTrigger
- -bool - -
-(Optional) -

GitHubPushTrigger is used for GitHub web hooks

-
-buildPeriodically
- -string - -
-(Optional) -

BuildPeriodically is setting for scheduled trigger

-
-pollSCM
- -string - -
-(Optional) -

PollSCM is setting for polling changes in SCM

-
-ignoreMissingFiles
- -bool - -
-(Optional) -

IgnoreMissingFiles is setting for Job DSL API plugin to ignore files that miss

-
-additionalClasspath
- -string - -
-(Optional) -

AdditionalClasspath is setting for Job DSL API plugin to set Additional Classpath

-
-failOnMissingPlugin
- -bool - -
-(Optional) -

FailOnMissingPlugin is setting for Job DSL API plugin that fails job if required plugin is missing

-
-unstableOnDeprecation
- -bool - -
-(Optional) -

UnstableOnDeprecation is setting for Job DSL API plugin that sets build status as unstable if build using deprecated features

-
-

Service -

-

-(Appears on: -JenkinsSpec) -

-

-

Service defines Kubernetes service attributes

-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldDescription
-annotations
- -map[string]string - -
-(Optional) -

Annotations is an unstructured key value map stored with a resource that may be -set by external tools to store and retrieve arbitrary metadata. They are not -queryable and should be preserved when modifying objects. -More info: http://kubernetes.io/docs/user-guide/annotations

-
-labels
- -map[string]string - -
-(Optional) -

Route service traffic to pods with label keys and values matching this -selector. If empty or not present, the service is assumed to have an -external process managing its endpoints, which Kubernetes will not -modify. Only applies to types ClusterIP, NodePort, and LoadBalancer. -Ignored if type is ExternalName. -More info: https://kubernetes.io/docs/concepts/services-networking/service/

-
-type
- - -Kubernetes core/v1.ServiceType - - -
-(Optional) -

Type determines how the Service is exposed. Defaults to ClusterIP. Valid -options are ExternalName, ClusterIP, NodePort, and LoadBalancer. -“ExternalName” maps to the specified externalName. -“ClusterIP” allocates a cluster-internal IP address for load-balancing to -endpoints. Endpoints are determined by the selector or if that is not -specified, by manual construction of an Endpoints object. If clusterIP is -“None”, no virtual IP is allocated and the endpoints are published as a -set of endpoints rather than a stable IP. -“NodePort” builds on ClusterIP and allocates a port on every node which -routes to the clusterIP. -“LoadBalancer” builds on NodePort and creates an -external load-balancer (if supported in the current cloud) which routes -to the clusterIP. -More info: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services—service-types

-
-port
- -int32 - -
-

The port that are exposed by this service. -More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies

-
-nodePort
- -int32 - -
-(Optional) -

The port on each node on which this service is exposed when type=NodePort or LoadBalancer. -Usually assigned by the system. If specified, it will be allocated to the service -if unused or else creation of the service will fail. -Default is to auto-allocate a port if the ServiceType of this Service requires one. -More info: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport

-
-loadBalancerSourceRanges
- -[]string - -
-(Optional) -

If specified and supported by the platform, this will restrict traffic through the cloud-provider -load-balancer will be restricted to the specified client IPs. This field will be ignored if the -cloud-provider does not support the feature.” -More info: https://kubernetes.io/docs/tasks/administer-cluster/securing-a-cluster/#restricting-cloud-metadata-api-access

-
-loadBalancerIP
- -string - -
-(Optional) -

Only applies to Service Type: LoadBalancer -LoadBalancer will get created with the IP specified in this field. -This feature depends on whether the underlying cloud-provider supports specifying -the loadBalancerIP when a load balancer is created. -This field will be ignored if the cloud-provider does not support the feature.

-
-

ServiceAccount -

-

-(Appears on: -JenkinsSpec) -

-

-

ServiceAccount defines Kubernetes service account attributes

-

- - - - - - - - - - - - - -
FieldDescription
-annotations
- -map[string]string - -
-(Optional) -

Annotations is an unstructured key value map stored with a resource that may be -set by external tools to store and retrieve arbitrary metadata. They are not -queryable and should be preserved when modifying objects. -More info: http://kubernetes.io/docs/user-guide/annotations

-
-

Slack -

-

-(Appears on: -Notification) -

-

-

Slack is handler for Slack notification channel.

-

- - - - - - - - - - - - - -
FieldDescription
-webHookURLSecretKeySelector
- - -SecretKeySelector - - -
-

The web hook URL to Slack App

-
-
-

-Generated with gen-crd-api-reference-docs -on git commit fe81e5a. -

- - - -
Last modified December 8, 2021 -
-
- - -
-
-
- - - - -
- - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/docs/getting-started/v0.6.x/separate-namespaces/index.html b/docs/docs/getting-started/v0.6.x/separate-namespaces/index.html deleted file mode 100644 index 4126a594e..000000000 --- a/docs/docs/getting-started/v0.6.x/separate-namespaces/index.html +++ /dev/null @@ -1,1529 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Separate namespaces for Jenkins and Operator | Jenkins Operator - - - - - - - - - - - - - - - - - - - - - - - - - - - - Separate namespaces for Jenkins and Operator | Jenkins Operator - - -
- - - -
-
-
-
-
- - - - - -
- - - - -
- - - - -
- -
- - - -
-

Separate namespaces for Jenkins and Operator

-
How to install Jenkins and Jenkins Operator in separate namespaces
- - -

Create namespaces

- -

You need to create two namespaces, for example we’ll call them jenkins for Jenkins and jenkins-operator for Jenkins Operator.

-
$ kubectl create ns jenkins-operator
-$ kubectl create ns jenkins
-

Create necessary resources in Jenkins Operator namespace

- -

Next, you need to install resources necessary for the Operator to work in the jenkins-operator namespace. To do that, -copy the manifest you see below to jenkins-operator-rbac.yamlfile.

-
---
-apiVersion: v1
-kind: ServiceAccount
-metadata:
-  name: jenkins-operator
----
-# permissions to do leader election.
-apiVersion: rbac.authorization.k8s.io/v1
-kind: Role
-metadata:
-  name: leader-election-role
-rules:
-- apiGroups:
-  - ""
-  - coordination.k8s.io
-  resources:
-  - configmaps
-  - leases
-  verbs:
-  - get
-  - list
-  - watch
-  - create
-  - update
-  - patch
-  - delete
-- apiGroups:
-  - ""
-  resources:
-  - events
-  verbs:
-  - create
-  - patch
----
-apiVersion: rbac.authorization.k8s.io/v1
-kind: RoleBinding
-metadata:
-  name: leader-election-rolebinding
-roleRef:
-  apiGroup: rbac.authorization.k8s.io
-  kind: Role
-  name: leader-election-role
-subjects:
-- kind: ServiceAccount
-  name: jenkins-operator
----
-apiVersion: rbac.authorization.k8s.io/v1
-kind: Role
-metadata:
-  name: jenkins-operator
-rules:
-- apiGroups:
-  - apps
-  resources:
-  - daemonsets
-  - deployments
-  - replicasets
-  - statefulsets
-  verbs:
-  - '*'
-- apiGroups:
-  - apps
-  - jenkins-operator
-  resources:
-  - deployments/finalizers
-  verbs:
-  - update
-- apiGroups:
-  - build.openshift.io
-  resources:
-  - buildconfigs
-  - builds
-  verbs:
-  - get
-  - list
-  - watch
-- apiGroups:
-  - ""
-  resources:
-  - configmaps
-  - secrets
-  - services
-  verbs:
-  - create
-  - get
-  - list
-  - update
-  - watch
-- apiGroups:
-  - ""
-  resources:
-  - events
-  verbs:
-  - create
-  - get
-  - list
-  - patch
-  - watch
-- apiGroups:
-  - ""
-  resources:
-  - persistentvolumeclaims
-  verbs:
-  - get
-  - list
-  - watch
-- apiGroups:
-  - ""
-  resources:
-  - pods
-  verbs:
-  - create
-  - delete
-  - get
-  - list
-  - patch
-  - update
-  - watch
-- apiGroups:
-  - ""
-  resources:
-  - pods
-  - pods/exec
-  verbs:
-  - '*'
-- apiGroups:
-  - ""
-  resources:
-  - pods/log
-  verbs:
-  - get
-  - list
-  - watch
-- apiGroups:
-  - ""
-  resources:
-  - pods/portforward
-  verbs:
-  - create
-- apiGroups:
-  - ""
-  resources:
-  - serviceaccounts
-  verbs:
-  - create
-  - get
-  - list
-  - update
-  - watch
-- apiGroups:
-  - image.openshift.io
-  resources:
-  - imagestreams
-  verbs:
-  - get
-  - list
-  - watch
-- apiGroups:
-  - jenkins.io
-  resources:
-  - '*'
-  verbs:
-  - '*'
-- apiGroups:
-  - jenkins.io
-  resources:
-  - jenkins
-  verbs:
-  - create
-  - delete
-  - get
-  - list
-  - patch
-  - update
-  - watch
-- apiGroups:
-  - jenkins.io
-  resources:
-  - jenkins/finalizers
-  verbs:
-  - update
-- apiGroups:
-  - jenkins.io
-  resources:
-  - jenkins/status
-  verbs:
-  - get
-  - patch
-  - update
-- apiGroups:
-  - rbac.authorization.k8s.io
-  resources:
-  - rolebindings
-  - roles
-  verbs:
-  - create
-  - get
-  - list
-  - update
-  - watch
-- apiGroups:
-  - route.openshift.io
-  resources:
-  - routes
-  verbs:
-  - create
-  - get
-  - list
-  - update
-  - watch
----
-apiVersion: rbac.authorization.k8s.io/v1
-kind: RoleBinding
-metadata:
-  name: jenkins-operator
-subjects:
-  - kind: ServiceAccount
-    name: jenkins-operator
-roleRef:
-  apiGroup: rbac.authorization.k8s.io
-  kind: Role
-  name: jenkins-operator
-

Now install the required resources in jenkins-operator namespace with:

-
kubectl apply -n jenkins-operator -f jenkins-operator-rbac.yaml
-

There’s only one thing left to install in jenkins-operator namespace, and that is the Operator itself. The manifest -below contains the Operator as defined in all-in-one manifest found in Installing the Operator -page, the only difference is that the one here sets WATCH_NAMESPACE to the jenkins namespace we created.

- -

Copy its content to jenkins-operator.yaml file.

-
apiVersion: apps/v1
-kind: Deployment
-metadata:
-  name: jenkins-operator
-  labels:
-    control-plane: controller-manager
-spec:
-  selector:
-    matchLabels:
-      control-plane: controller-manager
-  replicas: 1
-  template:
-    metadata:
-      labels:
-        control-plane: controller-manager
-    spec:
-      serviceAccountName: jenkins-operator
-      securityContext:
-        runAsUser: 65532
-      containers:
-        - command:
-            - /manager
-          args:
-            - --leader-elect
-          image: virtuslab/jenkins-operator:v0.6.0
-          name: jenkins-operator
-          imagePullPolicy: IfNotPresent
-          securityContext:
-            allowPrivilegeEscalation: false
-          livenessProbe:
-            httpGet:
-              path: /healthz
-              port: 8081
-            initialDelaySeconds: 15
-            periodSeconds: 20
-          readinessProbe:
-            httpGet:
-              path: /readyz
-              port: 8081
-            initialDelaySeconds: 5
-            periodSeconds: 10
-          resources:
-            limits:
-              cpu: 100m
-              memory: 30Mi
-            requests:
-              cpu: 100m
-              memory: 20Mi
-          env:
-            - name: WATCH_NAMESPACE
-              value: jenkins
-      terminationGracePeriodSeconds: 10
-

Install the Operator in jenkins-operator namespace with:

-
kubectl apply -n jenkins-operator -f jenkins-operator.yaml
-

You have installed the Operator in jenkins-operator namespace, watching for Jenkins in jenkins namespace. Now -there are two things left to do: creating necessary Role and RoleBinding for the Operator in jenkins namespace, and -deploying actual Jenkins instance there.

- -

Create necessary resources in Jenkins namespace

- -

Below you can find manifest with RBAC that needs to be created in jenkins namespace. Copy its content to jenkins-ns-rbac.yaml file.

-
apiVersion: rbac.authorization.k8s.io/v1
-kind: Role
-metadata:
-  name: jenkins-operator
-rules:
-  - apiGroups:
-      - apps
-    resources:
-      - daemonsets
-      - deployments
-      - replicasets
-      - statefulsets
-    verbs:
-      - '*'
-  - apiGroups:
-      - apps
-      - jenkins-operator
-    resources:
-      - deployments/finalizers
-    verbs:
-      - update
-  - apiGroups:
-      - build.openshift.io
-    resources:
-      - buildconfigs
-      - builds
-    verbs:
-      - get
-      - list
-      - watch
-  - apiGroups:
-      - ""
-    resources:
-      - configmaps
-      - secrets
-      - services
-    verbs:
-      - create
-      - get
-      - list
-      - update
-      - watch
-  - apiGroups:
-      - ""
-    resources:
-      - events
-    verbs:
-      - create
-      - get
-      - list
-      - patch
-      - watch
-  - apiGroups:
-      - ""
-    resources:
-      - persistentvolumeclaims
-    verbs:
-      - get
-      - list
-      - watch
-  - apiGroups:
-      - ""
-    resources:
-      - pods
-    verbs:
-      - create
-      - delete
-      - get
-      - list
-      - patch
-      - update
-      - watch
-  - apiGroups:
-      - ""
-    resources:
-      - pods
-      - pods/exec
-    verbs:
-      - '*'
-  - apiGroups:
-      - ""
-    resources:
-      - pods/log
-    verbs:
-      - get
-      - list
-      - watch
-  - apiGroups:
-      - ""
-    resources:
-      - pods/portforward
-    verbs:
-      - create
-  - apiGroups:
-      - ""
-    resources:
-      - serviceaccounts
-    verbs:
-      - create
-      - get
-      - list
-      - update
-      - watch
-  - apiGroups:
-      - image.openshift.io
-    resources:
-      - imagestreams
-    verbs:
-      - get
-      - list
-      - watch
-  - apiGroups:
-      - jenkins.io
-    resources:
-      - '*'
-    verbs:
-      - '*'
-  - apiGroups:
-      - jenkins.io
-    resources:
-      - jenkins
-    verbs:
-      - create
-      - delete
-      - get
-      - list
-      - patch
-      - update
-      - watch
-  - apiGroups:
-      - jenkins.io
-    resources:
-      - jenkins/finalizers
-    verbs:
-      - update
-  - apiGroups:
-      - jenkins.io
-    resources:
-      - jenkins/status
-    verbs:
-      - get
-      - patch
-      - update
-  - apiGroups:
-      - rbac.authorization.k8s.io
-    resources:
-      - rolebindings
-      - roles
-    verbs:
-      - create
-      - get
-      - list
-      - update
-      - watch
-  - apiGroups:
-      - route.openshift.io
-    resources:
-      - routes
-    verbs:
-      - create
-      - get
-      - list
-      - update
-      - watch
----
-apiVersion: rbac.authorization.k8s.io/v1
-kind: RoleBinding
-metadata:
-  name: jenkins-operator
-subjects:
-  - kind: ServiceAccount
-    name: jenkins-operator
-    namespace: jenkins-operator
-roleRef:
-  apiGroup: rbac.authorization.k8s.io
-  kind: Role
-  name: jenkins-operator
-

Now apply it with:

-
kubectl apply -n jenkins -f jenkins-ns-rbac.yaml
-

The last thing to do is to deploy Jenkins. Below you can find an example Jenkins resource manifest. -It’s the same as one used in Deploying Jenkins. -Copy it to jenkins-instance.yaml

-
apiVersion: jenkins.io/v1alpha2
-kind: Jenkins
-metadata:
-  name: example
-spec:
-  configurationAsCode:
-    configurations: []
-    secret:
-      name: ""
-  groovyScripts:
-    configurations: []
-    secret:
-      name: ""
-  jenkinsAPISettings:
-    authorizationStrategy: createUser
-  master:
-    disableCSRFProtection: false
-    containers:
-      - name: jenkins-master
-        image: jenkins/jenkins:2.277.4-lts-alpine
-        imagePullPolicy: Always
-        livenessProbe:
-          failureThreshold: 12
-          httpGet:
-            path: /login
-            port: http
-            scheme: HTTP
-          initialDelaySeconds: 100
-          periodSeconds: 10
-          successThreshold: 1
-          timeoutSeconds: 5
-        readinessProbe:
-          failureThreshold: 10
-          httpGet:
-            path: /login
-            port: http
-            scheme: HTTP
-          initialDelaySeconds: 80
-          periodSeconds: 10
-          successThreshold: 1
-          timeoutSeconds: 1
-        resources:
-          limits:
-            cpu: 1500m
-            memory: 3Gi
-          requests:
-            cpu: "1"
-            memory: 500Mi
-  seedJobs:
-    - id: jenkins-operator
-      targets: "cicd/jobs/*.jenkins"
-      description: "Jenkins Operator repository"
-      repositoryBranch: master
-      repositoryUrl: https://github.com/jenkinsci/kubernetes-operator.git
-

Now you can deploy it with:

-
kubectl apply -n jenkins -f jenkins-instance.yaml
-

With this, you have just set up Jenkins Operator and Jenkins in separate namespaces. Now the Operator will run in -its own namespace (jenkins-operator), watch for CRs in jenkins namespace, and deploy Jenkins there.

- - - -
Last modified December 8, 2021 -
-
- - -
-
-
- - - - -
- - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/docs/how-it-works/architecture-and-design/index.html b/docs/docs/how-it-works/architecture-and-design/index.html deleted file mode 100644 index bda9e2cdf..000000000 --- a/docs/docs/how-it-works/architecture-and-design/index.html +++ /dev/null @@ -1,1007 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Architecture and design | Jenkins Operator - - - - - - - - - - - - - - - - - - - - - - - - - - - - Architecture and design | Jenkins Operator - - -
- - - -
-
-
-
-
- - - - - -
- - - - -
- - - - -
-
- - - - - - - - - - - - - -
-
- - - -
-

Architecture and design

-
Jenkins Operator fundamentals
- - -

The Jenkins Operator design incorporates the following concepts:

- -
    -
  • watches any changes of manifests and maintain the desired state according to deployed custom resource manifest
  • -
  • implements the main reconciliation loop which consists of two smaller reconciliation loops - base and user
  • -
- -

reconcile

- -

Base reconciliation loop takes care of reconciling base Jenkins configuration, which consists of:

- -
    -
  • Ensure Manifests - monitors any changes in manifests
  • -
  • Ensure Jenkins Pod - creates and verifies the status of Jenkins master Pod
  • -
  • Ensure Jenkins Configuration - configures Jenkins instance including hardening, initial configuration for plugins, etc.
  • -
  • Ensure Jenkins API token - generates Jenkins API token and initialized Jenkins client
  • -
- -

User reconciliation loop takes care of reconciling user provided configuration, which consists of:

- -
    -
  • Ensure Restore Job - creates Restore job and ensures that restore has been successfully performed
  • -
  • Ensure Seed Jobs - creates Seed Jobs and ensures that all of them have been successfully executed
  • -
  • Ensure User Configuration - executed user provided configuration, like groovy scripts, configuration as code or plugins
  • -
  • Ensure Backup Job - creates a Backup job and ensures that backup has been successfully performed
  • -
- -

reconcile

- -

Operator State

- -

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.

- -

It helps to maintain or recover the desired state even after the operator or Jenkins restarts.

- -

Webhook

- -

It rejects/accepts admission requests based on potential security warnings in plugins present in the Jenkins Custom Resource.

- - - -
Last modified October 1, 2021 -
-
- - -
-
-
- - - - -
- - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/docs/how-it-works/index.html b/docs/docs/how-it-works/index.html deleted file mode 100644 index 9feee4261..000000000 --- a/docs/docs/how-it-works/index.html +++ /dev/null @@ -1,1150 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - -How it works | Jenkins Operator - - - - - - - - - - - - - - - - - - - - How it works | Jenkins Operator - - -
- - - -
-
-
-
-
- - - - - -
- - - - -
- - - - -
-
- - - - - - - - - - - -
-
- - - -
-

How it works

-
How Jenkins Operator works
- - -
-

This document describes a high level overview of how Jenkins Operator works.

- -
- - -
- - - - -
- - - - - - - - - - -
-
- Architecture and design -
-

Jenkins Operator fundamentals -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- Jenkins Docker Images -
-

Jenkins default image details -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - -
Last modified August 19, 2021 -
-
- -
-
-
- - - - -
- - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/docs/how-it-works/index.xml b/docs/docs/how-it-works/index.xml deleted file mode 100644 index 2e53930d0..000000000 --- a/docs/docs/how-it-works/index.xml +++ /dev/null @@ -1,94 +0,0 @@ - - - Jenkins Operator – How it works - https://jenkinsci.github.io/kubernetes-operator/docs/how-it-works/ - Recent Hugo news from gohugo.io - Hugo -- gohugo.io - Thu, 19 Aug 2021 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/img/hugo.png - GoHugo.io - https://jenkinsci.github.io/kubernetes-operator/docs/how-it-works/ - - - - - - - - - - - - Docs: Architecture and design - https://jenkinsci.github.io/kubernetes-operator/docs/how-it-works/architecture-and-design/ - Fri, 01 Oct 2021 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/how-it-works/architecture-and-design/ - - - - - -<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:</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 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> - -<h2 id="webhook">Webhook</h2> - -<p>It rejects/accepts admission requests based on potential security warnings in plugins present in the Jenkins Custom Resource.</p> - - - - - - Docs: Jenkins Docker Images - https://jenkinsci.github.io/kubernetes-operator/docs/how-it-works/jenkins-docker-images/ - Mon, 05 Aug 2019 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/how-it-works/jenkins-docker-images/ - - - - <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. However due to problems with plugins and images version compatibility we are using specific tags -in the exemplary Custom Resource, so you know a working configuration.</p> - -<p>If needed, the Docker image can be easily changed in custom resource manifest as long as it supports standard Jenkins file system structure.</p> - - - - - - \ No newline at end of file diff --git a/docs/docs/how-it-works/jenkins-docker-images/index.html b/docs/docs/how-it-works/jenkins-docker-images/index.html deleted file mode 100644 index bd4f8aebc..000000000 --- a/docs/docs/how-it-works/jenkins-docker-images/index.html +++ /dev/null @@ -1,970 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Jenkins Docker Images | Jenkins Operator - - - - - - - - - - - - - - - - - - - - - - - - - - - - Jenkins Docker Images | Jenkins Operator - - -
- - - -
-
-
-
-
- - - - - -
- - - - -
- - - - -
-
- - - - - - - - - - - -
-
- - - -
-

Jenkins Docker Images

-
Jenkins default image details
-

Jenkins Operator is fully compatible with jenkins:lts Docker image and does not introduce any hidden changes -to the upstream Jenkins. However due to problems with plugins and images version compatibility we are using specific tags -in the exemplary Custom Resource, so you know a working configuration.

- -

If needed, the Docker image can be easily changed in custom resource manifest as long as it supports standard Jenkins file system structure.

- - - -
Last modified August 5, 2019 -
-
- - -
-
-
- - - - -
- - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/docs/index.html b/docs/docs/index.html deleted file mode 100644 index e7d168e27..000000000 --- a/docs/docs/index.html +++ /dev/null @@ -1,1169 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - -Documentation | Jenkins Operator - - - - - - - - - - - - - - - - - - - - Documentation | Jenkins Operator - - -
- - - -
-
-
-
-
- - - - - -
- - - - -
- - - - -
-
- - - - - - - - - - - -
-
- - - -
-

Documentation

- - - -
-

This project was originally developed by VirtusLab and the following CONTRIBUTORS.

- -
- - -
- - - - -
- - - - - - - - - - - - -
-
- How it works -
-

How Jenkins Operator works -

-
- - - - - - - - - - - - - - - - - - - - - -
-
- Getting Started -
-

How to work with Jenkins Operator -

-
- - - - - - - - - - - - - - - -
-
- Security -
-

Jenkins security and hardening out of the box -

-
- - - - - - - - - - - - - - - - - - - -
-
- Troubleshooting -
-

Troubleshooting Jenkins Operator -

-
- - - - - -
-
- Developer Guide -
-

Jenkins Operator for developers -

-
- - - - - - - - - - - - - -
-
- FAQ -
-

Frequently Asked Questions about running Jenkins Operator -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - -
Last modified September 3, 2019 -
-
- -
-
-
- - - - -
- - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/docs/index.xml b/docs/docs/index.xml deleted file mode 100644 index 63ed40509..000000000 --- a/docs/docs/index.xml +++ /dev/null @@ -1,8820 +0,0 @@ - - - Jenkins Operator – Documentation - https://jenkinsci.github.io/kubernetes-operator/docs/ - Recent Hugo news from gohugo.io - Hugo -- gohugo.io - Tue, 03 Sep 2019 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/img/hugo.png - GoHugo.io - https://jenkinsci.github.io/kubernetes-operator/docs/ - - - - - - - - - - - - Docs: Installing the Operator - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/installing-the-operator/ - Sun, 08 Jan 2023 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/installing-the-operator/ - - - - - - - -<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> Docker Hub repository.</p> - -</div> - - -<h2 id="requirements">Requirements</h2> - -<p>To run <strong>Jenkins Operator</strong>, you will need:</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.</p> - -<h2 id="deploy-jenkins-operator-using-yaml-s">Deploy Jenkins Operator using YAML&rsquo;s</h2> - -<p>First, install Jenkins Custom Resource Definition:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl apply -f https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/config/crd/bases/jenkins.io_jenkins.yaml </code></pre></div> -<p>Then, install the Operator and other required resources:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl apply -f https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/deploy/all-in-one-v1alpha2.yaml</code></pre></div> -<p>Watch <strong>Jenkins Operator</strong> instance being created:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl get pods -w</code></pre></div> -<p>Now <strong>Jenkins Operator</strong> should be up and running in the <code>default</code> namespace. -For deploying Jenkins, refer to <a href="https://jenkinsci.github.io/kubernetes-operator/kubernetes-operator/docs/getting-started/latest/deploying-jenkins/">Deploy Jenkins section</a>.</p> - -<h2 id="deploy-jenkins-operator-using-helm-chart">Deploy Jenkins Operator using Helm Chart</h2> - -<p>Alternatively, you can also use Helm to install the Operator (and optionally, by default, Jenkins). It requires the Helm 3+ for deployment.</p> - -<p>Create a namespace for the operator:</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 namespace &lt;your-namespace&gt;</code></pre></div> -<p>To install, you need only to type these commands:</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">$ helm repo add jenkins https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/chart -$ helm install &lt;name&gt; jenkins/jenkins-operator -n &lt;your-namespace&gt;</code></pre></div> -<p>To add custom labels and annotations, you can use <code>values.yaml</code> file or pass them into <code>helm install</code> command, 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">$ helm install &lt;name&gt; jenkins/jenkins-operator -n &lt;your-namespace&gt; --set jenkins.labels.LabelKey<span style="color:#ce5c00;font-weight:bold">=</span>LabelValue,jenkins.annotations.AnnotationKey<span style="color:#ce5c00;font-weight:bold">=</span>AnnotationValue</code></pre></div> -<p>You can further customize Jenkins using <code>values.yaml</code>: -<h3 id="JenkinsConfiguration">Jenkins instance configuration -</h3></p> - -<table aria-colspan="4"> -<thead aria-colspan="4"> -<tr> -<th></th> -<th>Field</th> -<th>Default value</th> -<th>Description</th> -</tr> -</thead> -<tbody aria-colspan="4"> -<tr></tr> -<tr> -<td colspan="1"> -<code>jenkins</code> -</td> -<td colspan="3"> -<p>operator is section for configuring operator deployment</p> -<table> -<tr> -<td> -<code>enabled</code> -</td> -<td> -true -</td> -<td> -Enabled can enable or disable the Jenkins instance. -Set to false if you have configured CR already and/or you want to deploy an operator only. -</td> -</tr> -<tr> -<td> -<code>apiVersion</code> -</td> -<td>jenkins.io/v1alpha2</td> -<td> -Version of the CR manifest. The recommended and default value is <code>jenkins.io/v1alpha2</code>. -<a href="#github.io/kubernetes-operator/docs/getting-started/v0.1.x/migration-guide-v1alpha1-to-v1alpha2/">More info</a> -</td> -</tr> -<tr> -<td> -<code>name</code> -</td> -<td> -jenkins -</td> -<td> -Name of resource. The pod name will be <code>jenkins-&lt;name&gt;</code> (name will be set as suffix). -</td> -</tr> -<tr> -<td> -<code>namespace</code> -</td> -<td> -default -</td> -<td> -Namespace the resources will be deployed to. It's not recommended to use default namespace. -Create new namespace for jenkins (e.g. <code>kubectl create -n jenkins</code>) -</td> -</tr> -<tr> -<td> -<code>labels</code> -</td> -<td> -{} -</td> -<td> -Labels are injected into metadata labels field. -</td> -</tr> -<tr> -<td> -<code>annotations</code> -</td> -<td> -{} -</td> -<td> -Annotations are injected into metadata annotations field. -</td> -</tr> -<tr> -<td> -<code>image</code> -</td> -<td> -jenkins/jenkins:lts -</td> -<td> -Image is the name (and tag) of the Jenkins instance. -It's recommended to use LTS (tag: "lts") version. -</td> -</tr> -<tr> -<td> -<code>env</code> -</td> -<td> -[] -</td> -<td> -Env contains jenkins container environment variables. -</td> -</tr> -<tr> -<td> -<code>imagePullPolicy</code> -</td> -<td> -Always -</td> -<td> -Defines policy for pulling images -</td> -</tr> -<tr> -<td> -<code>priorityClassName</code> -</td> -<td> -"" -</td> -<td> -PriorityClassName indicates the importance of a Pod relative to other Pods. -<a href="https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/">More info</a> -</td> -</tr> -<tr> -<td> -<code>disableCSRFProtection</code> -</td> -<td> -false -</td> -<td> -disableCSRFProtection can enable or disable operator built-in CSRF protection. -Set it to true if you are using OpenShift Jenkins Plugin. -<a href="https://github.com/jenkinsci/kubernetes-operator/pull/193">More info</a> -</td> -</tr> -<tr> -<td> -<code>imagePullSecrets</code> -</td> -<td> -[] -</td> -<td> -Used if you want to pull images from private repository -<a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configuration/#pulling-docker-images-from-private-repositories">More info</a> -</td> -</tr> -<tr> -<td> -<code>notifications</code> -</td> -<td> -[] -</td> -<td> -Notifications is feature that notify user about Jenkins reconciliation status -<a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/notifications/">More info</a> -</td> -</tr> -<tr> -<td> -<code>basePlugins</code> -</td> -<td> -<pre> -- name: kubernetes - version: "1.25.2" -- name: workflow-job - version: "2.39" -- name: workflow-aggregator - version: "2.6" -- name: git - version: "4.2.2" -- name: job-dsl - version: "1.77" -- name: configuration-as-code - version: "1.38" -- name: kubernetes-credentials - -provider - version: "0.13" -</pre> -</td> -<td> -Plugins installed and required by the operator -shouldn't contain plugins defined by user -You can change their versions here -<a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/customization/#install-plugins">More info</a> -</td> -</tr> -<tr> -<td> -<code>plugins</code> -</td> -<td> -[] -</td> -<td> -Plugins required by the user. You can define plugins here. -<a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/customization/#install-plugins">More info</a> -Example: -<pre> -plugins: - - name: simple-theme-plugin - version: 0.5.1 -</pre> -</td> -</tr> -<tr> -<td> -<code>seedJobs</code> -</td> -<td> -[] -</td> -<td> -Placeholder for jenkins seed jobs -For seed job creation tutorial, check:<br /> <a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configuring-seed-jobs-and-pipelines/#prepare-job-definitions-and-pipelines">Prepare seed jobs</a> -<br /><a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configuring-seed-jobs-and-pipelines/#configure-seed-jobs">Configure seed jobs</a> -<br />Example: -<code> -<pre> -seedJobs: -- id: jenkins-operator - targets: "cicd/jobs/*.jenkins" - description: "Jenkins Operator repository" - repositoryBranch: master - repositoryUrl: - - https://github.com/jenkinsci/kubernetes-operator.git -</pre> -</code> -</td> -</tr> -<tr> -<td> -<code>resources</code> -</td> -<td> -<pre> -limits: - cpu: 1500m - memory: 3Gi -requests: - cpu: 1 - memory: 500M -</pre> -</td> -<td> -Resource limit/request for Jenkins -<a href="https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container">More info</a> -</td> -</tr> -<tr> -<td> -<code>volumes</code> -</td> -<td> -<pre> -- name: backup - persistentVolumeClaim: - claimName: jenkins-backup -</pre> -</td> -<td> -Volumes used by Jenkins -By default, we are only using PVC volume for storing backups. -</td> -</tr> -<tr> -<td> -<code>volumeMounts</code> -</td> -<td> -[] -</td> -<td> -volumeMounts are mounts for Jenkins pod. -</td> -</tr> -<tr> -<td> -<code>securityContext</code> -</td> -<td> -runAsUser: 1000 -fsGroup: 1000 -</td> -<td> -SecurityContext for pod. -</td> -</tr> -<tr> -<td><code>service</code></td> -<td>not implemented</td> -<td>Http Jenkins service. See https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/schema/#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Service for details.</td> -</tr> -<tr> -<td><code>slaveService</code></td> -<td>not implemented</td> -<td>Slave Jenkins service. See https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/schema/#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Service for details.</td> -</tr> -<tr> -<td> -<code>livenessProbe</code> -</td> -<td> -<pre> -livenessProbe: - failureThreshold: 12 - httpGet: - path: /login - port: http - scheme: HTTP - initialDelaySeconds: 80 - periodSeconds: 10 - successThreshold: 1 - timeoutSeconds: 5 -</pre> -</td> -<td> -livenessProbe for Pod -</td> -</tr> -<tr> -<td> -<code>readinessProbe</code> -</td> -<td> -<pre> -readinessProbe: - failureThreshold: 3 - httpGet: - path: /login - port: http - scheme: HTTP - initialDelaySeconds: 30 - periodSeconds: 10 - successThreshold: 1 - timeoutSeconds: 1 -</pre> -</td> -<td> -readinessProbe for Pod -</td> -</tr> -<tr> -<td> -<code> -backup -</code> -<p> -<em> -<a href="#Backup"> -Backup -</a> -</em> -</p> -</td> -<td> -</td> -<td> -Backup is section for configuring operator's backup feature -By default backup feature is enabled and pre-configured -This section simplifies the configuration described here: <a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configuring-backup-and-restore/">Configuring backup and restore</a> -For customization tips see <a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/custom-backup-and-restore">Custom backup and restore</a> -</td> -</tr> -<tr> -<td> -<code>configuration</code> -<p> -<em> -<a href="#Configuration"> -Configuration -</a> -</em> -</p> -</td> -<td></td> -<td> -Section where we can configure Jenkins instance. -See <a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/customizing-jenkins/">Customizing Jenkins</a> for details -</td> -</tr> -</table> -</td> -</tr> -</tbody> -</table> - -<h3 id="configuring-operator-deployment">Configuring operator deployment</h3> - -<table aria-colspan="4"> - <thead aria-colspan="4"> - <tr> - <th></th> - <th>Field</th> - <th>Default value</th> - <th>Description</th> - </tr> - </thead> - <tbody aria-colspan="4"> - <tr></tr> - <tr> - <td colspan="1"> - <code>operator</code> - </td> - <td colspan="3"> - <p>operator is section for configuring operator deployment</p> - <table> - <tr> - <td> - <code>replicaCount</code></br> - </td> - <td> - 1 - </td> - <td> - Number of Replicas. - </td> - </tr> - <tr> - <td> - <code>image</code> - </td> - <td> - virtuslab/jenkins-operator:v0.4.0 - </td> - <td> - Name (and tag) of the Jenkins Operator image. - </td> - </tr> - <tr> - <td> - <code>imagePullPolicy</code> - </td> - <td> - IfNotPresent - </td> - <td> - Defines policy for pulling images. - </td> - </tr> - <tr> - <td> - <code>imagePullSecrets</code> - </td> - <td> - [] - </td> - <td> - Used if you want to pull images from private repository. - </td> - </tr> - <tr> - <td> - <code>nameOverride</code> - </td> - <td> - "" - </td> - <td> - nameOverride overrides the app name. - </td> - </tr> - <tr> - <td> - <code>fullnameOverride</code> - </td> - <td> - "" - </td> - <td> - fullnameOverride overrides the deployment name - </td> - </tr> - <tr> - <td> - <code>resources</code> - </td> - <td> - {} - </td> - <td> - </td> - </tr> - <tr> - <td> - <code>nodeSelector</code> - </td> - <td> - {} - </td> - <td> - </td> - </tr> - <tr> - <td> - <code>tolerations</code> - </td> - <td> - {} - </td> - <td> - </td> - </tr> - <tr> - <td> - <code>affinity</code> - </td> - <td> - {} - </td> - <td> - </td> - </tr> - </table> - </td> - </tr> - </tbody> -</table> - -<p><h3 id="Backup">Backup -</h3> -<p> -(<em>Appears on:</em> -<a href="#JenkinsConfiguration">JenkinsConfiguration</a>) -</p> -<p> -Backup defines configuration of Jenkins backup. -</p></p> - -<table> -<thead> -<tr> -<th>Field</th> -<th>Default value</th> -<th>Description</th> -</tr> -</thead> - <tbody> - <tr> - <td> - <code>enabled</code> - </td> - <td> - true - </td> - <td> - Enabled is enable/disable switch for backup feature. - </td> - </tr> - <tr> - <td> - <code>image</code> - </td> - <td> - virtuslab/jenkins-operator-backup-pvc:v0.1.1 - </td> - <td> - Image used by backup feature. - </td> - </tr> - <tr> - <td> - <code>containerName</code> - </td> - <td> - backup - </td> - <td> - Backup container name. - </td> - </tr> - <tr> - <td> - <code>interval</code> - </td> - <td> - 30 - </td> - <td> - Defines how often make backup in seconds. - </td> - </tr> - <tr> - <td> - <code>makeBackupBeforePodDeletion</code> - </td> - <td> - true - </td> - <td> - When enabled will make backup before pod deletion. - </td> - </tr> - <tr> - <td> - <code>backupCommand</code> - </td> - <td> - /home/user/bin/backup.sh - </td> - <td> - Backup container command. - </td> - </tr> - <tr> - <td> - <code>restoreCommand</code> - </td> - <td> - /home/user/bin/restore.sh - </td> - <td> - Backup restore command. - </td> - </tr> - <tr> - <td> - <code>pvc</code> - </td> - <td colspan="2"> - <p>Persistent Volume Claim Kubernetes resource</p> - <br/> - <table colspan="2" style="width:100%"> - <tbody> - <tr> - <td> - <code>enabled</code> - </td> - <td> - true - </td> - <td> - Enable/disable switch for PVC - </td> - </tr> - <tr> - <td> - <code>enabled</code> - </td> - <td> - true - </td> - <td> - Enable/disable switch for PVC - </td> - </tr> - <tr> - <td> - <code>size</code> - </td> - <td> - 5Gi - </td> - <td> - Size of PVC - </td> - </tr> - <tr> - <td> - <code>className</code> - </td> - <td> - "" - </td> - <td> - StorageClassName for PVC - <a href="https://kubernetes.io/docs/concepts/storage/persistent-volumes/#class-1">More info</a> - </td> - </tr> - </tbody> - </table> - </td> - </tr> - <tr> - <td> - <code>env</code> - </td> - <td> -<pre> -- name: BACKUP_DIR - value: /backup -- name: JENKINS_HOME - value: /jenkins-home -- name: BACKUP_COUNT - value: "3" -</pre> - </td> - <td> - Contains container environment variables. - PVC backup provider handles these variables:<br /> - BACKUP_DIR - path for storing backup files (default: "/backup")<br /> - JENKINS_HOME - path to jenkins home (default: "/jenkins-home")<br /> - BACKUP_COUNT - define how much recent backups will be kept<br /> - </td> - </td> - </tr> - <tr> - <td> - <code>volumeMounts</code> - </td> - <td> -<pre> -- name: jenkins-home - mountPath: /jenkins-home -- mountPath: /backup - name: backup -</pre> - </td> - <td> - Holds the mount points for volumes. - </td> - </tr> - </tbody> -</table> - - -<p><h4 id="Configuration">Configuration - </h3> - <p> - (<em>Appears on:</em> - <a href="#JenkinsConfiguration">Jenkins instance configuration</a>) - </p></p> - -<p><table> - <thead> - <tr> - <th>Field</th> - <th>Default value</th> - <th>Description</th> - </tr> - </thead> - <tbody> - <tr> - <td> - <code>configurationAsCode</code> - </td> - <td> - {} - </td> - <td> - ConfigurationAsCode defines configuration of Jenkins customization via Configuration as Code Jenkins plugin. -Example:<br /> -<pre> -- configMapName: jenkins-casc - content: {} -</pre> - </td> - </tr> - <tr> - <td> - <code>groovyScripts</code> - </td> - <td> - {} - </td> - <td> - GroovyScripts defines configuration of Jenkins customization via groovy scripts. - Example:<br /> -<pre> -- configMapName: jenkins-gs - content: {} -</pre> - </td> - </tr> - <tr> - <td> - <code>secretRefName</code> - </td> - <td> - &ldquo;&rdquo; - </td> - <td> - secretRefName of existing secret (previously created). - </td> - </tr> - <tr> - <td> - <code>secretData</code> - </td> - <td> - {} - </td> - <td> - If secretRefName is empty, secretData creates new secret and fills with data provided in secretData. - </td> - </tr> - </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 <code>{git-hash}</code>, {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> - -<h2 id="validating-webhook">Validating Webhook</h2> - -<p>Validating webhook can be used in order to increase the Operator&rsquo;s capabilities to monitor security issues. It will look for security vulnerabilities in the base and requested plugins. It can be easily installed via Helm charts by setting webhook.enabled in values.yaml.</p> - -<p><strong>Note</strong>: The webhook takes some time to get up and running. It&rsquo;s recommended to first deploy the Operator and later Jenkins Custom Resource by using toggles in <code>values.yaml</code>. -For the installation with yaml manifests (without using Helm chart), first, install cert-manager:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl apply -f https://github.com/jetstack/cert-manager/releases/download/v1.5.1/cert-manager.yaml </code></pre></div> -<p>It takes some time to get cert-manager up and running. -Then, install the webhook and other required resources:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl apply -f https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/deploy/all-in-one-webhook.yaml</code></pre></div> -<p>Now, download the manifests for the operator and other resources from <a href="https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/deploy/all-in-one-v1alpha2.yaml">here</a> and provide these additional fields in the Operator manifest:</p> - -<pre> -<code> -apiVersion: apps/v1 -kind: Deployment -metadata: - name: jenkins-operator - labels: - control-plane: controller-manager -spec: - selector: - matchLabels: - control-plane: controller-manager - replicas: 1 - template: - metadata: - labels: - control-plane: controller-manager - spec: - serviceAccountName: jenkins-operator - securityContext: - runAsUser: 65532 - containers: - - command: - - /manager - args: - - --leader-elect - <b>- --validate-security-warnings</b> - image: virtuslab/jenkins-operator:v0.7.0 - name: jenkins-operator - imagePullPolicy: IfNotPresent - securityContext: - allowPrivilegeEscalation: false - livenessProbe: - httpGet: - path: /healthz - port: 8081 - initialDelaySeconds: 15 - periodSeconds: 20 - readinessProbe: - httpGet: - path: /readyz - port: 8081 - initialDelaySeconds: 5 - periodSeconds: 10 - resources: - limits: - cpu: 200m - memory: 100Mi - requests: - cpu: 100m - memory: 20Mi - env: - - name: WATCH_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - <b>volumeMounts: - - mountPath: /tmp/k8s-webhook-server/serving-certs - name: webhook-certs - readOnly: true - volumes: - - name: webhook-certs - secret: - defaultMode: 420 - secretName: jenkins-webhook-certificate - terminationGracePeriodSeconds: 10</b> -</code> -</pre> - -<p>To enable security validation in the Jenkins Custom Resource, set</p> - -<blockquote> -<p>jenkins.ValidateSecurityWarnings=true</p> -</blockquote> - - - - - - Docs: Installing the Operator - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.6.x/installing-the-operator/ - Wed, 08 Dec 2021 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.6.x/installing-the-operator/ - - - - - - - -<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> Docker Hub repository.</p> - -</div> - - -<h2 id="requirements">Requirements</h2> - -<p>To run <strong>Jenkins Operator</strong>, you will need:</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.</p> - -<h2 id="deploy-jenkins-operator-using-yaml-s">Deploy Jenkins Operator using YAML&rsquo;s</h2> - -<p>First, install Jenkins Custom Resource Definition:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl apply -f https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/config/crd/bases/jenkins.io_jenkins.yaml </code></pre></div> -<p>Then, install the Operator and other required resources:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl apply -f https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/deploy/all-in-one-v1alpha2.yaml</code></pre></div> -<p>Watch <strong>Jenkins Operator</strong> instance being created:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl get pods -w</code></pre></div> -<p>Now <strong>Jenkins Operator</strong> should be up and running in the <code>default</code> namespace. -For deploying Jenkins, refer to <a href="https://jenkinsci.github.io/kubernetes-operator/kubernetes-operator/docs/getting-started/latest/deploying-jenkins/">Deploy Jenkins section</a>.</p> - -<h2 id="deploy-jenkins-operator-using-helm-chart">Deploy Jenkins Operator using Helm Chart</h2> - -<p>Alternatively, you can also use Helm to install the Operator (and optionally, by default, Jenkins). It requires the Helm 3+ for deployment.</p> - -<p>Create a namespace for the operator:</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 namespace &lt;your-namespace&gt;</code></pre></div> -<p>To install, you need only to type these commands:</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">$ helm repo add jenkins https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/chart -$ helm install &lt;name&gt; jenkins/jenkins-operator -n &lt;your-namespace&gt;</code></pre></div> -<p>To add custom labels and annotations, you can use <code>values.yaml</code> file or pass them into <code>helm install</code> command, 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">$ helm install &lt;name&gt; jenkins/jenkins-operator -n &lt;your-namespace&gt; --set jenkins.labels.LabelKey<span style="color:#ce5c00;font-weight:bold">=</span>LabelValue,jenkins.annotations.AnnotationKey<span style="color:#ce5c00;font-weight:bold">=</span>AnnotationValue</code></pre></div> -<p>You can further customize Jenkins using <code>values.yaml</code>: -<h3 id="JenkinsConfiguration">Jenkins instance configuration -</h3></p> - -<table aria-colspan="4"> -<thead aria-colspan="4"> -<tr> -<th></th> -<th>Field</th> -<th>Default value</th> -<th>Description</th> -</tr> -</thead> -<tbody aria-colspan="4"> -<tr></tr> -<tr> -<td colspan="1"> -<code>jenkins</code> -</td> -<td colspan="3"> -<p>operator is section for configuring operator deployment</p> -<table> -<tr> -<td> -<code>enabled</code> -</td> -<td> -true -</td> -<td> -Enabled can enable or disable the Jenkins instance. -Set to false if you have configured CR already and/or you want to deploy an operator only. -</td> -</tr> -<tr> -<td> -<code>apiVersion</code> -</td> -<td>jenkins.io/v1alpha2</td> -<td> -Version of the CR manifest. The recommended and default value is <code>jenkins.io/v1alpha2</code>. -<a href="#github.io/kubernetes-operator/docs/getting-started/v0.1.x/migration-guide-v1alpha1-to-v1alpha2/">More info</a> -</td> -</tr> -<tr> -<td> -<code>name</code> -</td> -<td> -jenkins -</td> -<td> -Name of resource. The pod name will be <code>jenkins-&lt;name&gt;</code> (name will be set as suffix). -</td> -</tr> -<tr> -<td> -<code>namespace</code> -</td> -<td> -default -</td> -<td> -Namespace the resources will be deployed to. It's not recommended to use default namespace. -Create new namespace for jenkins (e.g. <code>kubectl create -n jenkins</code>) -</td> -</tr> -<tr> -<td> -<code>labels</code> -</td> -<td> -{} -</td> -<td> -Labels are injected into metadata labels field. -</td> -</tr> -<tr> -<td> -<code>annotations</code> -</td> -<td> -{} -</td> -<td> -Annotations are injected into metadata annotations field. -</td> -</tr> -<tr> -<td> -<code>image</code> -</td> -<td> -jenkins/jenkins:lts -</td> -<td> -Image is the name (and tag) of the Jenkins instance. -It's recommended to use LTS (tag: "lts") version. -</td> -</tr> -<tr> -<td> -<code>env</code> -</td> -<td> -[] -</td> -<td> -Env contains jenkins container environment variables. -</td> -</tr> -<tr> -<td> -<code>imagePullPolicy</code> -</td> -<td> -Always -</td> -<td> -Defines policy for pulling images -</td> -</tr> -<tr> -<td> -<code>priorityClassName</code> -</td> -<td> -"" -</td> -<td> -PriorityClassName indicates the importance of a Pod relative to other Pods. -<a href="https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/">More info</a> -</td> -</tr> -<tr> -<td> -<code>disableCSRFProtection</code> -</td> -<td> -false -</td> -<td> -disableCSRFProtection can enable or disable operator built-in CSRF protection. -Set it to true if you are using OpenShift Jenkins Plugin. -<a href="https://github.com/jenkinsci/kubernetes-operator/pull/193">More info</a> -</td> -</tr> -<tr> -<td> -<code>imagePullSecrets</code> -</td> -<td> -[] -</td> -<td> -Used if you want to pull images from private repository -<a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configuration/#pulling-docker-images-from-private-repositories">More info</a> -</td> -</tr> -<tr> -<td> -<code>notifications</code> -</td> -<td> -[] -</td> -<td> -Notifications is feature that notify user about Jenkins reconciliation status -<a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/notifications/">More info</a> -</td> -</tr> -<tr> -<td> -<code>basePlugins</code> -</td> -<td> -<pre> -- name: kubernetes - version: "1.25.2" -- name: workflow-job - version: "2.39" -- name: workflow-aggregator - version: "2.6" -- name: git - version: "4.2.2" -- name: job-dsl - version: "1.77" -- name: configuration-as-code - version: "1.38" -- name: kubernetes-credentials - -provider - version: "0.13" -</pre> -</td> -<td> -Plugins installed and required by the operator -shouldn't contain plugins defined by user -You can change their versions here -<a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/customization/#install-plugins">More info</a> -</td> -</tr> -<tr> -<td> -<code>plugins</code> -</td> -<td> -[] -</td> -<td> -Plugins required by the user. You can define plugins here. -<a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/customization/#install-plugins">More info</a> -Example: -<pre> -plugins: - - name: simple-theme-plugin - version: 0.5.1 -</pre> -</td> -</tr> -<tr> -<td> -<code>seedJobs</code> -</td> -<td> -[] -</td> -<td> -Placeholder for jenkins seed jobs -For seed job creation tutorial, check:<br /> <a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configuring-seed-jobs-and-pipelines/#prepare-job-definitions-and-pipelines">Prepare seed jobs</a> -<br /><a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configuring-seed-jobs-and-pipelines/#configure-seed-jobs">Configure seed jobs</a> -<br />Example: -<code> -<pre> -seedJobs: -- id: jenkins-operator - targets: "cicd/jobs/*.jenkins" - description: "Jenkins Operator repository" - repositoryBranch: master - repositoryUrl: - - https://github.com/jenkinsci/kubernetes-operator.git -</pre> -</code> -</td> -</tr> -<tr> -<td> -<code>resources</code> -</td> -<td> -<pre> -limits: - cpu: 1500m - memory: 3Gi -requests: - cpu: 1 - memory: 500M -</pre> -</td> -<td> -Resource limit/request for Jenkins -<a href="https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container">More info</a> -</td> -</tr> -<tr> -<td> -<code>volumes</code> -</td> -<td> -<pre> -- name: backup - persistentVolumeClaim: - claimName: jenkins-backup -</pre> -</td> -<td> -Volumes used by Jenkins -By default, we are only using PVC volume for storing backups. -</td> -</tr> -<tr> -<td> -<code>volumeMounts</code> -</td> -<td> -[] -</td> -<td> -volumeMounts are mounts for Jenkins pod. -</td> -</tr> -<tr> -<td> -<code>securityContext</code> -</td> -<td> -runAsUser: 1000 -fsGroup: 1000 -</td> -<td> -SecurityContext for pod. -</td> -</tr> -<tr> -<td><code>service</code></td> -<td>not implemented</td> -<td>Http Jenkins service. See https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/schema/#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Service for details.</td> -</tr> -<tr> -<td><code>slaveService</code></td> -<td>not implemented</td> -<td>Slave Jenkins service. See https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/schema/#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.Service for details.</td> -</tr> -<tr> -<td> -<code>livenessProbe</code> -</td> -<td> -<pre> -livenessProbe: - failureThreshold: 12 - httpGet: - path: /login - port: http - scheme: HTTP - initialDelaySeconds: 80 - periodSeconds: 10 - successThreshold: 1 - timeoutSeconds: 5 -</pre> -</td> -<td> -livenessProbe for Pod -</td> -</tr> -<tr> -<td> -<code>readinessProbe</code> -</td> -<td> -<pre> -readinessProbe: - failureThreshold: 3 - httpGet: - path: /login - port: http - scheme: HTTP - initialDelaySeconds: 30 - periodSeconds: 10 - successThreshold: 1 - timeoutSeconds: 1 -</pre> -</td> -<td> -readinessProbe for Pod -</td> -</tr> -<tr> -<td> -<code> -backup -</code> -<p> -<em> -<a href="#Backup"> -Backup -</a> -</em> -</p> -</td> -<td> -</td> -<td> -Backup is section for configuring operator's backup feature -By default backup feature is enabled and pre-configured -This section simplifies the configuration described here: <a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configuring-backup-and-restore/">Configuring backup and restore</a> -For customization tips see <a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/custom-backup-and-restore">Custom backup and restore</a> -</td> -</tr> -<tr> -<td> -<code>configuration</code> -<p> -<em> -<a href="#Configuration"> -Configuration -</a> -</em> -</p> -</td> -<td></td> -<td> -Section where we can configure Jenkins instance. -See <a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/customizing-jenkins/">Customizing Jenkins</a> for details -</td> -</tr> -</table> -</td> -</tr> -</tbody> -</table> - -<h3 id="configuring-operator-deployment">Configuring operator deployment</h3> - -<table aria-colspan="4"> - <thead aria-colspan="4"> - <tr> - <th></th> - <th>Field</th> - <th>Default value</th> - <th>Description</th> - </tr> - </thead> - <tbody aria-colspan="4"> - <tr></tr> - <tr> - <td colspan="1"> - <code>operator</code> - </td> - <td colspan="3"> - <p>operator is section for configuring operator deployment</p> - <table> - <tr> - <td> - <code>replicaCount</code></br> - </td> - <td> - 1 - </td> - <td> - Number of Replicas. - </td> - </tr> - <tr> - <td> - <code>image</code> - </td> - <td> - virtuslab/jenkins-operator:v0.4.0 - </td> - <td> - Name (and tag) of the Jenkins Operator image. - </td> - </tr> - <tr> - <td> - <code>imagePullPolicy</code> - </td> - <td> - IfNotPresent - </td> - <td> - Defines policy for pulling images. - </td> - </tr> - <tr> - <td> - <code>imagePullSecrets</code> - </td> - <td> - [] - </td> - <td> - Used if you want to pull images from private repository. - </td> - </tr> - <tr> - <td> - <code>nameOverride</code> - </td> - <td> - "" - </td> - <td> - nameOverride overrides the app name. - </td> - </tr> - <tr> - <td> - <code>fullnameOverride</code> - </td> - <td> - "" - </td> - <td> - fullnameOverride overrides the deployment name - </td> - </tr> - <tr> - <td> - <code>resources</code> - </td> - <td> - {} - </td> - <td> - </td> - </tr> - <tr> - <td> - <code>nodeSelector</code> - </td> - <td> - {} - </td> - <td> - </td> - </tr> - <tr> - <td> - <code>tolerations</code> - </td> - <td> - {} - </td> - <td> - </td> - </tr> - <tr> - <td> - <code>affinity</code> - </td> - <td> - {} - </td> - <td> - </td> - </tr> - </table> - </td> - </tr> - </tbody> -</table> - -<p><h3 id="Backup">Backup -</h3> -<p> -(<em>Appears on:</em> -<a href="#JenkinsConfiguration">JenkinsConfiguration</a>) -</p> -<p> -Backup defines configuration of Jenkins backup. -</p></p> - -<table> -<thead> -<tr> -<th>Field</th> -<th>Default value</th> -<th>Description</th> -</tr> -</thead> - <tbody> - <tr> - <td> - <code>enabled</code> - </td> - <td> - true - </td> - <td> - Enabled is enable/disable switch for backup feature. - </td> - </tr> - <tr> - <td> - <code>image</code> - </td> - <td> - virtuslab/jenkins-operator-backup-pvc:v0.0.8 - </td> - <td> - Image used by backup feature. - </td> - </tr> - <tr> - <td> - <code>containerName</code> - </td> - <td> - backup - </td> - <td> - Backup container name. - </td> - </tr> - <tr> - <td> - <code>interval</code> - </td> - <td> - 30 - </td> - <td> - Defines how often make backup in seconds. - </td> - </tr> - <tr> - <td> - <code>makeBackupBeforePodDeletion</code> - </td> - <td> - true - </td> - <td> - When enabled will make backup before pod deletion. - </td> - </tr> - <tr> - <td> - <code>backupCommand</code> - </td> - <td> - /home/user/bin/backup.sh - </td> - <td> - Backup container command. - </td> - </tr> - <tr> - <td> - <code>restoreCommand</code> - </td> - <td> - /home/user/bin/restore.sh - </td> - <td> - Backup restore command. - </td> - </tr> - <tr> - <td> - <code>pvc</code> - </td> - <td colspan="2"> - <p>Persistent Volume Claim Kubernetes resource</p> - <br/> - <table colspan="2" style="width:100%"> - <tbody> - <tr> - <td> - <code>enabled</code> - </td> - <td> - true - </td> - <td> - Enable/disable switch for PVC - </td> - </tr> - <tr> - <td> - <code>enabled</code> - </td> - <td> - true - </td> - <td> - Enable/disable switch for PVC - </td> - </tr> - <tr> - <td> - <code>size</code> - </td> - <td> - 5Gi - </td> - <td> - Size of PVC - </td> - </tr> - <tr> - <td> - <code>className</code> - </td> - <td> - "" - </td> - <td> - StorageClassName for PVC - <a href="https://kubernetes.io/docs/concepts/storage/persistent-volumes/#class-1">More info</a> - </td> - </tr> - </tbody> - </table> - </td> - </tr> - <tr> - <td> - <code>env</code> - </td> - <td> -<pre> -- name: BACKUP_DIR - value: /backup -- name: JENKINS_HOME - value: /jenkins-home -- name: BACKUP_COUNT - value: "3" -</pre> - </td> - <td> - Contains container environment variables. - PVC backup provider handles these variables:<br /> - BACKUP_DIR - path for storing backup files (default: "/backup")<br /> - JENKINS_HOME - path to jenkins home (default: "/jenkins-home")<br /> - BACKUP_COUNT - define how much recent backups will be kept<br /> - </td> - </td> - </tr> - <tr> - <td> - <code>volumeMounts</code> - </td> - <td> -<pre> -- name: jenkins-home - mountPath: /jenkins-home -- mountPath: /backup - name: backup -</pre> - </td> - <td> - Holds the mount points for volumes. - </td> - </tr> - </tbody> -</table> - - -<p><h4 id="Configuration">Configuration - </h3> - <p> - (<em>Appears on:</em> - <a href="#JenkinsConfiguration">Jenkins instance configuration</a>) - </p></p> - -<p><table> - <thead> - <tr> - <th>Field</th> - <th>Default value</th> - <th>Description</th> - </tr> - </thead> - <tbody> - <tr> - <td> - <code>configurationAsCode</code> - </td> - <td> - {} - </td> - <td> - ConfigurationAsCode defines configuration of Jenkins customization via Configuration as Code Jenkins plugin. -Example:<br /> -<pre> -- configMapName: jenkins-casc - content: {} -</pre> - </td> - </tr> - <tr> - <td> - <code>groovyScripts</code> - </td> - <td> - {} - </td> - <td> - GroovyScripts defines configuration of Jenkins customization via groovy scripts. - Example:<br /> -<pre> -- configMapName: jenkins-gs - content: {} -</pre> - </td> - </tr> - <tr> - <td> - <code>secretRefName</code> - </td> - <td> - &ldquo;&rdquo; - </td> - <td> - secretRefName of existing secret (previously created). - </td> - </tr> - <tr> - <td> - <code>secretData</code> - </td> - <td> - {} - </td> - <td> - If secretRefName is empty, secretData creates new secret and fills with data provided in secretData. - </td> - </tr> - </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 <code>{git-hash}</code>, {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> - - - - - - Docs: Architecture and design - https://jenkinsci.github.io/kubernetes-operator/docs/how-it-works/architecture-and-design/ - Fri, 01 Oct 2021 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/how-it-works/architecture-and-design/ - - - - - -<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:</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 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> - -<h2 id="webhook">Webhook</h2> - -<p>It rejects/accepts admission requests based on potential security warnings in plugins present in the Jenkins Custom Resource.</p> - - - - - - Docs: Deploy Jenkins - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.5.x/deploy-jenkins/ - Mon, 25 Jan 2021 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.5.x/deploy-jenkins/ - - - - <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: - name: example -spec: - master: - containers: - - name: jenkins-master - image: jenkins/jenkins:2.277.4-lts-alpine - imagePullPolicy: Always - livenessProbe: - failureThreshold: <span style="color:#0000cf;font-weight:bold">12</span> - httpGet: - path: /login - port: http - scheme: HTTP - initialDelaySeconds: <span style="color:#0000cf;font-weight:bold">80</span> - periodSeconds: <span style="color:#0000cf;font-weight:bold">10</span> - successThreshold: <span style="color:#0000cf;font-weight:bold">1</span> - timeoutSeconds: <span style="color:#0000cf;font-weight:bold">5</span> - readinessProbe: - failureThreshold: <span style="color:#0000cf;font-weight:bold">3</span> - httpGet: - path: /login - port: http - scheme: HTTP - initialDelaySeconds: <span style="color:#0000cf;font-weight:bold">30</span> - periodSeconds: <span style="color:#0000cf;font-weight:bold">10</span> - successThreshold: <span style="color:#0000cf;font-weight:bold">1</span> - timeoutSeconds: <span style="color:#0000cf;font-weight:bold">1</span> - resources: - limits: - cpu: 1500m - memory: 3Gi - requests: - cpu: <span style="color:#4e9a06">&#34;1&#34;</span> - memory: 500Mi - seedJobs: - - id: jenkins-operator - targets: <span style="color:#4e9a06">&#34;cicd/jobs/*.jenkins&#34;</span> - description: <span style="color:#4e9a06">&#34;Jenkins Operator repository&#34;</span> - repositoryBranch: master - repositoryUrl: https://github.com/jenkinsci/kubernetes-operator.git</code></pre></div> -<p>Deploy a Jenkins to 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> -<p>Get the Jenkins credentials:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl get secret jenkins-operator-credentials-&lt;cr_name&gt; -o <span style="color:#4e9a06">&#39;jsonpath={.data.user}&#39;</span> <span style="color:#000;font-weight:bold">|</span> base64 -d -kubectl get secret jenkins-operator-credentials-&lt;cr_name&gt; -o <span style="color:#4e9a06">&#39;jsonpath={.data.password}&#39;</span> <span style="color:#000;font-weight:bold">|</span> base64 -d</code></pre></div> -<p>Connect to the Jenkins instance (minikube):</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">minikube service jenkins-operator-http-&lt;cr_name&gt; --url</code></pre></div> -<p>Connect to the Jenkins instance (actual Kubernetes cluster):</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl port-forward jenkins-&lt;cr_name&gt; 8080:8080</code></pre></div> -<p>Then open browser with address <code>http://localhost:8080</code>.</p> - -<p><img src="https://jenkinsci.github.io/kubernetes-operator/kubernetes-operator/img/jenkins.png" alt="jenkins" /></p> - - - - - - Docs: Deploy Jenkins - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.4.x/deploy-jenkins/ - Mon, 13 Apr 2020 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.4.x/deploy-jenkins/ - - - - <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: - name: example -spec: - master: - containers: - - name: jenkins-master - image: jenkins/jenkins:lts - imagePullPolicy: Always - livenessProbe: - failureThreshold: <span style="color:#0000cf;font-weight:bold">12</span> - httpGet: - path: /login - port: http - scheme: HTTP - initialDelaySeconds: <span style="color:#0000cf;font-weight:bold">80</span> - periodSeconds: <span style="color:#0000cf;font-weight:bold">10</span> - successThreshold: <span style="color:#0000cf;font-weight:bold">1</span> - timeoutSeconds: <span style="color:#0000cf;font-weight:bold">5</span> - readinessProbe: - failureThreshold: <span style="color:#0000cf;font-weight:bold">3</span> - httpGet: - path: /login - port: http - scheme: HTTP - initialDelaySeconds: <span style="color:#0000cf;font-weight:bold">30</span> - periodSeconds: <span style="color:#0000cf;font-weight:bold">10</span> - successThreshold: <span style="color:#0000cf;font-weight:bold">1</span> - timeoutSeconds: <span style="color:#0000cf;font-weight:bold">1</span> - resources: - limits: - cpu: 1500m - memory: 3Gi - requests: - cpu: <span style="color:#4e9a06">&#34;1&#34;</span> - memory: 500Mi - seedJobs: - - id: jenkins-operator - targets: <span style="color:#4e9a06">&#34;cicd/jobs/*.jenkins&#34;</span> - description: <span style="color:#4e9a06">&#34;Jenkins Operator repository&#34;</span> - repositoryBranch: master - repositoryUrl: https://github.com/jenkinsci/kubernetes-operator.git</code></pre></div> -<p>Deploy a Jenkins to 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> -<p>Get the Jenkins credentials:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl get secret jenkins-operator-credentials-&lt;cr_name&gt; -o <span style="color:#4e9a06">&#39;jsonpath={.data.user}&#39;</span> <span style="color:#000;font-weight:bold">|</span> base64 -d -kubectl get secret jenkins-operator-credentials-&lt;cr_name&gt; -o <span style="color:#4e9a06">&#39;jsonpath={.data.password}&#39;</span> <span style="color:#000;font-weight:bold">|</span> base64 -d</code></pre></div> -<p>Connect to the Jenkins instance (minikube):</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">minikube service jenkins-operator-http-&lt;cr_name&gt; --url</code></pre></div> -<p>Connect to the Jenkins instance (actual Kubernetes cluster):</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl port-forward jenkins-&lt;cr_name&gt; 8080:8080</code></pre></div> -<p>Then open browser with address <code>http://localhost:8080</code>.</p> - -<p><img src="https://jenkinsci.github.io/kubernetes-operator/kubernetes-operator/img/jenkins.png" alt="jenkins" /></p> - - - - - - Docs: Deploy Jenkins - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.3.x/deploy-jenkins/ - Fri, 20 Dec 2019 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.3.x/deploy-jenkins/ - - - - <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: - name: example -spec: - master: - containers: - - name: jenkins-master - image: jenkins/jenkins:lts - imagePullPolicy: Always - livenessProbe: - failureThreshold: <span style="color:#0000cf;font-weight:bold">12</span> - httpGet: - path: /login - port: http - scheme: HTTP - initialDelaySeconds: <span style="color:#0000cf;font-weight:bold">80</span> - periodSeconds: <span style="color:#0000cf;font-weight:bold">10</span> - successThreshold: <span style="color:#0000cf;font-weight:bold">1</span> - timeoutSeconds: <span style="color:#0000cf;font-weight:bold">5</span> - readinessProbe: - failureThreshold: <span style="color:#0000cf;font-weight:bold">3</span> - httpGet: - path: /login - port: http - scheme: HTTP - initialDelaySeconds: <span style="color:#0000cf;font-weight:bold">30</span> - periodSeconds: <span style="color:#0000cf;font-weight:bold">10</span> - successThreshold: <span style="color:#0000cf;font-weight:bold">1</span> - timeoutSeconds: <span style="color:#0000cf;font-weight:bold">1</span> - resources: - limits: - cpu: 1500m - memory: 3Gi - requests: - cpu: <span style="color:#4e9a06">&#34;1&#34;</span> - memory: 500Mi - seedJobs: - - id: jenkins-operator - targets: <span style="color:#4e9a06">&#34;cicd/jobs/*.jenkins&#34;</span> - description: <span style="color:#4e9a06">&#34;Jenkins Operator repository&#34;</span> - repositoryBranch: master - repositoryUrl: https://github.com/jenkinsci/kubernetes-operator.git</code></pre></div> -<p>Deploy a Jenkins to 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> -<p>Get the Jenkins credentials:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl get secret jenkins-operator-credentials-&lt;cr_name&gt; -o <span style="color:#4e9a06">&#39;jsonpath={.data.user}&#39;</span> <span style="color:#000;font-weight:bold">|</span> base64 -d -kubectl get secret jenkins-operator-credentials-&lt;cr_name&gt; -o <span style="color:#4e9a06">&#39;jsonpath={.data.password}&#39;</span> <span style="color:#000;font-weight:bold">|</span> base64 -d</code></pre></div> -<p>Connect to the Jenkins instance (minikube):</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">minikube service jenkins-operator-http-&lt;cr_name&gt; --url</code></pre></div> -<p>Connect to the Jenkins instance (actual Kubernetes cluster):</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl port-forward jenkins-&lt;cr_name&gt; 8080:8080</code></pre></div> -<p>Then open browser with address <code>http://localhost:8080</code>.</p> - -<p><img src="https://jenkinsci.github.io/kubernetes-operator/kubernetes-operator/img/jenkins.png" alt="jenkins" /></p> - - - - - - Docs: Deploy Jenkins - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.1.x/deploy-jenkins/ - Mon, 05 Aug 2019 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.1.x/deploy-jenkins/ - - - - - -<h2 id="deploy-jenkins">Deploy Jenkins</h2> - -<p>Once the <strong>Jenkins Operator</strong> is up and running let&rsquo;s deploy an actual Jenkins instance. -Create a manifest ie. <strong>jenkins_instance.yaml</strong> with following data and save it on drive.</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">apiVersion: jenkins.io/v1alpha2 -kind: Jenkins -metadata: - name: example -spec: - master: - containers: - - name: jenkins-master - image: jenkins/jenkins:lts - imagePullPolicy: Always - livenessProbe: - failureThreshold: <span style="color:#0000cf;font-weight:bold">12</span> - httpGet: - path: /login - port: http - scheme: HTTP - initialDelaySeconds: <span style="color:#0000cf;font-weight:bold">80</span> - periodSeconds: <span style="color:#0000cf;font-weight:bold">10</span> - successThreshold: <span style="color:#0000cf;font-weight:bold">1</span> - timeoutSeconds: <span style="color:#0000cf;font-weight:bold">5</span> - readinessProbe: - failureThreshold: <span style="color:#0000cf;font-weight:bold">3</span> - httpGet: - path: /login - port: http - scheme: HTTP - initialDelaySeconds: <span style="color:#0000cf;font-weight:bold">30</span> - periodSeconds: <span style="color:#0000cf;font-weight:bold">10</span> - successThreshold: <span style="color:#0000cf;font-weight:bold">1</span> - timeoutSeconds: <span style="color:#0000cf;font-weight:bold">1</span> - resources: - limits: - cpu: 1500m - memory: 3Gi - requests: - cpu: <span style="color:#4e9a06">&#34;1&#34;</span> - memory: 500Mi - seedJobs: - - id: jenkins-operator - targets: <span style="color:#4e9a06">&#34;cicd/jobs/*.jenkins&#34;</span> - description: <span style="color:#4e9a06">&#34;Jenkins Operator repository&#34;</span> - repositoryBranch: master - repositoryUrl: https://github.com/jenkinsci/kubernetes-operator.git</code></pre></div> -<p>Deploy a Jenkins to K8s:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl create -f jenkins_instance.yaml</code></pre></div> -<p>Watch the Jenkins instance being created:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl get pods -w</code></pre></div> -<p>Get the Jenkins credentials:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl get secret jenkins-operator-credentials-&lt;cr_name&gt; -o <span style="color:#4e9a06">&#39;jsonpath={.data.user}&#39;</span> <span style="color:#000;font-weight:bold">|</span> base64 -d -kubectl get secret jenkins-operator-credentials-&lt;cr_name&gt; -o <span style="color:#4e9a06">&#39;jsonpath={.data.password}&#39;</span> <span style="color:#000;font-weight:bold">|</span> base64 -d</code></pre></div> -<p>Connect to the Jenkins Operator (minikube):</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">minikube service jenkins-operator-http-&lt;cr_name&gt; --url</code></pre></div> -<p>Connect to the Jenkins instance (actual Kubernetes cluster):</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl port-forward jenkins-&lt;cr_name&gt; 8080:8080</code></pre></div> -<p>Then open browser with address <code>http://localhost:8080</code>. -<img src="https://jenkinsci.github.io/kubernetes-operator/kubernetes-operator/img/jenkins.png" alt="jenkins" /></p> - - - - - - Docs: Deploy Jenkins - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.2.x/deploy-jenkins/ - Mon, 05 Aug 2019 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.2.x/deploy-jenkins/ - - - - <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: - name: example -spec: - master: - containers: - - name: jenkins-master - image: jenkins/jenkins:lts - imagePullPolicy: Always - livenessProbe: - failureThreshold: <span style="color:#0000cf;font-weight:bold">12</span> - httpGet: - path: /login - port: http - scheme: HTTP - initialDelaySeconds: <span style="color:#0000cf;font-weight:bold">80</span> - periodSeconds: <span style="color:#0000cf;font-weight:bold">10</span> - successThreshold: <span style="color:#0000cf;font-weight:bold">1</span> - timeoutSeconds: <span style="color:#0000cf;font-weight:bold">5</span> - readinessProbe: - failureThreshold: <span style="color:#0000cf;font-weight:bold">3</span> - httpGet: - path: /login - port: http - scheme: HTTP - initialDelaySeconds: <span style="color:#0000cf;font-weight:bold">30</span> - periodSeconds: <span style="color:#0000cf;font-weight:bold">10</span> - successThreshold: <span style="color:#0000cf;font-weight:bold">1</span> - timeoutSeconds: <span style="color:#0000cf;font-weight:bold">1</span> - resources: - limits: - cpu: 1500m - memory: 3Gi - requests: - cpu: <span style="color:#4e9a06">&#34;1&#34;</span> - memory: 500Mi - seedJobs: - - id: jenkins-operator - targets: <span style="color:#4e9a06">&#34;cicd/jobs/*.jenkins&#34;</span> - description: <span style="color:#4e9a06">&#34;Jenkins Operator repository&#34;</span> - repositoryBranch: master - repositoryUrl: https://github.com/jenkinsci/kubernetes-operator.git</code></pre></div> -<p>Deploy a Jenkins to 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> -<p>Get the Jenkins credentials:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl get secret jenkins-operator-credentials-&lt;cr_name&gt; -o <span style="color:#4e9a06">&#39;jsonpath={.data.user}&#39;</span> <span style="color:#000;font-weight:bold">|</span> base64 -d -kubectl get secret jenkins-operator-credentials-&lt;cr_name&gt; -o <span style="color:#4e9a06">&#39;jsonpath={.data.password}&#39;</span> <span style="color:#000;font-weight:bold">|</span> base64 -d</code></pre></div> -<p>Connect to the Jenkins instance (minikube):</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">minikube service jenkins-operator-http-&lt;cr_name&gt; --url</code></pre></div> -<p>Connect to the Jenkins instance (actual Kubernetes cluster):</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl port-forward jenkins-&lt;cr_name&gt; 8080:8080</code></pre></div> -<p>Then open browser with address <code>http://localhost:8080</code>. -<img src="https://jenkinsci.github.io/kubernetes-operator/img/jenkins.png" alt="jenkins" /></p> - - - - - - Docs: Configuration - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.1.x/configuration/ - Mon, 16 Jan 2023 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.1.x/configuration/ - - - - - -<p>Jenkins operator uses <a href="https://github.com/jenkinsci/job-dsl-plugin">job-dsl</a> and <a href="https://jenkinsci.github.io/kubernetes-credentials-provider-plugin/">kubernetes-credentials-provider</a> plugins for configuring jobs -and deploy keys.</p> - -<h2 id="prepare-job-definitions-and-pipelines">Prepare job definitions and pipelines</h2> - -<p>First you have to prepare pipelines and job definition in your GitHub repository using the following structure:</p> -<pre><code>cicd/ -├── jobs -│   └── build.jenkins -└── pipelines - └── build.jenkins</code></pre> -<p><strong>cicd/jobs/build.jenkins</strong> it&rsquo;s a job definition:</p> -<pre><code>#!/usr/bin/env groovy - -pipelineJob('build-jenkins-operator') { - displayName('Build jenkins-operator') - - definition { - cpsScm { - scm { - git { - remote { - url('https://github.com/jenkinsci/kubernetes-operator.git') - credentials('jenkins-operator') - } - branches('*/master') - } - } - scriptPath('cicd/pipelines/build.jenkins') - } - } -}</code></pre> -<p><strong>cicd/pipelines/build.jenkins</strong> is an actual Jenkins pipeline:</p> -<pre><code>#!/usr/bin/env groovy - -def label = "build-jenkins-operator-${UUID.randomUUID().toString()}" -def home = "/home/jenkins" -def workspace = "${home}/workspace/build-jenkins-operator" -def workdir = "${workspace}/src/github.com/jenkinsci/kubernetes-operator/" - -podTemplate(label: label, - containers: [ - containerTemplate(name: 'jnlp', image: 'jenkins/inbound-agent:alpine'), - containerTemplate(name: 'go', image: 'golang:1-alpine', command: 'cat', ttyEnabled: true), - ], - envVars: [ - envVar(key: 'GOPATH', value: workspace), - ], - ) { - - node(label) { - dir(workdir) { - stage('Init') { - timeout(time: 3, unit: 'MINUTES') { - checkout scm - } - container('go') { - sh 'apk --no-cache --update add make git gcc libc-dev' - } - } - - stage('Dep') { - container('go') { - sh 'make dep' - } - } - - stage('Test') { - container('go') { - sh 'make test' - } - } - - stage('Build') { - container('go') { - sh 'make build' - } - } - } - } -}</code></pre> -<h2 id="configure-seed-jobs">Configure Seed Jobs</h2> - -<p>Jenkins Seed Jobs are configured using <code>Jenkins.spec.seedJobs</code> section from your custom resource manifest:</p> -<pre><code>apiVersion: jenkins.io/v1alpha2 -kind: Jenkins -metadata: - name: example -spec: - seedJobs: - - id: jenkins-operator - targets: "cicd/jobs/*.jenkins" - description: "Jenkins Operator repository" - repositoryBranch: master - repositoryUrl: https://github.com/jenkinsci/kubernetes-operator.git</code></pre> -<p><strong>Jenkins Operator</strong> will automatically discover and configure all the seed jobs.</p> - -<p>You can verify if deploy keys were successfully configured in the Jenkins <strong>Credentials</strong> tab.</p> - -<p><img src="https://jenkinsci.github.io/kubernetes-operator/kubernetes-operator/img/jenkins-credentials.png" alt="jenkins" /></p> - -<p>You can verify if your pipelines were successfully configured in the Jenkins Seed Job console output.</p> - -<p><img src="https://jenkinsci.github.io/kubernetes-operator/kubernetes-operator/img/jenkins-seed.png" alt="jenkins" /></p> - -<p>If your GitHub repository is <strong>private</strong> you have to configure SSH or username/password authentication.</p> - -<h3 id="ssh-authentication">SSH authentication</h3> - -<h4 id="generate-ssh-keys">Generate SSH Keys</h4> - -<p>There are two methods of SSH private key generation:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">$ openssl genrsa -out &lt;filename&gt; <span style="color:#0000cf;font-weight:bold">2048</span></code></pre></div> -<p>or</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">$ ssh-keygen -t rsa -b <span style="color:#0000cf;font-weight:bold">2048</span> -$ ssh-keygen -p -f &lt;filename&gt; -m pem</code></pre></div> -<p>Then copy content from generated file.</p> - -<h4 id="public-key">Public key</h4> - -<p>If you want to upload your public key to your Git server you need to extract it.</p> - -<p>If key was generated by <code>openssl</code> then you need to type this to extract public key:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">$ openssl rsa -in &lt;filename&gt; -pubout &gt; &lt;filename&gt;.pub</code></pre></div> -<p>If key was generated by <code>ssh-keygen</code> the public key content is located in <filename>.pub and there is no need to extract public key</p> - -<h4 id="configure-ssh-authentication">Configure SSH authentication</h4> - -<p>Configure a seed job like this:</p> -<pre><code>apiVersion: jenkins.io/v1alpha2 -kind: Jenkins -metadata: - name: example -spec: - seedJobs: - - id: jenkins-operator-ssh - credentialType: basicSSHUserPrivateKey - credentialID: k8s-ssh - targets: "cicd/jobs/*.jenkins" - description: "Jenkins Operator repository" - repositoryBranch: master - repositoryUrl: git@github.com:jenkinsci/kubernetes-operator.git</code></pre> -<p>and create a Kubernetes Secret (name of secret should be the same from <code>credentialID</code> field):</p> -<pre><code>apiVersion: v1 -kind: Secret -metadata: - name: k8s-ssh -stringData: - privateKey: | - -----BEGIN RSA PRIVATE KEY----- - MIIJKAIBAAKCAgEAxxDpleJjMCN5nusfW/AtBAZhx8UVVlhhhIKXvQ+dFODQIdzO - oDXybs1zVHWOj31zqbbJnsfsVZ9Uf3p9k6xpJ3WFY9b85WasqTDN1xmSd6swD4N8 - ... - username: github_user_name</code></pre> -<h3 id="username-password-authentication">Username &amp; password authentication</h3> - -<p>Configure a seed job like this:</p> -<pre><code>apiVersion: jenkins.io/v1alpha2 -kind: Jenkins -metadata: - name: example -spec: - seedJobs: - - id: jenkins-operator-user-pass - credentialType: usernamePassword - credentialID: k8s-user-pass - targets: "cicd/jobs/*.jenkins" - description: "Jenkins Operator repository" - repositoryBranch: master - repositoryUrl: https://github.com/jenkinsci/kubernetes-operator.git</code></pre> -<p>and create a Kubernetes Secret (name of secret should be the same from <code>credentialID</code> field):</p> -<pre><code>apiVersion: v1 -kind: Secret -metadata: - name: k8s-user-pass -stringData: - username: github_user_name - password: password_or_token</code></pre> -<h2 id="http-proxy-for-downloading-plugins">HTTP Proxy for downloading plugins</h2> - -<p>To use forwarding proxy with an operator to download plugins you need to add the following environment variable to Jenkins CR, for e.g.:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>master<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>containers<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-master<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>env<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>CURL_OPTIONS<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-L<span style="color:#f8f8f8;text-decoration:underline"> </span>-x<span style="color:#f8f8f8;text-decoration:underline"> </span>&lt;proxy_url&gt;</code></pre></div> -<p>In <code>CURL_OPTIONS</code> var you can set additional arguments to curl command.</p> - -<h2 id="jenkins-login-credentials">Jenkins login credentials</h2> - -<p>The operator automatically generates a Jenkins username and password and stores it in Kubernetes secret named -<code>jenkins-operator-credentials-&lt;cr_name&gt;</code> in the namespace where Jenkins CR has been deployed.</p> - -<p>If you want change it you can override the secret:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>v1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Secret<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-credentials-&lt;cr-name<span style="color:#8f5902;font-style:italic">&gt; -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">namespace: &lt;namespace&gt;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>data<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>user<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>&lt;base64-encoded-new-username<span style="color:#8f5902;font-style:italic">&gt; -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">password: &lt;base64-encoded-new-password&gt;</span></code></pre></div> -<p>If needed <strong>Jenkins Operator</strong> will restart the Jenkins master pod and then you can login with the new username and password -credentials.</p> - -<h2 id="override-default-jenkins-container-command">Override default Jenkins container command</h2> - -<p>The default command for the Jenkins master container <code>jenkins/jenkins:lts</code> looks like:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">command<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>bash<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>-c<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>/var/jenkins/scripts/init.sh<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/usr/bin/tini<span style="color:#f8f8f8;text-decoration:underline"> </span>-s<span style="color:#f8f8f8;text-decoration:underline"> </span>--<span style="color:#f8f8f8;text-decoration:underline"> </span>/usr/local/bin/jenkins.sh</code></pre></div> -<p>The script<code>/var/jenkins/scripts/init.sh</code> is provided by the operator and configures init.groovy.d (creates the Jenkins user) -and installs plugins. -The <code>/usr/bin/tini -s -- /usr/local/bin/jenkins.sh</code> command runs the Jenkins master main process.</p> - -<p>You can overwrite it in the following pattern:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">command<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>bash<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>-c<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>/var/jenkins/scripts/init.sh<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>&lt;custom-code-here&gt;<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/usr/bin/tini<span style="color:#f8f8f8;text-decoration:underline"> </span>-s<span style="color:#f8f8f8;text-decoration:underline"> </span>--<span style="color:#f8f8f8;text-decoration:underline"> </span>/usr/local/bin/jenkins.sh</code></pre></div> - - - - - Docs: Deploying Jenkins - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/deploying-jenkins/ - Wed, 08 Dec 2021 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/deploying-jenkins/ - - - - - - - -<div class="pageinfo pageinfo-primary"> -<p>This document describes the procedure for deploying Jenkins.</p> - -</div> - - -<h2 id="prerequisites">Prerequisites</h2> - -<p>The Operator needs to have been deployed beforehand. The procedure for deploying Jenkins described here doesn&rsquo;t apply to -installation of Operator via Helm chart unless <code>jenkins.enabled</code> was set to false. -That’s because by default, installation via Helm chart also covers deploying Jenkins.</p> - -<h2 id="deploying-jenkins-instance">Deploying Jenkins instance</h2> - -<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-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>namespace<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>default<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurationAsCode<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurations<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">]</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>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><span style="color:#4e9a06">&#34;&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>groovyScripts<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurations<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">]</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>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><span style="color:#4e9a06">&#34;&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkinsAPISettings<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>authorizationStrategy<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>createUser<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>disableCSRFProtection<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">false</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>containers<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-master<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>image<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins/jenkins<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">2.319</span><span style="color:#0000cf;font-weight:bold">.1</span>-lts-alpine<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>imagePullPolicy<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Always<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>livenessProbe<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>failureThreshold<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">12</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>httpGet<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>path<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/login<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>port<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>http<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>scheme<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>HTTP<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>initialDelaySeconds<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">100</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>periodSeconds<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">10</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>successThreshold<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>timeoutSeconds<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">5</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>readinessProbe<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>failureThreshold<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">10</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>httpGet<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>path<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/login<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>port<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>http<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>scheme<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>HTTP<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>initialDelaySeconds<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">80</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>periodSeconds<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">10</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>successThreshold<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>timeoutSeconds<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>limits<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>cpu<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>1500m<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>memory<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>3Gi<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>requests<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>cpu<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;1&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>memory<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>500Mi<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>seedJobs<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>id<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>targets<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;cicd/jobs/*.jenkins&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>description<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Jenkins Operator repository&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>repositoryBranch<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>master<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>repositoryUrl<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>https<span style="color:#000;font-weight:bold">:</span>//github.com/jenkinsci/kubernetes-operator.git</code></pre></div> -<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> -<p>Get the Jenkins credentials:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl get secret jenkins-operator-credentials-&lt;cr_name&gt; -o <span style="color:#4e9a06">&#39;jsonpath={.data.user}&#39;</span> <span style="color:#000;font-weight:bold">|</span> base64 -d -kubectl get secret jenkins-operator-credentials-&lt;cr_name&gt; -o <span style="color:#4e9a06">&#39;jsonpath={.data.password}&#39;</span> <span style="color:#000;font-weight:bold">|</span> base64 -d</code></pre></div> -<p>Connect to the Jenkins instance (minikube):</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">minikube service jenkins-operator-http-&lt;cr_name&gt; --url</code></pre></div> -<p>Connect to the Jenkins instance (actual Kubernetes cluster):</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl port-forward jenkins-&lt;cr_name&gt; 8080:8080</code></pre></div> -<p>Then open browser with address <code>http://localhost:8080</code>.</p> - -<p><img src="https://jenkinsci.github.io/kubernetes-operator/kubernetes-operator/img/jenkins.png" alt="jenkins" /></p> - - - - - - Docs: Deploying Jenkins - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.6.x/deploying-jenkins/ - Wed, 08 Dec 2021 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.6.x/deploying-jenkins/ - - - - - - - -<div class="pageinfo pageinfo-primary"> -<p>This document describes the procedure for deploying Jenkins.</p> - -</div> - - -<h2 id="prerequisites">Prerequisites</h2> - -<p>The Operator needs to have been deployed beforehand. The procedure for deploying Jenkins described here doesn&rsquo;t apply to -installation of Operator via Helm chart unless <code>jenkins.enabled</code> was set to false. -That’s because by default, installation via Helm chart also covers deploying Jenkins.</p> - -<h2 id="deploying-jenkins-instance">Deploying Jenkins instance</h2> - -<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-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>namespace<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>default<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurationAsCode<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurations<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">]</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>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><span style="color:#4e9a06">&#34;&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>groovyScripts<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurations<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">]</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>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><span style="color:#4e9a06">&#34;&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkinsAPISettings<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>authorizationStrategy<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>createUser<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>disableCSRFProtection<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">false</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>containers<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-master<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>image<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins/jenkins<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">2.277</span><span style="color:#0000cf;font-weight:bold">.4</span>-lts-alpine<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>imagePullPolicy<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Always<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>livenessProbe<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>failureThreshold<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">12</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>httpGet<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>path<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/login<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>port<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>http<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>scheme<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>HTTP<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>initialDelaySeconds<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">100</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>periodSeconds<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">10</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>successThreshold<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>timeoutSeconds<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">5</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>readinessProbe<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>failureThreshold<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">10</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>httpGet<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>path<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/login<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>port<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>http<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>scheme<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>HTTP<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>initialDelaySeconds<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">80</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>periodSeconds<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">10</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>successThreshold<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>timeoutSeconds<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>limits<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>cpu<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>1500m<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>memory<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>3Gi<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>requests<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>cpu<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;1&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>memory<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>500Mi<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>seedJobs<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>id<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>targets<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;cicd/jobs/*.jenkins&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>description<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Jenkins Operator repository&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>repositoryBranch<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>master<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>repositoryUrl<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>https<span style="color:#000;font-weight:bold">:</span>//github.com/jenkinsci/kubernetes-operator.git</code></pre></div> -<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> -<p>Get the Jenkins credentials:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl get secret jenkins-operator-credentials-&lt;cr_name&gt; -o <span style="color:#4e9a06">&#39;jsonpath={.data.user}&#39;</span> <span style="color:#000;font-weight:bold">|</span> base64 -d -kubectl get secret jenkins-operator-credentials-&lt;cr_name&gt; -o <span style="color:#4e9a06">&#39;jsonpath={.data.password}&#39;</span> <span style="color:#000;font-weight:bold">|</span> base64 -d</code></pre></div> -<p>Connect to the Jenkins instance (minikube):</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">minikube service jenkins-operator-http-&lt;cr_name&gt; --url</code></pre></div> -<p>Connect to the Jenkins instance (actual Kubernetes cluster):</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl port-forward jenkins-&lt;cr_name&gt; 8080:8080</code></pre></div> -<p>Then open browser with address <code>http://localhost:8080</code>.</p> - -<p><img src="https://jenkinsci.github.io/kubernetes-operator/kubernetes-operator/img/jenkins.png" alt="jenkins" /></p> - - - - - - Docs: Configuration - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.5.x/configuration/ - Fri, 01 Oct 2021 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.5.x/configuration/ - - - - - -<h2 id="configure-seed-jobs-and-pipelines">Configure Seed Jobs and Pipelines</h2> - -<p>Jenkins operator uses <a href="https://github.com/jenkinsci/job-dsl-plugin">job-dsl</a> and <a href="https://jenkinsci.github.io/kubernetes-credentials-provider-plugin/">kubernetes-credentials-provider</a> plugins for configuring jobs -and deploy keys.</p> - -<h2 id="prepare-job-definitions-and-pipelines">Prepare job definitions and pipelines</h2> - -<p>First you have to prepare pipelines and job definition in your GitHub repository using the following structure:</p> -<pre><code>cicd/ -├── jobs -│   └── k8s.jenkins -└── pipelines - └── k8s.jenkins</code></pre> -<p><strong><code>cicd/jobs/k8s.jenkins</code></strong> is a job definition:</p> -<pre><code>#!/usr/bin/env groovy - -pipelineJob('k8s-e2e') { - displayName('Kubernetes Plugin E2E Test') - - logRotator { - numToKeep(10) - daysToKeep(30) - } - - configure { project -> - project / 'properties' / 'org.jenkinsci.plugins.workflow.job.properties.DurabilityHintJobProperty' { - hint('PERFORMANCE_OPTIMIZED') - } - } - - definition { - cpsScm { - scm { - git { - remote { - url('https://github.com/jenkinsci/kubernetes-operator.git') - credentials('jenkins-operator') - } - branches('*/master') - } - } - scriptPath('cicd/pipelines/k8s.jenkins') - } - } -}</code></pre> -<p><strong><code>cicd/pipelines/k8s.jenkins</code></strong> is an actual Jenkins pipeline:</p> -<pre><code>#!/usr/bin/env groovy - -def label = "k8s-${UUID.randomUUID().toString()}" -def home = "/home/jenkins" -def workspace = "${home}/workspace/build-jenkins-operator" -def workdir = "${workspace}/src/github.com/jenkinsci/kubernetes-operator/" - -podTemplate(label: label, - containers: [ - containerTemplate(name: 'alpine', image: 'alpine:3.11', ttyEnabled: true, command: 'cat'), - ], - ) { - node(label) { - stage('Run shell') { - container('alpine') { - sh 'echo "hello world"' - } - } - } -}</code></pre> -<h2 id="configure-seed-jobs">Configure Seed Jobs</h2> - -<p>Jenkins Seed Jobs are configured using <code>Jenkins.spec.seedJobs</code> section from your custom resource manifest:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.io/v1alpha2<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>example<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>seedJobs<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>id<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>targets<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;cicd/jobs/*.jenkins&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>description<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Jenkins Operator repository&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>repositoryBranch<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>master<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>repositoryUrl<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>https<span style="color:#000;font-weight:bold">:</span>//github.com/jenkinsci/kubernetes-operator.git</code></pre></div> -<p><strong>Jenkins Operator</strong> will automatically discover and configure all the seed jobs.</p> - -<p>You can verify if deploy keys were successfully configured in the Jenkins <strong>Credentials</strong> tab.</p> - -<p><img src="https://jenkinsci.github.io/kubernetes-operator/kubernetes-operator/img/jenkins-credentials.png" alt="jenkins" /></p> - -<p>You can verify if your pipelines were successfully configured in the Jenkins Seed Job console output.</p> - -<p><img src="https://jenkinsci.github.io/kubernetes-operator/kubernetes-operator/img/jenkins-seed.png" alt="jenkins" /></p> - -<p>If your GitHub repository is <strong>private</strong> you have to configure SSH or username/password authentication.</p> - -<h3 id="ssh-authentication">SSH authentication</h3> - -<h4 id="generate-ssh-keys">Generate SSH Keys</h4> - -<p>There are two methods of SSH private key generation:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">$ openssl genrsa -out &lt;filename&gt; <span style="color:#0000cf;font-weight:bold">2048</span></code></pre></div> -<p>or</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">$ ssh-keygen -t rsa -b <span style="color:#0000cf;font-weight:bold">2048</span> -$ ssh-keygen -p -f &lt;filename&gt; -m pem</code></pre></div> -<p>Then copy content from generated file.</p> - -<h4 id="public-key">Public key</h4> - -<p>If you want to upload your public key to your Git server you need to extract it.</p> - -<p>If key was generated by <code>openssl</code> then you need to type this to extract public key:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">$ openssl rsa -in &lt;filename&gt; -pubout &gt; &lt;filename&gt;.pub</code></pre></div> -<p>If key was generated by <code>ssh-keygen</code> the public key content is located in <filename>.pub and there is no need to extract public key</p> - -<h4 id="configure-ssh-authentication">Configure SSH authentication</h4> - -<p>Configure a seed job like this:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.io/v1alpha2<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>example<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>seedJobs<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>id<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-ssh<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>credentialType<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>basicSSHUserPrivateKey<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>credentialID<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>k8s-ssh<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>targets<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;cicd/jobs/*.jenkins&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>description<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Jenkins Operator repository&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>repositoryBranch<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>master<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>repositoryUrl<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>git@github.com<span style="color:#000;font-weight:bold">:</span>jenkinsci/kubernetes-operator.git</code></pre></div> -<p>and create a Kubernetes Secret (name of secret should be the same from <code>credentialID</code> field):</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>v1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Secret<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>k8s-ssh<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>labels<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;jenkins.io/credentials-type&#34;</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;basicSSHUserPrivateKey&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>annotations<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:#4e9a06">&#34;jenkins.io/credentials-description&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;ssh github.com:jenkinsci/kubernetes-operator&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>stringData<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>privateKey<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">| -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">-----BEGIN RSA PRIVATE KEY-----</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>MIIJKAIBAAKCAgEAxxDpleJjMCN5nusfW/AtBAZhx8UVVlhhhIKXvQ+dFODQIdzO<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>oDXybs1zVHWOj31zqbbJnsfsVZ9Uf3p9k6xpJ3WFY9b85WasqTDN1xmSd6swD4N8<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>username<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>github_user_name</code></pre></div> -<h3 id="username-password-authentication">Username &amp; password authentication</h3> - -<p>Configure the seed job like:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.io/v1alpha2<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>example<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>seedJobs<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>id<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-user-pass<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>credentialType<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>usernamePassword<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>credentialID<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>k8s-user-pass<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>targets<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;cicd/jobs/*.jenkins&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>description<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Jenkins Operator repository&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>repositoryBranch<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>master<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>repositoryUrl<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>https<span style="color:#000;font-weight:bold">:</span>//github.com/jenkinsci/kubernetes-operator.git</code></pre></div> -<p>and create a Kubernetes Secret (name of secret should be the same from <code>credentialID</code> field):</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>v1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Secret<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>k8s-user-pass<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>stringData<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>username<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>github_user_name<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>password<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>password_or_token</code></pre></div> -<h3 id="external-authentication">External authentication</h3> - -<p>You can use <code>external</code> credential type if you want to configure authentication using Configuration As Code or Groovy Script.</p> - -<p>Example:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.io/v1alpha2<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>example<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>seedJobs<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>id<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-external<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>credentialType<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>external<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>credentialID<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>k8s-external<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>targets<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;cicd/jobs/*.jenkins&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>description<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Jenkins Operator repository&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>repositoryBranch<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>master<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>repositoryUrl<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>https<span style="color:#000;font-weight:bold">:</span>//github.com/jenkinsci/kubernetes-operator.git</code></pre></div> -<p>Remember that <code>credentialID</code> must match the id of the credentials configured in Jenkins. Consult the -<a href="https://www.jenkins.io/doc/book/using/using-credentials/">Jenkins docs for using credentials</a> for details.</p> - -<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 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"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-master<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>env<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>CURL_OPTIONS<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-L<span style="color:#f8f8f8;text-decoration:underline"> </span>-x<span style="color:#f8f8f8;text-decoration:underline"> </span>&lt;proxy_url&gt;</code></pre></div> -<p>In <code>CURL_OPTIONS</code> var you can set additional arguments to <code>curl</code> command.</p> - -<h2 id="pulling-docker-images-from-private-repositories">Pulling Docker images from private repositories</h2> - -<p>To pull a Docker Image from private repository you can use <code>imagePullSecrets</code>.</p> - -<p>Please follow the instructions on <a href="https://kubernetes.io/docs/concepts/containers/images/?origin_team=T42NTAGHM#creating-a-secret-with-a-docker-config">creating a secret with a docker config</a>.</p> - -<h3 id="docker-hub-configuration">Docker Hub Configuration</h3> - -<p>To use Docker Hub additional steps are required.</p> - -<p>Edit the previously created secret:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl -n &lt;namespace&gt; edit secret &lt;name&gt;</code></pre></div> -<p>The <code>.dockerconfigjson</code> key&rsquo;s value needs to be replaced with a modified version.</p> - -<p>After modifications, it needs to be encoded as a Base64 value before setting the <code>.dockerconfigjson</code> key.</p> - -<p>Example config file to modify and use:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-json" data-lang="json"><span style="color:#000;font-weight:bold">{</span> - <span style="color:#204a87;font-weight:bold">&#34;auths&#34;</span><span style="color:#000;font-weight:bold">:</span><span style="color:#000;font-weight:bold">{</span> - <span style="color:#204a87;font-weight:bold">&#34;https://index.docker.io/v1/&#34;</span><span style="color:#000;font-weight:bold">:</span><span style="color:#000;font-weight:bold">{</span> - <span style="color:#204a87;font-weight:bold">&#34;username&#34;</span><span style="color:#000;font-weight:bold">:</span><span style="color:#4e9a06">&#34;user&#34;</span><span style="color:#000;font-weight:bold">,</span> - <span style="color:#204a87;font-weight:bold">&#34;password&#34;</span><span style="color:#000;font-weight:bold">:</span><span style="color:#4e9a06">&#34;password&#34;</span><span style="color:#000;font-weight:bold">,</span> - <span style="color:#204a87;font-weight:bold">&#34;email&#34;</span><span style="color:#000;font-weight:bold">:</span><span style="color:#4e9a06">&#34;yourdockeremail@gmail.com&#34;</span><span style="color:#000;font-weight:bold">,</span> - <span style="color:#204a87;font-weight:bold">&#34;auth&#34;</span><span style="color:#000;font-weight:bold">:</span><span style="color:#4e9a06">&#34;base64 of string user:password&#34;</span> - <span style="color:#000;font-weight:bold">}</span><span style="color:#000;font-weight:bold">,</span> - <span style="color:#204a87;font-weight:bold">&#34;auth.docker.io&#34;</span><span style="color:#000;font-weight:bold">:</span><span style="color:#000;font-weight:bold">{</span> - <span style="color:#204a87;font-weight:bold">&#34;username&#34;</span><span style="color:#000;font-weight:bold">:</span><span style="color:#4e9a06">&#34;user&#34;</span><span style="color:#000;font-weight:bold">,</span> - <span style="color:#204a87;font-weight:bold">&#34;password&#34;</span><span style="color:#000;font-weight:bold">:</span><span style="color:#4e9a06">&#34;password&#34;</span><span style="color:#000;font-weight:bold">,</span> - <span style="color:#204a87;font-weight:bold">&#34;email&#34;</span><span style="color:#000;font-weight:bold">:</span><span style="color:#4e9a06">&#34;yourdockeremail@gmail.com&#34;</span><span style="color:#000;font-weight:bold">,</span> - <span style="color:#204a87;font-weight:bold">&#34;auth&#34;</span><span style="color:#000;font-weight:bold">:</span><span style="color:#4e9a06">&#34;base64 of string user:password&#34;</span> - <span style="color:#000;font-weight:bold">}</span><span style="color:#000;font-weight:bold">,</span> - <span style="color:#204a87;font-weight:bold">&#34;registry.docker.io&#34;</span><span style="color:#000;font-weight:bold">:</span><span style="color:#000;font-weight:bold">{</span> - <span style="color:#204a87;font-weight:bold">&#34;username&#34;</span><span style="color:#000;font-weight:bold">:</span><span style="color:#4e9a06">&#34;user&#34;</span><span style="color:#000;font-weight:bold">,</span> - <span style="color:#204a87;font-weight:bold">&#34;password&#34;</span><span style="color:#000;font-weight:bold">:</span><span style="color:#4e9a06">&#34;password&#34;</span><span style="color:#000;font-weight:bold">,</span> - <span style="color:#204a87;font-weight:bold">&#34;email&#34;</span><span style="color:#000;font-weight:bold">:</span><span style="color:#4e9a06">&#34;yourdockeremail@gmail.com&#34;</span><span style="color:#000;font-weight:bold">,</span> - <span style="color:#204a87;font-weight:bold">&#34;auth&#34;</span><span style="color:#000;font-weight:bold">:</span><span style="color:#4e9a06">&#34;base64 of string user:password&#34;</span> - <span style="color:#000;font-weight:bold">}</span><span style="color:#000;font-weight:bold">,</span> - <span style="color:#204a87;font-weight:bold">&#34;docker.io&#34;</span><span style="color:#000;font-weight:bold">:</span><span style="color:#000;font-weight:bold">{</span> - <span style="color:#204a87;font-weight:bold">&#34;username&#34;</span><span style="color:#000;font-weight:bold">:</span><span style="color:#4e9a06">&#34;user&#34;</span><span style="color:#000;font-weight:bold">,</span> - <span style="color:#204a87;font-weight:bold">&#34;password&#34;</span><span style="color:#000;font-weight:bold">:</span><span style="color:#4e9a06">&#34;password&#34;</span><span style="color:#000;font-weight:bold">,</span> - <span style="color:#204a87;font-weight:bold">&#34;email&#34;</span><span style="color:#000;font-weight:bold">:</span><span style="color:#4e9a06">&#34;yourdockeremail@gmail.com&#34;</span><span style="color:#000;font-weight:bold">,</span> - <span style="color:#204a87;font-weight:bold">&#34;auth&#34;</span><span style="color:#000;font-weight:bold">:</span><span style="color:#4e9a06">&#34;base64 of string user:password&#34;</span> - <span style="color:#000;font-weight:bold">}</span><span style="color:#000;font-weight:bold">,</span> - <span style="color:#204a87;font-weight:bold">&#34;https://registry-1.docker.io/v2/&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">{</span> - <span style="color:#204a87;font-weight:bold">&#34;username&#34;</span><span style="color:#000;font-weight:bold">:</span><span style="color:#4e9a06">&#34;user&#34;</span><span style="color:#000;font-weight:bold">,</span> - <span style="color:#204a87;font-weight:bold">&#34;password&#34;</span><span style="color:#000;font-weight:bold">:</span><span style="color:#4e9a06">&#34;password&#34;</span><span style="color:#000;font-weight:bold">,</span> - <span style="color:#204a87;font-weight:bold">&#34;email&#34;</span><span style="color:#000;font-weight:bold">:</span><span style="color:#4e9a06">&#34;yourdockeremail@gmail.com&#34;</span><span style="color:#000;font-weight:bold">,</span> - <span style="color:#204a87;font-weight:bold">&#34;auth&#34;</span><span style="color:#000;font-weight:bold">:</span><span style="color:#4e9a06">&#34;base64 of string user:password&#34;</span> - <span style="color:#000;font-weight:bold">}</span><span style="color:#000;font-weight:bold">,</span> - <span style="color:#204a87;font-weight:bold">&#34;registry-1.docker.io/v2/&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">{</span> - <span style="color:#204a87;font-weight:bold">&#34;username&#34;</span><span style="color:#000;font-weight:bold">:</span><span style="color:#4e9a06">&#34;user&#34;</span><span style="color:#000;font-weight:bold">,</span> - <span style="color:#204a87;font-weight:bold">&#34;password&#34;</span><span style="color:#000;font-weight:bold">:</span><span style="color:#4e9a06">&#34;password&#34;</span><span style="color:#000;font-weight:bold">,</span> - <span style="color:#204a87;font-weight:bold">&#34;email&#34;</span><span style="color:#000;font-weight:bold">:</span><span style="color:#4e9a06">&#34;yourdockeremail@gmail.com&#34;</span><span style="color:#000;font-weight:bold">,</span> - <span style="color:#204a87;font-weight:bold">&#34;auth&#34;</span><span style="color:#000;font-weight:bold">:</span><span style="color:#4e9a06">&#34;base64 of string user:password&#34;</span> - <span style="color:#000;font-weight:bold">}</span><span style="color:#000;font-weight:bold">,</span> - <span style="color:#204a87;font-weight:bold">&#34;registry-1.docker.io&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">{</span> - <span style="color:#204a87;font-weight:bold">&#34;username&#34;</span><span style="color:#000;font-weight:bold">:</span><span style="color:#4e9a06">&#34;user&#34;</span><span style="color:#000;font-weight:bold">,</span> - <span style="color:#204a87;font-weight:bold">&#34;password&#34;</span><span style="color:#000;font-weight:bold">:</span><span style="color:#4e9a06">&#34;password&#34;</span><span style="color:#000;font-weight:bold">,</span> - <span style="color:#204a87;font-weight:bold">&#34;email&#34;</span><span style="color:#000;font-weight:bold">:</span><span style="color:#4e9a06">&#34;yourdockeremail@gmail.com&#34;</span><span style="color:#000;font-weight:bold">,</span> - <span style="color:#204a87;font-weight:bold">&#34;auth&#34;</span><span style="color:#000;font-weight:bold">:</span><span style="color:#4e9a06">&#34;base64 of string user:password&#34;</span> - <span style="color:#000;font-weight:bold">}</span><span style="color:#000;font-weight:bold">,</span> - <span style="color:#204a87;font-weight:bold">&#34;https://registry-1.docker.io&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">{</span> - <span style="color:#204a87;font-weight:bold">&#34;username&#34;</span><span style="color:#000;font-weight:bold">:</span><span style="color:#4e9a06">&#34;user&#34;</span><span style="color:#000;font-weight:bold">,</span> - <span style="color:#204a87;font-weight:bold">&#34;password&#34;</span><span style="color:#000;font-weight:bold">:</span><span style="color:#4e9a06">&#34;password&#34;</span><span style="color:#000;font-weight:bold">,</span> - <span style="color:#204a87;font-weight:bold">&#34;email&#34;</span><span style="color:#000;font-weight:bold">:</span><span style="color:#4e9a06">&#34;yourdockeremail@gmail.com&#34;</span><span style="color:#000;font-weight:bold">,</span> - <span style="color:#204a87;font-weight:bold">&#34;auth&#34;</span><span style="color:#000;font-weight:bold">:</span><span style="color:#4e9a06">&#34;base64 of string user:password&#34;</span> - <span style="color:#000;font-weight:bold">}</span> - <span style="color:#000;font-weight:bold">}</span> -<span style="color:#000;font-weight:bold">}</span></code></pre></div> - - - - - Docs: Configuration - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.4.x/configuration/ - Mon, 13 Apr 2020 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.4.x/configuration/ - - - - - -<h2 id="configure-seed-jobs-and-pipelines">Configure Seed Jobs and Pipelines</h2> - -<p>Jenkins operator uses <a href="https://github.com/jenkinsci/job-dsl-plugin">job-dsl</a> and <a href="https://jenkinsci.github.io/kubernetes-credentials-provider-plugin/">kubernetes-credentials-provider</a> plugins for configuring jobs -and deploy keys.</p> - -<h2 id="prepare-job-definitions-and-pipelines">Prepare job definitions and pipelines</h2> - -<p>First you have to prepare pipelines and job definition in your GitHub repository using the following structure:</p> -<pre><code>cicd/ -├── jobs -│   └── build.jenkins -└── pipelines - └── build.jenkins</code></pre> -<p><strong><code>cicd/jobs/build.jenkins</code></strong> is a job definition:</p> -<pre><code>#!/usr/bin/env groovy - -pipelineJob('build-jenkins-operator') { - displayName('Build jenkins-operator') - - definition { - cpsScm { - scm { - git { - remote { - url('https://github.com/jenkinsci/kubernetes-operator.git') - credentials('jenkins-operator') - } - branches('*/master') - } - } - scriptPath('cicd/pipelines/build.jenkins') - } - } -}</code></pre> -<p><strong><code>cicd/pipelines/build.jenkins</code></strong> is an actual Jenkins pipeline:</p> -<pre><code>#!/usr/bin/env groovy - -def label = "build-jenkins-operator-${UUID.randomUUID().toString()}" -def home = "/home/jenkins" -def workspace = "${home}/workspace/build-jenkins-operator" -def workdir = "${workspace}/src/github.com/jenkinsci/kubernetes-operator/" - -podTemplate(label: label, - containers: [ - containerTemplate(name: 'jnlp', image: 'jenkins/inbound-agent:alpine'), - containerTemplate(name: 'go', image: 'golang:1-alpine', command: 'cat', ttyEnabled: true), - ], - envVars: [ - envVar(key: 'GOPATH', value: workspace), - ], - ) { - - node(label) { - dir(workdir) { - stage('Init') { - timeout(time: 3, unit: 'MINUTES') { - checkout scm - } - container('go') { - sh 'apk --no-cache --update add make git gcc libc-dev' - } - } - - stage('Dep') { - container('go') { - sh 'make dep' - } - } - - stage('Test') { - container('go') { - sh 'make test' - } - } - - stage('Build') { - container('go') { - sh 'make build' - } - } - } - } -}</code></pre> -<h2 id="configure-seed-jobs">Configure Seed Jobs</h2> - -<p>Jenkins Seed Jobs are configured using <code>Jenkins.spec.seedJobs</code> section from your custom resource manifest:</p> -<pre><code>apiVersion: jenkins.io/v1alpha2 -kind: Jenkins -metadata: - name: example -spec: - seedJobs: - - id: jenkins-operator - targets: "cicd/jobs/*.jenkins" - description: "Jenkins Operator repository" - repositoryBranch: master - repositoryUrl: https://github.com/jenkinsci/kubernetes-operator.git</code></pre> -<p><strong>Jenkins Operator</strong> will automatically discover and configure all the seed jobs.</p> - -<p>You can verify if deploy keys were successfully configured in the Jenkins <strong>Credentials</strong> tab.</p> - -<p><img src="https://jenkinsci.github.io/kubernetes-operator/kubernetes-operator/img/jenkins-credentials.png" alt="jenkins" /></p> - -<p>You can verify if your pipelines were successfully configured in the Jenkins Seed Job console output.</p> - -<p><img src="https://jenkinsci.github.io/kubernetes-operator/kubernetes-operator/img/jenkins-seed.png" alt="jenkins" /></p> - -<p>If your GitHub repository is <strong>private</strong> you have to configure SSH or username/password authentication.</p> - -<h3 id="ssh-authentication">SSH authentication</h3> - -<h4 id="generate-ssh-keys">Generate SSH Keys</h4> - -<p>There are two methods of SSH private key generation:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">$ openssl genrsa -out &lt;filename&gt; <span style="color:#0000cf;font-weight:bold">2048</span></code></pre></div> -<p>or</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">$ ssh-keygen -t rsa -b <span style="color:#0000cf;font-weight:bold">2048</span> -$ ssh-keygen -p -f &lt;filename&gt; -m pem</code></pre></div> -<p>Then copy content from generated file.</p> - -<h4 id="public-key">Public key</h4> - -<p>If you want to upload your public key to your Git server you need to extract it.</p> - -<p>If key was generated by <code>openssl</code> then you need to type this to extract public key:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">$ openssl rsa -in &lt;filename&gt; -pubout &gt; &lt;filename&gt;.pub</code></pre></div> -<p>If key was generated by <code>ssh-keygen</code> the public key content is located in <filename>.pub and there is no need to extract public key</p> - -<h4 id="configure-ssh-authentication">Configure SSH authentication</h4> - -<p>Configure a seed job like this:</p> -<pre><code>apiVersion: jenkins.io/v1alpha2 -kind: Jenkins -metadata: - name: example -spec: - seedJobs: - - id: jenkins-operator-ssh - credentialType: basicSSHUserPrivateKey - credentialID: k8s-ssh - targets: "cicd/jobs/*.jenkins" - description: "Jenkins Operator repository" - repositoryBranch: master - repositoryUrl: ssh://git@github.com:jenkinsci/kubernetes-operator.git</code></pre> -<p>and create a Kubernetes Secret (name of secret should be the same from <code>credentialID</code> field):</p> -<pre><code>apiVersion: v1 -kind: Secret -metadata: - name: k8s-ssh - labels: - "jenkins.io/credentials-type": "basicSSHUserPrivateKey" - annotations: - "jenkins.io/credentials-description" : "ssh github.com:jenkinsci/kubernetes-operator" -stringData: - privateKey: | - -----BEGIN RSA PRIVATE KEY----- - MIIJKAIBAAKCAgEAxxDpleJjMCN5nusfW/AtBAZhx8UVVlhhhIKXvQ+dFODQIdzO - oDXybs1zVHWOj31zqbbJnsfsVZ9Uf3p9k6xpJ3WFY9b85WasqTDN1xmSd6swD4N8 - ... - username: github_user_name</code></pre> -<h3 id="username-password-authentication">Username &amp; password authentication</h3> - -<p>Configure the seed job like:</p> -<pre><code>apiVersion: jenkins.io/v1alpha2 -kind: Jenkins -metadata: - name: example -spec: - seedJobs: - - id: jenkins-operator-user-pass - credentialType: usernamePassword - credentialID: k8s-user-pass - targets: "cicd/jobs/*.jenkins" - description: "Jenkins Operator repository" - repositoryBranch: master - repositoryUrl: https://github.com/jenkinsci/kubernetes-operator.git</code></pre> -<p>and create a Kubernetes Secret (name of secret should be the same from <code>credentialID</code> field):</p> -<pre><code>apiVersion: v1 -kind: Secret -metadata: - name: k8s-user-pass -stringData: - username: github_user_name - password: password_or_token</code></pre> -<h3 id="external-authentication">External authentication</h3> - -<p>You can use <code>external</code> credential type if you want to configure authentication using Configuration As Code or Groovy Script.</p> - -<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 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"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-master<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>env<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>CURL_OPTIONS<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-L<span style="color:#f8f8f8;text-decoration:underline"> </span>-x<span style="color:#f8f8f8;text-decoration:underline"> </span>&lt;proxy_url&gt;</code></pre></div> -<p>In <code>CURL_OPTIONS</code> var you can set additional arguments to <code>curl</code> command.</p> - -<h2 id="pulling-docker-images-from-private-repositories">Pulling Docker images from private repositories</h2> - -<p>To pull a Docker Image from private repository you can use <code>imagePullSecrets</code>.</p> - -<p>Please follow the instructions on <a href="https://kubernetes.io/docs/concepts/containers/images/?origin_team=T42NTAGHM#creating-a-secret-with-a-docker-config">creating a secret with a docker config</a>.</p> - -<h3 id="docker-hub-configuration">Docker Hub Configuration</h3> - -<p>To use Docker Hub additional steps are required.</p> - -<p>Edit the previously created secret:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl -n &lt;namespace&gt; edit secret &lt;name&gt;</code></pre></div> -<p>The <code>.dockerconfigjson</code> key&rsquo;s value needs to be replaced with a modified version.</p> - -<p>After modifications, it needs to be encoded as a Base64 value before setting the <code>.dockerconfigjson</code> key.</p> - -<p>Example config file to modify and use:</p> -<pre><code>{ - "auths":{ - "https://index.docker.io/v1/":{ - "username":"user", - "password":"password", - "email":"yourdockeremail@gmail.com", - "auth":"base64 of string user:password" - }, - "auth.docker.io":{ - "username":"user", - "password":"password", - "email":"yourdockeremail@gmail.com", - "auth":"base64 of string user:password" - }, - "registry.docker.io":{ - "username":"user", - "password":"password", - "email":"yourdockeremail@gmail.com", - "auth":"base64 of string user:password" - }, - "docker.io":{ - "username":"user", - "password":"password", - "email":"yourdockeremail@gmail.com", - "auth":"base64 of string user:password" - }, - "https://registry-1.docker.io/v2/": { - "username":"user", - "password":"password", - "email":"yourdockeremail@gmail.com", - "auth":"base64 of string user:password" - }, - "registry-1.docker.io/v2/": { - "username":"user", - "password":"password", - "email":"yourdockeremail@gmail.com", - "auth":"base64 of string user:password" - }, - "registry-1.docker.io": { - "username":"user", - "password":"password", - "email":"yourdockeremail@gmail.com", - "auth":"base64 of string user:password" - }, - "https://registry-1.docker.io": { - "username":"user", - "password":"password", - "email":"yourdockeremail@gmail.com", - "auth":"base64 of string user:password" - } - } -}</code></pre> - - - - - Docs: Configuration - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.3.x/configuration/ - Fri, 20 Dec 2019 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.3.x/configuration/ - - - - - -<h2 id="configure-seed-jobs-and-pipelines">Configure Seed Jobs and Pipelines</h2> - -<p>Jenkins operator uses <a href="https://github.com/jenkinsci/job-dsl-plugin">job-dsl</a> and <a href="https://jenkinsci.github.io/kubernetes-credentials-provider-plugin/">kubernetes-credentials-provider</a> plugins for configuring jobs -and deploy keys.</p> - -<h2 id="prepare-job-definitions-and-pipelines">Prepare job definitions and pipelines</h2> - -<p>First you have to prepare pipelines and job definition in your GitHub repository using the following structure:</p> -<pre><code>cicd/ -├── jobs -│   └── build.jenkins -└── pipelines - └── build.jenkins</code></pre> -<p><strong><code>cicd/jobs/build.jenkins</code></strong> is a job definition:</p> -<pre><code>#!/usr/bin/env groovy - -pipelineJob('build-jenkins-operator') { - displayName('Build jenkins-operator') - - definition { - cpsScm { - scm { - git { - remote { - url('https://github.com/jenkinsci/kubernetes-operator.git') - credentials('jenkins-operator') - } - branches('*/master') - } - } - scriptPath('cicd/pipelines/build.jenkins') - } - } -}</code></pre> -<p><strong><code>cicd/pipelines/build.jenkins</code></strong> is an actual Jenkins pipeline:</p> -<pre><code>#!/usr/bin/env groovy - -def label = "build-jenkins-operator-${UUID.randomUUID().toString()}" -def home = "/home/jenkins" -def workspace = "${home}/workspace/build-jenkins-operator" -def workdir = "${workspace}/src/github.com/jenkinsci/kubernetes-operator/" - -podTemplate(label: label, - containers: [ - containerTemplate(name: 'jnlp', image: 'jenkins/inbound-agent:alpine'), - containerTemplate(name: 'go', image: 'golang:1-alpine', command: 'cat', ttyEnabled: true), - ], - envVars: [ - envVar(key: 'GOPATH', value: workspace), - ], - ) { - - node(label) { - dir(workdir) { - stage('Init') { - timeout(time: 3, unit: 'MINUTES') { - checkout scm - } - container('go') { - sh 'apk --no-cache --update add make git gcc libc-dev' - } - } - - stage('Dep') { - container('go') { - sh 'make dep' - } - } - - stage('Test') { - container('go') { - sh 'make test' - } - } - - stage('Build') { - container('go') { - sh 'make build' - } - } - } - } -}</code></pre> -<h2 id="configure-seed-jobs">Configure Seed Jobs</h2> - -<p>Jenkins Seed Jobs are configured using <code>Jenkins.spec.seedJobs</code> section from your custom resource manifest:</p> -<pre><code>apiVersion: jenkins.io/v1alpha2 -kind: Jenkins -metadata: - name: example -spec: - seedJobs: - - id: jenkins-operator - targets: "cicd/jobs/*.jenkins" - description: "Jenkins Operator repository" - repositoryBranch: master - repositoryUrl: https://github.com/jenkinsci/kubernetes-operator.git</code></pre> -<p><strong>Jenkins Operator</strong> will automatically discover and configure all the seed jobs.</p> - -<p>You can verify if deploy keys were successfully configured in the Jenkins <strong>Credentials</strong> tab.</p> - -<p><img src="https://jenkinsci.github.io/kubernetes-operator/kubernetes-operator/img/jenkins-credentials.png" alt="jenkins" /></p> - -<p>You can verify if your pipelines were successfully configured in the Jenkins Seed Job console output.</p> - -<p><img src="https://jenkinsci.github.io/kubernetes-operator/kubernetes-operator/img/jenkins-seed.png" alt="jenkins" /></p> - -<p>If your GitHub repository is <strong>private</strong> you have to configure SSH or username/password authentication.</p> - -<h3 id="ssh-authentication">SSH authentication</h3> - -<h4 id="generate-ssh-keys">Generate SSH Keys</h4> - -<p>There are two methods of SSH private key generation:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">$ openssl genrsa -out &lt;filename&gt; <span style="color:#0000cf;font-weight:bold">2048</span></code></pre></div> -<p>or</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">$ ssh-keygen -t rsa -b <span style="color:#0000cf;font-weight:bold">2048</span> -$ ssh-keygen -p -f &lt;filename&gt; -m pem</code></pre></div> -<p>Then copy content from generated file.</p> - -<h4 id="public-key">Public key</h4> - -<p>If you want to upload your public key to your Git server you need to extract it.</p> - -<p>If key was generated by <code>openssl</code> then you need to type this to extract public key:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">$ openssl rsa -in &lt;filename&gt; -pubout &gt; &lt;filename&gt;.pub</code></pre></div> -<p>If key was generated by <code>ssh-keygen</code> the public key content is located in <filename>.pub and there is no need to extract public key</p> - -<h4 id="configure-ssh-authentication">Configure SSH authentication</h4> - -<p>Configure a seed job like this:</p> -<pre><code>apiVersion: jenkins.io/v1alpha2 -kind: Jenkins -metadata: - name: example -spec: - seedJobs: - - id: jenkins-operator-ssh - credentialType: basicSSHUserPrivateKey - credentialID: k8s-ssh - targets: "cicd/jobs/*.jenkins" - description: "Jenkins Operator repository" - repositoryBranch: master - repositoryUrl: ssh://git@github.com:jenkinsci/kubernetes-operator.git</code></pre> -<p>and create a Kubernetes Secret (name of secret should be the same from <code>credentialID</code> field):</p> -<pre><code>apiVersion: v1 -kind: Secret -metadata: - name: k8s-ssh -stringData: - privateKey: | - -----BEGIN RSA PRIVATE KEY----- - MIIJKAIBAAKCAgEAxxDpleJjMCN5nusfW/AtBAZhx8UVVlhhhIKXvQ+dFODQIdzO - oDXybs1zVHWOj31zqbbJnsfsVZ9Uf3p9k6xpJ3WFY9b85WasqTDN1xmSd6swD4N8 - ... - username: github_user_name</code></pre> -<h3 id="username-password-authentication">Username &amp; password authentication</h3> - -<p>Configure the seed job like:</p> -<pre><code>apiVersion: jenkins.io/v1alpha2 -kind: Jenkins -metadata: - name: example -spec: - seedJobs: - - id: jenkins-operator-user-pass - credentialType: usernamePassword - credentialID: k8s-user-pass - targets: "cicd/jobs/*.jenkins" - description: "Jenkins Operator repository" - repositoryBranch: master - repositoryUrl: https://github.com/jenkinsci/kubernetes-operator.git</code></pre> -<p>and create a Kubernetes Secret (name of secret should be the same from <code>credentialID</code> field):</p> -<pre><code>apiVersion: v1 -kind: Secret -metadata: - name: k8s-user-pass -stringData: - username: github_user_name - password: password_or_token</code></pre> -<h2 id="http-proxy-for-downloading-plugins">HTTP Proxy for downloading plugins</h2> - -<p>To use forwarding proxy with an operator to download plugins you need to add the following environment variable to Jenkins 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"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-master<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>env<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>CURL_OPTIONS<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-L<span style="color:#f8f8f8;text-decoration:underline"> </span>-x<span style="color:#f8f8f8;text-decoration:underline"> </span>&lt;proxy_url&gt;</code></pre></div> -<p>In <code>CURL_OPTIONS</code> var you can set additional arguments to <code>curl</code> command.</p> - -<h2 id="pulling-docker-images-from-private-repositories">Pulling Docker images from private repositories</h2> - -<p>To pull a Docker Image from private repository you can use <code>imagePullSecrets</code>.</p> - -<p>Please follow the instructions on <a href="https://kubernetes.io/docs/concepts/containers/images/?origin_team=T42NTAGHM#creating-a-secret-with-a-docker-config">creating a secret with a docker config</a>.</p> - -<h3 id="docker-hub-configuration">Docker Hub Configuration</h3> - -<p>To use Docker Hub additional steps are required.</p> - -<p>Edit the previously created secret:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl -n &lt;namespace&gt; edit secret &lt;name&gt;</code></pre></div> -<p>The <code>.dockerconfigjson</code> key&rsquo;s value needs to be replaced with a modified version.</p> - -<p>After modifications, it needs to be encoded as a Base64 value before setting the <code>.dockerconfigjson</code> key.</p> - -<p>Example config file to modify and use:</p> -<pre><code>{ - "auths":{ - "https://index.docker.io/v1/":{ - "username":"user", - "password":"password", - "email":"yourdockeremail@gmail.com", - "auth":"base64 of string user:password" - }, - "auth.docker.io":{ - "username":"user", - "password":"password", - "email":"yourdockeremail@gmail.com", - "auth":"base64 of string user:password" - }, - "registry.docker.io":{ - "username":"user", - "password":"password", - "email":"yourdockeremail@gmail.com", - "auth":"base64 of string user:password" - }, - "docker.io":{ - "username":"user", - "password":"password", - "email":"yourdockeremail@gmail.com", - "auth":"base64 of string user:password" - }, - "https://registry-1.docker.io/v2/": { - "username":"user", - "password":"password", - "email":"yourdockeremail@gmail.com", - "auth":"base64 of string user:password" - }, - "registry-1.docker.io/v2/": { - "username":"user", - "password":"password", - "email":"yourdockeremail@gmail.com", - "auth":"base64 of string user:password" - }, - "registry-1.docker.io": { - "username":"user", - "password":"password", - "email":"yourdockeremail@gmail.com", - "auth":"base64 of string user:password" - }, - "https://registry-1.docker.io": { - "username":"user", - "password":"password", - "email":"yourdockeremail@gmail.com", - "auth":"base64 of string user:password" - } - } -}</code></pre> - - - - - Docs: Configuration - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.2.x/configuration/ - Mon, 05 Aug 2019 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.2.x/configuration/ - - - - - -<h2 id="configure-seed-jobs-and-pipelines">Configure Seed Jobs and Pipelines</h2> - -<p>Jenkins operator uses <a href="https://github.com/jenkinsci/job-dsl-plugin">job-dsl</a> and <a href="https://jenkinsci.github.io/kubernetes-credentials-provider-plugin/">kubernetes-credentials-provider</a> plugins for configuring jobs -and deploy keys.</p> - -<h2 id="prepare-job-definitions-and-pipelines">Prepare job definitions and pipelines</h2> - -<p>First you have to prepare pipelines and job definition in your GitHub repository using the following structure:</p> -<pre><code>cicd/ -├── jobs -│   └── build.jenkins -└── pipelines - └── build.jenkins</code></pre> -<p><strong><code>cicd/jobs/build.jenkins</code></strong> is a job definition:</p> -<pre><code>#!/usr/bin/env groovy - -pipelineJob('build-jenkins-operator') { - displayName('Build jenkins-operator') - - definition { - cpsScm { - scm { - git { - remote { - url('https://github.com/jenkinsci/kubernetes-operator.git') - credentials('jenkins-operator') - } - branches('*/master') - } - } - scriptPath('cicd/pipelines/build.jenkins') - } - } -}</code></pre> -<p><strong><code>cicd/pipelines/build.jenkins</code></strong> is an actual Jenkins pipeline:</p> -<pre><code>#!/usr/bin/env groovy - -def label = "build-jenkins-operator-${UUID.randomUUID().toString()}" -def home = "/home/jenkins" -def workspace = "${home}/workspace/build-jenkins-operator" -def workdir = "${workspace}/src/github.com/jenkinsci/kubernetes-operator/" - -podTemplate(label: label, - containers: [ - containerTemplate(name: 'jnlp', image: 'jenkins/inbound-agent:alpine'), - containerTemplate(name: 'go', image: 'golang:1-alpine', command: 'cat', ttyEnabled: true), - ], - envVars: [ - envVar(key: 'GOPATH', value: workspace), - ], - ) { - - node(label) { - dir(workdir) { - stage('Init') { - timeout(time: 3, unit: 'MINUTES') { - checkout scm - } - container('go') { - sh 'apk --no-cache --update add make git gcc libc-dev' - } - } - - stage('Dep') { - container('go') { - sh 'make dep' - } - } - - stage('Test') { - container('go') { - sh 'make test' - } - } - - stage('Build') { - container('go') { - sh 'make build' - } - } - } - } -}</code></pre> -<h2 id="configure-seed-jobs">Configure Seed Jobs</h2> - -<p>Jenkins Seed Jobs are configured using <code>Jenkins.spec.seedJobs</code> section from your custom resource manifest:</p> -<pre><code>apiVersion: jenkins.io/v1alpha2 -kind: Jenkins -metadata: - name: example -spec: - seedJobs: - - id: jenkins-operator - targets: "cicd/jobs/*.jenkins" - description: "Jenkins Operator repository" - repositoryBranch: master - repositoryUrl: https://github.com/jenkinsci/kubernetes-operator.git</code></pre> -<p><strong>Jenkins Operator</strong> will automatically discover and configure all the seed jobs.</p> - -<p>You can verify if deploy keys were successfully configured in the Jenkins <strong>Credentials</strong> tab.</p> - -<p><img src="https://jenkinsci.github.io/kubernetes-operator/kubernetes-operator/img/jenkins-credentials.png" alt="jenkins" /></p> - -<p>You can verify if your pipelines were successfully configured in the Jenkins Seed Job console output.</p> - -<p><img src="https://jenkinsci.github.io/kubernetes-operator/kubernetes-operator/img/jenkins-seed.png" alt="jenkins" /></p> - -<p>If your GitHub repository is <strong>private</strong> you have to configure SSH or username/password authentication.</p> - -<h3 id="ssh-authentication">SSH authentication</h3> - -<h4 id="generate-ssh-keys">Generate SSH Keys</h4> - -<p>There are two methods of SSH private key generation:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">$ openssl genrsa -out &lt;filename&gt; <span style="color:#0000cf;font-weight:bold">2048</span></code></pre></div> -<p>or</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">$ ssh-keygen -t rsa -b <span style="color:#0000cf;font-weight:bold">2048</span> -$ ssh-keygen -p -f &lt;filename&gt; -m pem</code></pre></div> -<p>Then copy content from generated file.</p> - -<h4 id="public-key">Public key</h4> - -<p>If you want to upload your public key to your Git server you need to extract it.</p> - -<p>If key was generated by <code>openssl</code> then you need to type this to extract public key:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">$ openssl rsa -in &lt;filename&gt; -pubout &gt; &lt;filename&gt;.pub</code></pre></div> -<p>If key was generated by <code>ssh-keygen</code> the public key content is located in <filename>.pub and there is no need to extract public key</p> - -<h4 id="configure-ssh-authentication">Configure SSH authentication</h4> - -<p>Configure a seed job like this:</p> -<pre><code>apiVersion: jenkins.io/v1alpha2 -kind: Jenkins -metadata: - name: example -spec: - seedJobs: - - id: jenkins-operator-ssh - credentialType: basicSSHUserPrivateKey - credentialID: k8s-ssh - targets: "cicd/jobs/*.jenkins" - description: "Jenkins Operator repository" - repositoryBranch: master - repositoryUrl: git@github.com:jenkinsci/kubernetes-operator.git</code></pre> -<p>and create a Kubernetes Secret (name of secret should be the same from <code>credentialID</code> field):</p> -<pre><code>apiVersion: v1 -kind: Secret -metadata: - name: k8s-ssh -stringData: - privateKey: | - -----BEGIN RSA PRIVATE KEY----- - MIIJKAIBAAKCAgEAxxDpleJjMCN5nusfW/AtBAZhx8UVVlhhhIKXvQ+dFODQIdzO - oDXybs1zVHWOj31zqbbJnsfsVZ9Uf3p9k6xpJ3WFY9b85WasqTDN1xmSd6swD4N8 - ... - username: github_user_name</code></pre> -<h3 id="username-password-authentication">Username &amp; password authentication</h3> - -<p>Configure the seed job like:</p> -<pre><code>apiVersion: jenkins.io/v1alpha2 -kind: Jenkins -metadata: - name: example -spec: - seedJobs: - - id: jenkins-operator-user-pass - credentialType: usernamePassword - credentialID: k8s-user-pass - targets: "cicd/jobs/*.jenkins" - description: "Jenkins Operator repository" - repositoryBranch: master - repositoryUrl: https://github.com/jenkinsci/kubernetes-operator.git</code></pre> -<p>and create a Kubernetes Secret (name of secret should be the same from <code>credentialID</code> field):</p> -<pre><code>apiVersion: v1 -kind: Secret -metadata: - name: k8s-user-pass -stringData: - username: github_user_name - password: password_or_token</code></pre> -<h2 id="http-proxy-for-downloading-plugins">HTTP Proxy for downloading plugins</h2> - -<p>To use forwarding proxy with an operator to download plugins you need to add the following environment variable to Jenkins 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"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-master<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>env<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>CURL_OPTIONS<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-L<span style="color:#f8f8f8;text-decoration:underline"> </span>-x<span style="color:#f8f8f8;text-decoration:underline"> </span>&lt;proxy_url&gt;</code></pre></div> -<p>In <code>CURL_OPTIONS</code> var you can set additional arguments to <code>curl</code> command.</p> - -<h2 id="pulling-docker-images-from-private-repositories">Pulling Docker images from private repositories</h2> - -<p>To pull a Docker Image from private repository you can use <code>imagePullSecrets</code>.</p> - -<p>Please follow the instructions on <a href="https://kubernetes.io/docs/concepts/containers/images/?origin_team=T42NTAGHM#creating-a-secret-with-a-docker-config">creating a secret with a docker config</a>.</p> - -<h3 id="docker-hub-configuration">Docker Hub Configuration</h3> - -<p>To use Docker Hub additional steps are required.</p> - -<p>Edit the previously created secret:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl -n &lt;namespace&gt; edit secret &lt;name&gt;</code></pre></div> -<p>The <code>.dockerconfigjson</code> key&rsquo;s value needs to be replaced with a modified version.</p> - -<p>After modifications, it needs to be encoded as a Base64 value before setting the <code>.dockerconfigjson</code> key.</p> - -<p>Example config file to modify and use:</p> -<pre><code>{ - "auths":{ - "https://index.docker.io/v1/":{ - "username":"user", - "password":"password", - "email":"yourdockeremail@gmail.com", - "auth":"base64 of string user:password" - }, - "auth.docker.io":{ - "username":"user", - "password":"password", - "email":"yourdockeremail@gmail.com", - "auth":"base64 of string user:password" - }, - "registry.docker.io":{ - "username":"user", - "password":"password", - "email":"yourdockeremail@gmail.com", - "auth":"base64 of string user:password" - }, - "docker.io":{ - "username":"user", - "password":"password", - "email":"yourdockeremail@gmail.com", - "auth":"base64 of string user:password" - }, - "https://registry-1.docker.io/v2/": { - "username":"user", - "password":"password", - "email":"yourdockeremail@gmail.com", - "auth":"base64 of string user:password" - }, - "registry-1.docker.io/v2/": { - "username":"user", - "password":"password", - "email":"yourdockeremail@gmail.com", - "auth":"base64 of string user:password" - }, - "registry-1.docker.io": { - "username":"user", - "password":"password", - "email":"yourdockeremail@gmail.com", - "auth":"base64 of string user:password" - }, - "https://registry-1.docker.io": { - "username":"user", - "password":"password", - "email":"yourdockeremail@gmail.com", - "auth":"base64 of string user:password" - } - } -}</code></pre> - - - - - Docs: Customizing Jenkins - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/customizing-jenkins/ - Wed, 08 Dec 2021 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/customizing-jenkins/ - - - - - -<h2 id="how-to-customize-jenkins">How to customize Jenkins</h2> - -<p>Jenkins can be customized with plugins. -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:</p> - -<ul> -<li>configuration-as-code v1.55</li> -<li>git v4.10.0</li> -<li>job-dsl v1.78.1</li> -<li>kubernetes-credentials-provider v0.20</li> -<li>kubernetes v1.30.11</li> -<li>workflow-aggregator v2.6</li> -<li>workflow-job v2.42</li> -</ul> - -<p>Rest of the plugins can be found in <a href="https://plugins.jenkins.io/">plugins repository</a>.</p> - -<h4 id="install-plugins">Install plugins</h4> - -<p>Edit Custom Resource under <code>spec.master.plugins</code>:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.io/v1alpha2<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>example<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>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>plugins<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>simple-theme-plugin<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;0.7&#34;</span></code></pre></div> -<p>Under <code>spec.master.basePlugins</code> you can find plugins for a valid <strong>Jenkins Operator</strong>:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.io/v1alpha2<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>example<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>master<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>basePlugins<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>kubernetes<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;1.30.11&#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.42&#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.10.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>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.78.1&#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.55&#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.20&#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> - -<h4 id="apply-plugin-s-config">Apply plugin&rsquo;s config</h4> - -<p>By using a <a href="https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/">ConfigMap</a> you can create your own <strong>Jenkins</strong> customized configuration. -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>Create a <strong><code>ConfigMap</code></strong> with specific name (eg. <code>jenkins-operator-user-configuration</code>). Then, modify the <strong>Jenkins</strong> manifest:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.io/v1alpha2<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>example<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurationAsCode<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurations<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-user-configuration<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>groovyScripts<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurations<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-user-configuration</code></pre></div> -<p>Here is an example of <code>jenkins-operator-user-configuration</code>:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>v1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>ConfigMap<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-user-configuration<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>data<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>-configure-theme.groovy<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">| -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">import jenkins.*</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.model.*<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>hudson.*<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>hudson.model.*<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>org.jenkinsci.plugins.simpletheme.ThemeElement<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>org.jenkinsci.plugins.simpletheme.CssTextThemeElement<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>org.jenkinsci.plugins.simpletheme.CssUrlThemeElement<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins<span style="color:#f8f8f8;text-decoration:underline"> </span>=<span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins.getInstance()<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>def<span style="color:#f8f8f8;text-decoration:underline"> </span>decorator<span style="color:#f8f8f8;text-decoration:underline"> </span>=<span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins.instance.getDescriptorByType(org.codefirst.SimpleThemeDecorator.class)<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>List&lt;ThemeElement&gt;<span style="color:#f8f8f8;text-decoration:underline"> </span>configElements<span style="color:#f8f8f8;text-decoration:underline"> </span>=<span style="color:#f8f8f8;text-decoration:underline"> </span>new<span style="color:#f8f8f8;text-decoration:underline"> </span>ArrayList&lt;&gt;();<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configElements.add(new<span style="color:#f8f8f8;text-decoration:underline"> </span>CssTextThemeElement(<span style="color:#4e9a06">&#34;DEFAULT&#34;</span>));<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configElements.add(new<span style="color:#f8f8f8;text-decoration:underline"> </span>CssUrlThemeElement(<span style="color:#4e9a06">&#34;https://cdn.rawgit.com/afonsof/jenkins-material-theme/gh-pages/dist/material-light-green.css&#34;</span>));<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>decorator.setElements(configElements);<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>decorator.save();<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.save()<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>-system-message.yaml<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">| -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">jenkins:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>systemMessage<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Configuration as Code integration works!!!&#34;</span></code></pre></div> -<ul> -<li><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. -Jenkins will reconcile and apply the new configuration.</p> - -<h2 id="how-to-use-secrets-from-a-groovy-scripts">How to use secrets from a Groovy scripts</h2> - -<p>If you configured <code>spec.groovyScripts.secret.name</code>, then this secret is available to use from map Groovy scripts. -The secrets are loaded to <code>secrets</code> map.</p> - -<p>Create a <a href="https://kubernetes.io/docs/concepts/configuration/secret/">secret</a> with for example the name <code>jenkins-conf-secrets</code>.</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Secret<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>v1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>type<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Opaque<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-conf-secrets<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>namespace<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>default<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>data<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>SYSTEM_MESSAGE<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>SGVsbG8gd29ybGQ=</code></pre></div> -<p>Then modify the <strong>Jenkins</strong> pod manifest by changing <code>spec.groovyScripts.secret.name</code> to <code>jenkins-conf-secrets</code>.</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.io/v1alpha2<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>example<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurationAsCode<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurations<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-user-configuration<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>secret<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-conf-secrets<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>groovyScripts<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurations<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-user-configuration<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>secret<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-conf-secrets</code></pre></div> -<p>Now you can test that the secret is mounted by applying this <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"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-user-configuration<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>data<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>-system-message.groovy<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">| -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">import jenkins.*</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.model.*<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>hudson.*<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>hudson.model.*<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins<span style="color:#f8f8f8;text-decoration:underline"> </span>=<span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins.getInstance()<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.setSystemMessage(secrets<span style="color:#000;font-weight:bold">[</span><span style="color:#4e9a06">&#34;SYSTEM_MESSAGE&#34;</span><span style="color:#000;font-weight:bold">]</span>)<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.save()</code></pre></div> -<p>Or by applying this configuration as code:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>v1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>ConfigMap<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-user-configuration<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>data<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>-system-message.yaml<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">| -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">jenkins:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>systemMessage<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>${SYSTEM_MESSAGE}</code></pre></div> -<p>After this, you should see the <code>Hello world</code> system message from the <strong>Jenkins</strong> homepage.</p> - - - - - - Docs: Customizing Jenkins - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.6.x/customizing-jenkins/ - Wed, 08 Dec 2021 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.6.x/customizing-jenkins/ - - - - - -<h2 id="how-to-customize-jenkins">How to customize Jenkins</h2> - -<p>Jenkins can be customized with plugins. -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:</p> - -<ul> -<li>configuration-as-code v1.54</li> -<li>git v4.9.0</li> -<li>job-dsl v1.77</li> -<li>kubernetes-credentials-provider v0.20</li> -<li>kubernetes v1.30.04</li> -<li>workflow-aggregator v2.6</li> -<li>workflow-job v2.42</li> -</ul> - -<p>Rest of the plugins can be found in <a href="https://plugins.jenkins.io/">plugins repository</a>.</p> - -<h4 id="install-plugins">Install plugins</h4> - -<p>Edit Custom Resource under <code>spec.master.plugins</code>:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.io/v1alpha2<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>example<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>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>plugins<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>simple-theme-plugin<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;0.6&#34;</span></code></pre></div> -<p>Under <code>spec.master.basePlugins</code> you can find plugins for a valid <strong>Jenkins Operator</strong>:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.io/v1alpha2<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>example<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>master<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>basePlugins<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>kubernetes<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;1.30.04&#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.42&#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.9.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>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.54&#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.20&#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> - -<h4 id="apply-plugin-s-config">Apply plugin&rsquo;s config</h4> - -<p>By using a <a href="https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/">ConfigMap</a> you can create your own <strong>Jenkins</strong> customized configuration. -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>Create a <strong><code>ConfigMap</code></strong> with specific name (eg. <code>jenkins-operator-user-configuration</code>). Then, modify the <strong>Jenkins</strong> manifest:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.io/v1alpha2<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>example<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurationAsCode<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurations<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-user-configuration<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>groovyScripts<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurations<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-user-configuration</code></pre></div> -<p>Here is an example of <code>jenkins-operator-user-configuration</code>:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>v1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>ConfigMap<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-user-configuration<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>data<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>-configure-theme.groovy<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">| -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">import jenkins.*</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.model.*<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>hudson.*<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>hudson.model.*<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>org.jenkinsci.plugins.simpletheme.ThemeElement<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>org.jenkinsci.plugins.simpletheme.CssTextThemeElement<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>org.jenkinsci.plugins.simpletheme.CssUrlThemeElement<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins<span style="color:#f8f8f8;text-decoration:underline"> </span>=<span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins.getInstance()<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>def<span style="color:#f8f8f8;text-decoration:underline"> </span>decorator<span style="color:#f8f8f8;text-decoration:underline"> </span>=<span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins.instance.getDescriptorByType(org.codefirst.SimpleThemeDecorator.class)<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>List&lt;ThemeElement&gt;<span style="color:#f8f8f8;text-decoration:underline"> </span>configElements<span style="color:#f8f8f8;text-decoration:underline"> </span>=<span style="color:#f8f8f8;text-decoration:underline"> </span>new<span style="color:#f8f8f8;text-decoration:underline"> </span>ArrayList&lt;&gt;();<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configElements.add(new<span style="color:#f8f8f8;text-decoration:underline"> </span>CssTextThemeElement(<span style="color:#4e9a06">&#34;DEFAULT&#34;</span>));<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configElements.add(new<span style="color:#f8f8f8;text-decoration:underline"> </span>CssUrlThemeElement(<span style="color:#4e9a06">&#34;https://cdn.rawgit.com/afonsof/jenkins-material-theme/gh-pages/dist/material-light-green.css&#34;</span>));<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>decorator.setElements(configElements);<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>decorator.save();<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.save()<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>-system-message.yaml<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">| -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">jenkins:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>systemMessage<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Configuration as Code integration works!!!&#34;</span></code></pre></div> -<ul> -<li><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. -Jenkins will reconcile and apply the new configuration.</p> - -<h2 id="how-to-use-secrets-from-a-groovy-scripts">How to use secrets from a Groovy scripts</h2> - -<p>If you configured <code>spec.groovyScripts.secret.name</code>, then this secret is available to use from map Groovy scripts. -The secrets are loaded to <code>secrets</code> map.</p> - -<p>Create a <a href="https://kubernetes.io/docs/concepts/configuration/secret/">secret</a> with for example the name <code>jenkins-conf-secrets</code>.</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Secret<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>v1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>type<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Opaque<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-conf-secrets<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>namespace<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>default<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>data<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>SYSTEM_MESSAGE<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>SGVsbG8gd29ybGQ=</code></pre></div> -<p>Then modify the <strong>Jenkins</strong> pod manifest by changing <code>spec.groovyScripts.secret.name</code> to <code>jenkins-conf-secrets</code>.</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.io/v1alpha2<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>example<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurationAsCode<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurations<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-user-configuration<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>secret<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-conf-secrets<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>groovyScripts<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurations<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-user-configuration<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>secret<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-conf-secrets</code></pre></div> -<p>Now you can test that the secret is mounted by applying this <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"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-user-configuration<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>data<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>-system-message.groovy<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">| -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">import jenkins.*</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.model.*<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>hudson.*<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>hudson.model.*<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins<span style="color:#f8f8f8;text-decoration:underline"> </span>=<span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins.getInstance()<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.setSystemMessage(secrets<span style="color:#000;font-weight:bold">[</span><span style="color:#4e9a06">&#34;SYSTEM_MESSAGE&#34;</span><span style="color:#000;font-weight:bold">]</span>)<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.save()</code></pre></div> -<p>Or by applying this configuration as code:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>v1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>ConfigMap<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-user-configuration<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>data<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>-system-message.yaml<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">| -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">jenkins:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>systemMessage<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>${SYSTEM_MESSAGE}</code></pre></div> -<p>After this, you should see the <code>Hello world</code> system message from the <strong>Jenkins</strong> homepage.</p> - - - - - - Docs: Customization - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.5.x/customization/ - Fri, 01 Oct 2021 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.5.x/customization/ - - - - - -<h2 id="how-to-customize-jenkins">How to customize Jenkins</h2> - -<p>Jenkins can be customized with plugins. -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:</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> - -<h4 id="install-plugins">Install plugins</h4> - -<p>Edit Custom Resource under <code>spec.master.plugins</code>:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.io/v1alpha2<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>example<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>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>plugins<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>simple-theme-plugin<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;0.6&#34;</span></code></pre></div> -<p>Under <code>spec.master.basePlugins</code> you can find plugins for a valid <strong>Jenkins Operator</strong>:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.io/v1alpha2<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>example<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>master<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>basePlugins<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>kubernetes<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#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.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.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.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> - -<h4 id="apply-plugin-s-config">Apply plugin&rsquo;s config</h4> - -<p>By using a <a href="https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/">ConfigMap</a> you can create your own <strong>Jenkins</strong> customized configuration. -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>Create a <strong><code>ConfigMap</code></strong> with specific name (eg. <code>jenkins-operator-user-configuration</code>). Then, modify the <strong>Jenkins</strong> manifest:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.io/v1alpha2<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>example<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurationAsCode<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurations<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-user-configuration<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>groovyScripts<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurations<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-user-configuration</code></pre></div> -<p>Here is an example of <code>jenkins-operator-user-configuration</code>:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>v1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>ConfigMap<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-user-configuration<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>data<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>-configure-theme.groovy<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">| -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">import jenkins.*</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.model.*<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>hudson.*<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>hudson.model.*<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>org.jenkinsci.plugins.simpletheme.ThemeElement<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>org.jenkinsci.plugins.simpletheme.CssTextThemeElement<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>org.jenkinsci.plugins.simpletheme.CssUrlThemeElement<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins<span style="color:#f8f8f8;text-decoration:underline"> </span>=<span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins.getInstance()<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>def<span style="color:#f8f8f8;text-decoration:underline"> </span>decorator<span style="color:#f8f8f8;text-decoration:underline"> </span>=<span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins.instance.getDescriptorByType(org.codefirst.SimpleThemeDecorator.class)<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>List&lt;ThemeElement&gt;<span style="color:#f8f8f8;text-decoration:underline"> </span>configElements<span style="color:#f8f8f8;text-decoration:underline"> </span>=<span style="color:#f8f8f8;text-decoration:underline"> </span>new<span style="color:#f8f8f8;text-decoration:underline"> </span>ArrayList&lt;&gt;();<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configElements.add(new<span style="color:#f8f8f8;text-decoration:underline"> </span>CssTextThemeElement(<span style="color:#4e9a06">&#34;DEFAULT&#34;</span>));<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configElements.add(new<span style="color:#f8f8f8;text-decoration:underline"> </span>CssUrlThemeElement(<span style="color:#4e9a06">&#34;https://cdn.rawgit.com/afonsof/jenkins-material-theme/gh-pages/dist/material-light-green.css&#34;</span>));<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>decorator.setElements(configElements);<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>decorator.save();<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.save()<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>-system-message.yaml<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">| -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">jenkins:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>systemMessage<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Configuration as Code integration works!!!&#34;</span></code></pre></div> -<ul> -<li><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. -Jenkins will reconcile and apply the new configuration.</p> - -<h2 id="how-to-use-secrets-from-a-groovy-scripts">How to use secrets from a Groovy scripts</h2> - -<p>If you configured <code>spec.groovyScripts.secret.name</code>, then this secret is available to use from map Groovy scripts. -The secrets are loaded to <code>secrets</code> map.</p> - -<p>Create a <a href="https://kubernetes.io/docs/concepts/configuration/secret/">secret</a> with for example the name <code>jenkins-conf-secrets</code>.</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Secret<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>v1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>type<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Opaque<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-conf-secrets<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>namespace<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>default<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>data<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>SYSTEM_MESSAGE<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>SGVsbG8gd29ybGQ=</code></pre></div> -<p>Then modify the <strong>Jenkins</strong> pod manifest by changing <code>spec.groovyScripts.secret.name</code> to <code>jenkins-conf-secrets</code>.</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.io/v1alpha2<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>example<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurationAsCode<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurations<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-user-configuration<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>secret<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-conf-secrets<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>groovyScripts<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurations<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-user-configuration<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>secret<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-conf-secrets</code></pre></div> -<p>Now you can test that the secret is mounted by applying this <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"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-user-configuration<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>data<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>-system-message.groovy<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">| -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">import jenkins.*</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.model.*<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>hudson.*<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>hudson.model.*<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins<span style="color:#f8f8f8;text-decoration:underline"> </span>=<span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins.getInstance()<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.setSystemMessage(secrets<span style="color:#000;font-weight:bold">[</span><span style="color:#4e9a06">&#34;SYSTEM_MESSAGE&#34;</span><span style="color:#000;font-weight:bold">]</span>)<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.save()</code></pre></div> -<p>Or by applying this configuration as code:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>v1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>ConfigMap<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-user-configuration<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>data<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>-system-message.yaml<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">| -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">jenkins:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>systemMessage<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>${SYSTEM_MESSAGE}</code></pre></div> -<p>After this, you should see the <code>Hello world</code> system message from the <strong>Jenkins</strong> homepage.</p> - - - - - - Docs: Customization - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.4.x/customization/ - Mon, 13 Apr 2020 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.4.x/customization/ - - - - - -<h2 id="how-to-customize-jenkins">How to customize Jenkins</h2> - -<p>Jenkins can be customized with plugins. -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.38 -* git v4.2.2 -* job-dsl v1.77 -* kubernetes-credentials-provider v0.13 -* kubernetes v1.25.2 -* workflow-aggregator v2.6 -* workflow-job v2.38</p> - -<p>Rest of the plugins can be found in <a href="https://plugins.jenkins.io/">plugins repository</a>.</p> - -<h4 id="install-plugins">Install plugins</h4> - -<p>Edit Custom Resource under <code>spec.master.plugins</code>:</p> -<pre><code>apiVersion: jenkins.io/v1alpha2 -kind: Jenkins -metadata: - name: example -spec: - master: - plugins: - - name: simple-theme-plugin - version: 0.5.1</code></pre> -<p>Under <code>spec.master.basePlugins</code> you can find plugins for a valid <strong>Jenkins Operator</strong>:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.io/v1alpha2<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>example<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>master<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>basePlugins<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>kubernetes<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1.18</span><span style="color:#0000cf;font-weight:bold">.3</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>workflow-job<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;2.34&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>workflow-aggregator<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;2.6&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>git<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">3.12</span><span style="color:#0000cf;font-weight:bold">.0</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>job-dsl<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;1.76&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configuration-as-code<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;1.29&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>kubernetes-credentials-provider<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">0.12</span><span style="color:#0000cf;font-weight:bold">.1</span></code></pre></div> -<p>You can change their versions.</p> - -<p>The <strong>Jenkins Operator</strong> will then automatically install plugins after the Jenkins master pod restart.</p> - -<h4 id="apply-plugin-s-config">Apply plugin&rsquo;s config</h4> - -<p>By using a <a href="https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/">ConfigMap</a> you can create your own <strong>Jenkins</strong> customized configuration. -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>Create a <strong><code>ConfigMap</code></strong> with specific name (eg. <code>jenkins-operator-user-configuration</code>). Then, modify the <strong>Jenkins</strong> manifest:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.io/v1alpha2<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>example<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurationAsCode<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurations<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-user-configuration<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>groovyScripts<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurations<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-user-configuration</code></pre></div> -<p>Here is an example of <code>jenkins-operator-user-configuration</code>:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>v1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>ConfigMap<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-user-configuration<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>data<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>-configure-theme.groovy<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">| -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">import jenkins.*</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.model.*<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>hudson.*<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>hudson.model.*<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>org.jenkinsci.plugins.simpletheme.ThemeElement<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>org.jenkinsci.plugins.simpletheme.CssTextThemeElement<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>org.jenkinsci.plugins.simpletheme.CssUrlThemeElement<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins<span style="color:#f8f8f8;text-decoration:underline"> </span>=<span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins.getInstance()<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>def<span style="color:#f8f8f8;text-decoration:underline"> </span>decorator<span style="color:#f8f8f8;text-decoration:underline"> </span>=<span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins.instance.getDescriptorByType(org.codefirst.SimpleThemeDecorator.class)<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>List&lt;ThemeElement&gt;<span style="color:#f8f8f8;text-decoration:underline"> </span>configElements<span style="color:#f8f8f8;text-decoration:underline"> </span>=<span style="color:#f8f8f8;text-decoration:underline"> </span>new<span style="color:#f8f8f8;text-decoration:underline"> </span>ArrayList&lt;&gt;();<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configElements.add(new<span style="color:#f8f8f8;text-decoration:underline"> </span>CssTextThemeElement(<span style="color:#4e9a06">&#34;DEFAULT&#34;</span>));<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configElements.add(new<span style="color:#f8f8f8;text-decoration:underline"> </span>CssUrlThemeElement(<span style="color:#4e9a06">&#34;https://cdn.rawgit.com/afonsof/jenkins-material-theme/gh-pages/dist/material-light-green.css&#34;</span>));<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>decorator.setElements(configElements);<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>decorator.save();<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.save()<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>-system-message.yaml<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">| -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">jenkins:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>systemMessage<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Configuration as Code integration works!!!&#34;</span></code></pre></div> -<ul> -<li><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. -Jenkins will reconcile and apply the new configuration.</p> - -<h2 id="how-to-use-secrets-from-a-groovy-scripts">How to use secrets from a Groovy scripts</h2> - -<p>If you configured <code>spec.groovyScripts.secret.name</code>, then this secret is available to use from map Groovy scripts. -The secrets are loaded to <code>secrets</code> map.</p> - -<p>Create a <a href="https://kubernetes.io/docs/concepts/configuration/secret/">secret</a> with for example the name <code>jenkins-conf-secrets</code>.</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Secret<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>v1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>type<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Opaque<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-conf-secrets<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>namespace<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>default<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>data<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>SYSTEM_MESSAGE<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>SGVsbG8gd29ybGQ=</code></pre></div> -<p>Then modify the <strong>Jenkins</strong> pod manifest by changing <code>spec.groovyScripts.secret.name</code> to <code>jenkins-conf-secrets</code>.</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.io/v1alpha2<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>example<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurationAsCode<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurations<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-user-configuration<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>secret<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-conf-secrets<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>groovyScripts<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurations<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-user-configuration<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>secret<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-conf-secrets</code></pre></div> -<p>Now you can test that the secret is mounted by applying this <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"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-user-configuration<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>data<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>-system-message.groovy<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">| -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">import jenkins.*</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.model.*<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>hudson.*<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>hudson.model.*<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins<span style="color:#f8f8f8;text-decoration:underline"> </span>=<span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins.getInstance()<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.setSystemMessage(secrets<span style="color:#000;font-weight:bold">[</span><span style="color:#4e9a06">&#34;SYSTEM_MESSAGE&#34;</span><span style="color:#000;font-weight:bold">]</span>)<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.save()</code></pre></div> -<p>Or by applying this configuration as code:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>v1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>ConfigMap<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-user-configuration<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>data<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>-system-message.yaml<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">| -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">jenkins:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>systemMessage<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>${SYSTEM_MESSAGE}</code></pre></div> -<p>After this, you should see the <code>Hello world</code> system message from the <strong>Jenkins</strong> homepage.</p> - - - - - - Docs: Customization - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.3.x/customization/ - Fri, 20 Dec 2019 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.3.x/customization/ - - - - - -<p>Jenkins can be customized using groovy scripts or the <a href="https://github.com/jenkinsci/configuration-as-code-plugin">configuration as code plugin</a>. -By using a <a href="https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/">ConfigMap</a> you can create your own <strong>Jenkins</strong> customized configuration. -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 <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"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>example<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurationAsCode<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurations<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-user-configuration<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>groovyScripts<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurations<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-user-configuration</code></pre></div> -<p>Here is an example of <code>jenkins-operator-user-configuration</code>:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>v1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>ConfigMap<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-user-configuration<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>data<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>-configure-theme.groovy<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">| -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">import jenkins.*</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.model.*<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>hudson.*<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>hudson.model.*<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>org.jenkinsci.plugins.simpletheme.ThemeElement<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>org.jenkinsci.plugins.simpletheme.CssTextThemeElement<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>org.jenkinsci.plugins.simpletheme.CssUrlThemeElement<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins<span style="color:#f8f8f8;text-decoration:underline"> </span>=<span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins.getInstance()<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>def<span style="color:#f8f8f8;text-decoration:underline"> </span>decorator<span style="color:#f8f8f8;text-decoration:underline"> </span>=<span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins.instance.getDescriptorByType(org.codefirst.SimpleThemeDecorator.class)<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>List&lt;ThemeElement&gt;<span style="color:#f8f8f8;text-decoration:underline"> </span>configElements<span style="color:#f8f8f8;text-decoration:underline"> </span>=<span style="color:#f8f8f8;text-decoration:underline"> </span>new<span style="color:#f8f8f8;text-decoration:underline"> </span>ArrayList&lt;&gt;();<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configElements.add(new<span style="color:#f8f8f8;text-decoration:underline"> </span>CssTextThemeElement(<span style="color:#4e9a06">&#34;DEFAULT&#34;</span>));<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configElements.add(new<span style="color:#f8f8f8;text-decoration:underline"> </span>CssUrlThemeElement(<span style="color:#4e9a06">&#34;https://cdn.rawgit.com/afonsof/jenkins-material-theme/gh-pages/dist/material-light-green.css&#34;</span>));<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>decorator.setElements(configElements);<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>decorator.save();<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.save()<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>-system-message.yaml<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">| -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">jenkins:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>systemMessage<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Configuration as Code integration works!!!&#34;</span></code></pre></div> -<ul> -<li><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. -Jenkins will reconcile and apply the new configuration.</p> - -<h3 id="using-secrets-from-a-groovy-script">Using secrets from a Groovy script</h3> - -<p>If you configured <code>spec.groovyScripts.secret.name</code>, then this secret is available to use from map Groovy scripts. -The secrets are loaded to <code>secrets</code> map.</p> - -<p>Create a <a href="https://kubernetes.io/docs/concepts/configuration/secret/">secret</a> with for example the name <code>jenkins-conf-secrets</code>.</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Secret<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>v1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>type<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Opaque<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-conf-secrets<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>namespace<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>default<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>data<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>SYSTEM_MESSAGE<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>SGVsbG8gd29ybGQ=</code></pre></div> -<p>Then modify the <strong>Jenkins</strong> pod manifest by changing <code>spec.groovyScripts.secret.name</code> to <code>jenkins-conf-secrets</code>.</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.io/v1alpha2<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>example<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurationAsCode<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurations<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-user-configuration<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>secret<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-conf-secrets<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>groovyScripts<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurations<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-user-configuration<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>secret<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-conf-secrets</code></pre></div> -<p>Now you can test that the secret is mounted by applying this <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"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-user-configuration<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>data<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>-system-message.groovy<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">| -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">import jenkins.*</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.model.*<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>hudson.*<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>hudson.model.*<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins<span style="color:#f8f8f8;text-decoration:underline"> </span>=<span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins.getInstance()<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.setSystemMessage(secrets<span style="color:#000;font-weight:bold">[</span><span style="color:#4e9a06">&#34;SYSTEM_MESSAGE&#34;</span><span style="color:#000;font-weight:bold">]</span>)<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.save()</code></pre></div> -<p>Or by applying this configuration as code:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>v1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>ConfigMap<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-user-configuration<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>data<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>-system-message.yaml<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">| -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">jenkins:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>systemMessage<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>${SYSTEM_MESSAGE}</code></pre></div> -<p>After this, you should see the <code>Hello world</code> system message from the <strong>Jenkins</strong> homepage.</p> - -<h2 id="install-plugins">Install Plugins</h2> - -<p>Edit Custom Resource under <code>spec.master.plugins</code>:</p> -<pre><code>apiVersion: jenkins.io/v1alpha2 -kind: Jenkins -metadata: - name: example -spec: - master: - plugins: - - name: simple-theme-plugin - version: 0.5.1</code></pre> -<p>Under <code>spec.master.basePlugins</code> you can find plugins for a valid <strong>Jenkins Operator</strong>:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.io/v1alpha2<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>example<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>master<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>basePlugins<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>kubernetes<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1.18</span><span style="color:#0000cf;font-weight:bold">.3</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>workflow-job<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;2.34&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>workflow-aggregator<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;2.6&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>git<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">3.12</span><span style="color:#0000cf;font-weight:bold">.0</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>job-dsl<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;1.76&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configuration-as-code<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;1.29&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>kubernetes-credentials-provider<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">0.12</span><span style="color:#0000cf;font-weight:bold">.1</span></code></pre></div> -<p>You can change their versions.</p> - -<p>The <strong>Jenkins Operator</strong> will then automatically install plugins after the Jenkins master pod restarts.</p> - - - - - - Docs: Customization - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.1.x/customization/ - Mon, 05 Aug 2019 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.1.x/customization/ - - - - - -<p>Jenkins can be customized by using groovy scripts or the Jenkins Configuration as a Code Plugin. All custom configuration is stored in -the <strong>jenkins-operator-user-configuration-<cr_name></strong> ConfigMap, which is automatically created by the <strong>Jenkins Operator</strong>.</p> - -<p>The <strong>Jenkins Operator</strong> creates a <strong>jenkins-operator-user-configuration-<cr_name></strong> secret where the user can store sensitive -information used for custom configuration. If you have an entry in the secret named <code>PASSWORD</code> then you can use it in the -Jenkins Configuration as a Code Plugin as <code>adminAddress: &quot;${PASSWORD}&quot;</code>.</p> -<pre><code>kubectl get secret jenkins-operator-user-configuration-<cr_name> -o yaml - -kind: Secret -apiVersion: v1 -type: Opaque -metadata: - name: jenkins-operator-user-configuration-<cr_name> - namespace: default -data: - SECRET_JENKINS_ADMIN_ADDRESS: YXNkZgo=</code></pre><pre><code>kubectl get configmap jenkins-operator-user-configuration-<cr_name> -o yaml - -apiVersion: v1 -data: - 1-configure-theme.groovy: |2 - import jenkins.* - import jenkins.model.* - import hudson.* - import hudson.model.* - import org.jenkinsci.plugins.simpletheme.ThemeElement - import org.jenkinsci.plugins.simpletheme.CssTextThemeElement - import org.jenkinsci.plugins.simpletheme.CssUrlThemeElement - - Jenkins jenkins = Jenkins.getInstance() - - def decorator = Jenkins.instance.getDescriptorByType(org.codefirst.SimpleThemeDecorator.class) - - List<ThemeElement> configElements = new ArrayList<>(); - configElements.add(new CssTextThemeElement("DEFAULT")); - configElements.add(new CssUrlThemeElement("https://cdn.rawgit.com/afonsof/jenkins-material-theme/gh-pages/dist/material-light-green.css")); - decorator.setElements(configElements); - decorator.save(); - - jenkins.save() - 1-system-message.yaml: |2 - jenkins: - systemMessage: "Configuration as Code integration works!!!" - adminAddress: "${SECRET_JENKINS_ADMIN_ADDRESS}" -kind: ConfigMap -metadata: - name: jenkins-operator-user-configuration-<cr_name> - namespace: default</code></pre> -<p>When the <strong>jenkins-operator-user-configuration-<cr_name></strong> ConfigMap is updated, Jenkins automatically -runs the <strong>jenkins-operator-user-configuration</strong> Jenkins Job which executes all scripts, and then -runs the <strong>jenkins-operator-user-configuration-casc</strong> Jenkins Job which applies the Configuration as Code configuration.</p> - -<h2 id="install-plugins">Install Plugins</h2> - -<p>Edit CR under <code>spec.master.plugins</code>:</p> -<pre><code>apiVersion: jenkins.io/v1alpha2 -kind: Jenkins -metadata: - name: example -spec: - master: - plugins: - - name: simple-theme-plugin - version: 0.5.1</code></pre> -<p>Under <code>spec.master.basePlugins</code> you can find plugins for a valid <strong>Jenkins Operator</strong>:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.io/v1alpha2<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>example<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>master<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>basePlugins<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>kubernetes<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1.18</span><span style="color:#0000cf;font-weight:bold">.3</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>workflow-job<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;2.34&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>workflow-aggregator<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;2.6&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>git<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">3.12</span><span style="color:#0000cf;font-weight:bold">.0</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>job-dsl<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;1.76&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configuration-as-code<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;1.31&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>kubernetes-credentials-provider<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">0.12</span><span style="color:#0000cf;font-weight:bold">.1</span></code></pre></div> -<p>You can change their versions.</p> - -<p>The <strong>Jenkins Operator</strong> will then automatically install those plugins after the Jenkins master pod restart.</p> - - - - - - Docs: Customization - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.2.x/customization/ - Mon, 05 Aug 2019 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.2.x/customization/ - - - - - -<p>Jenkins can be customized using groovy scripts or the <a href="https://github.com/jenkinsci/configuration-as-code-plugin">configuration as code plugin</a>. -By using a <a href="https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/">ConfigMap</a> you can create your own <strong>Jenkins</strong> customized configuration. -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 <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"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>example<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurationAsCode<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurations<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-user-configuration<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>groovyScripts<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurations<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-user-configuration</code></pre></div> -<p>Here is an example of <code>jenkins-operator-user-configuration</code>:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>v1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>ConfigMap<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-user-configuration<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>data<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>-configure-theme.groovy<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">| -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">import jenkins.*</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.model.*<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>hudson.*<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>hudson.model.*<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>org.jenkinsci.plugins.simpletheme.ThemeElement<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>org.jenkinsci.plugins.simpletheme.CssTextThemeElement<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>org.jenkinsci.plugins.simpletheme.CssUrlThemeElement<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins<span style="color:#f8f8f8;text-decoration:underline"> </span>=<span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins.getInstance()<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>def<span style="color:#f8f8f8;text-decoration:underline"> </span>decorator<span style="color:#f8f8f8;text-decoration:underline"> </span>=<span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins.instance.getDescriptorByType(org.codefirst.SimpleThemeDecorator.class)<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>List&lt;ThemeElement&gt;<span style="color:#f8f8f8;text-decoration:underline"> </span>configElements<span style="color:#f8f8f8;text-decoration:underline"> </span>=<span style="color:#f8f8f8;text-decoration:underline"> </span>new<span style="color:#f8f8f8;text-decoration:underline"> </span>ArrayList&lt;&gt;();<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configElements.add(new<span style="color:#f8f8f8;text-decoration:underline"> </span>CssTextThemeElement(<span style="color:#4e9a06">&#34;DEFAULT&#34;</span>));<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configElements.add(new<span style="color:#f8f8f8;text-decoration:underline"> </span>CssUrlThemeElement(<span style="color:#4e9a06">&#34;https://cdn.rawgit.com/afonsof/jenkins-material-theme/gh-pages/dist/material-light-green.css&#34;</span>));<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>decorator.setElements(configElements);<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>decorator.save();<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.save()<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>-system-message.yaml<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">| -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">jenkins:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>systemMessage<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Configuration as Code integration works!!!&#34;</span></code></pre></div> -<ul> -<li><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. -Jenkins will reconcile and apply the new configuration.</p> - -<h3 id="using-secrets-from-a-groovy-script">Using secrets from a Groovy script</h3> - -<p>If you configured <code>spec.groovyScripts.secret.name</code>, then this secret is available to use from map Groovy scripts. -The secrets are loaded to <code>secrets</code> map.</p> - -<p>Create a <a href="https://kubernetes.io/docs/concepts/configuration/secret/">secret</a> with for example the name <code>jenkins-conf-secrets</code>.</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Secret<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>v1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>type<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Opaque<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-conf-secrets<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>namespace<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>default<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>data<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>SYSTEM_MESSAGE<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>SGVsbG8gd29ybGQ=</code></pre></div> -<p>Then modify the <strong>Jenkins</strong> pod manifest by changing <code>spec.groovyScripts.secret.name</code> to <code>jenkins-conf-secrets</code>.</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.io/v1alpha2<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>example<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurationAsCode<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurations<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-user-configuration<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>secret<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-conf-secrets<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>groovyScripts<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurations<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-user-configuration<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>secret<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-conf-secrets</code></pre></div> -<p>Now you can test that the secret is mounted by applying this <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"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-user-configuration<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>data<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>-system-message.groovy<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">| -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">import jenkins.*</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.model.*<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>hudson.*<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>hudson.model.*<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins<span style="color:#f8f8f8;text-decoration:underline"> </span>=<span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins.getInstance()<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.setSystemMessage(secrets<span style="color:#000;font-weight:bold">[</span><span style="color:#4e9a06">&#34;SYSTEM_MESSAGE&#34;</span><span style="color:#000;font-weight:bold">]</span>)<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.save()</code></pre></div> -<p>Or by applying this configuration as code:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>v1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>ConfigMap<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-user-configuration<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>data<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>-system-message.yaml<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">| -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">jenkins:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>systemMessage<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>${SYSTEM_MESSAGE}</code></pre></div> -<p>After this, you should see the <code>Hello world</code> system message from the <strong>Jenkins</strong> homepage.</p> - -<h2 id="install-plugins">Install Plugins</h2> - -<p>Edit Custom Resource under <code>spec.master.plugins</code>:</p> -<pre><code>apiVersion: jenkins.io/v1alpha2 -kind: Jenkins -metadata: - name: example -spec: - master: - plugins: - - name: simple-theme-plugin - version: 0.5.1</code></pre> -<p>Under <code>spec.master.basePlugins</code> you can find plugins for a valid <strong>Jenkins Operator</strong>:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.io/v1alpha2<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>example<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>master<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>basePlugins<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>kubernetes<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1.18</span><span style="color:#0000cf;font-weight:bold">.3</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>workflow-job<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;2.34&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>workflow-aggregator<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;2.6&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>git<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">3.12</span><span style="color:#0000cf;font-weight:bold">.0</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>job-dsl<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;1.76&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configuration-as-code<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;1.29&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>kubernetes-credentials-provider<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">0.12</span><span style="color:#0000cf;font-weight:bold">.1</span></code></pre></div> -<p>You can change their versions.</p> - -<p>The <strong>Jenkins Operator</strong> will then automatically install plugins after the Jenkins master pod restarts.</p> - - - - - - Docs: Configuring Seed Jobs and Pipelines - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configuring-seed-jobs-and-pipelines/ - Wed, 08 Dec 2021 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configuring-seed-jobs-and-pipelines/ - - - - - -<h2 id="configure-seed-jobs-and-pipelines">Configure Seed Jobs and Pipelines</h2> - -<p>Jenkins operator uses <a href="https://github.com/jenkinsci/job-dsl-plugin">job-dsl</a> and <a href="https://jenkinsci.github.io/kubernetes-credentials-provider-plugin/">kubernetes-credentials-provider</a> plugins for configuring jobs -and deploy keys.</p> - -<h2 id="prepare-job-definitions-and-pipelines">Prepare job definitions and pipelines</h2> - -<p>First you have to prepare pipelines and job definition in your GitHub repository using the following structure:</p> -<pre><code>cicd/ -├── jobs -│   └── k8s.jenkins -└── pipelines - └── k8s.jenkins</code></pre> -<p><strong><code>cicd/jobs/k8s.jenkins</code></strong> is a job definition:</p> -<pre><code>#!/usr/bin/env groovy - -pipelineJob('k8s-e2e') { - displayName('Kubernetes Plugin E2E Test') - - logRotator { - numToKeep(10) - daysToKeep(30) - } - - configure { project -> - project / 'properties' / 'org.jenkinsci.plugins.workflow.job.properties.DurabilityHintJobProperty' { - hint('PERFORMANCE_OPTIMIZED') - } - } - - definition { - cpsScm { - scm { - git { - remote { - url('https://github.com/jenkinsci/kubernetes-operator.git') - credentials('jenkins-operator') - } - branches('*/master') - } - } - scriptPath('cicd/pipelines/k8s.jenkins') - } - } -}</code></pre> -<p><strong><code>cicd/pipelines/k8s.jenkins</code></strong> is an actual Jenkins pipeline:</p> -<pre><code>#!/usr/bin/env groovy - -def label = "k8s-${UUID.randomUUID().toString()}" -def home = "/home/jenkins" -def workspace = "${home}/workspace/build-jenkins-operator" -def workdir = "${workspace}/src/github.com/jenkinsci/kubernetes-operator/" - -podTemplate(label: label, - containers: [ - containerTemplate(name: 'alpine', image: 'alpine:3.11', ttyEnabled: true, command: 'cat'), - ], - ) { - node(label) { - stage('Run shell') { - container('alpine') { - sh 'echo "hello world"' - } - } - } -}</code></pre> -<h2 id="configure-seed-jobs">Configure Seed Jobs</h2> - -<p>Jenkins Seed Jobs are configured using <code>Jenkins.spec.seedJobs</code> section from your custom resource manifest:</p> -<pre><code>apiVersion: jenkins.io/v1alpha2 -kind: Jenkins -metadata: - name: example -spec: - seedJobs: - - id: jenkins-operator - targets: "cicd/jobs/*.jenkins" - description: "Jenkins Operator repository" - repositoryBranch: master - repositoryUrl: https://github.com/jenkinsci/kubernetes-operator.git</code></pre> -<p><strong>Jenkins Operator</strong> will automatically discover and configure all the seed jobs.</p> - -<p>You can verify if deploy keys were successfully configured in the Jenkins <strong>Credentials</strong> tab.</p> - -<p><img src="https://jenkinsci.github.io/kubernetes-operator/kubernetes-operator/img/jenkins-credentials.png" alt="jenkins" /></p> - -<p>You can verify if your pipelines were successfully configured in the Jenkins Seed Job console output.</p> - -<p><img src="https://jenkinsci.github.io/kubernetes-operator/kubernetes-operator/img/jenkins-seed.png" alt="jenkins" /></p> - -<p>If your GitHub repository is <strong>private</strong> you have to configure SSH or username/password authentication.</p> - -<h3 id="ssh-authentication">SSH authentication</h3> - -<h4 id="generate-ssh-keys">Generate SSH Keys</h4> - -<p>There are two methods of SSH private key generation:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">$ openssl genrsa -out &lt;filename&gt; <span style="color:#0000cf;font-weight:bold">2048</span></code></pre></div> -<p>or</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">$ ssh-keygen -t rsa -b <span style="color:#0000cf;font-weight:bold">2048</span> -$ ssh-keygen -p -f &lt;filename&gt; -m pem</code></pre></div> -<p>Then copy content from generated file.</p> - -<h4 id="public-key">Public key</h4> - -<p>If you want to upload your public key to your Git server you need to extract it.</p> - -<p>If key was generated by <code>openssl</code> then you need to type this to extract public key:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">$ openssl rsa -in &lt;filename&gt; -pubout &gt; &lt;filename&gt;.pub</code></pre></div> -<p>If key was generated by <code>ssh-keygen</code> the public key content is located in <filename>.pub and there is no need to extract public key</p> - -<h4 id="configure-ssh-authentication">Configure SSH authentication</h4> - -<p>Configure a seed job like this:</p> -<pre><code>apiVersion: jenkins.io/v1alpha2 -kind: Jenkins -metadata: - name: example -spec: - seedJobs: - - id: jenkins-operator-ssh - credentialType: basicSSHUserPrivateKey - credentialID: k8s-ssh - targets: "cicd/jobs/*.jenkins" - description: "Jenkins Operator repository" - repositoryBranch: master - repositoryUrl: git@github.com:jenkinsci/kubernetes-operator.git</code></pre> -<p>and create a Kubernetes Secret (name of secret should be the same from <code>credentialID</code> field):</p> -<pre><code>apiVersion: v1 -kind: Secret -metadata: - name: k8s-ssh - labels: - "jenkins.io/credentials-type": "basicSSHUserPrivateKey" - annotations: - "jenkins.io/credentials-description" : "ssh github.com:jenkinsci/kubernetes-operator" -stringData: - privateKey: | - -----BEGIN RSA PRIVATE KEY----- - MIIJKAIBAAKCAgEAxxDpleJjMCN5nusfW/AtBAZhx8UVVlhhhIKXvQ+dFODQIdzO - oDXybs1zVHWOj31zqbbJnsfsVZ9Uf3p9k6xpJ3WFY9b85WasqTDN1xmSd6swD4N8 - ... - username: github_user_name</code></pre> -<h3 id="username-password-authentication">Username &amp; password authentication</h3> - -<p>Configure the seed job like:</p> -<pre><code>apiVersion: jenkins.io/v1alpha2 -kind: Jenkins -metadata: - name: example -spec: - seedJobs: - - id: jenkins-operator-user-pass - credentialType: usernamePassword - credentialID: k8s-user-pass - targets: "cicd/jobs/*.jenkins" - description: "Jenkins Operator repository" - repositoryBranch: master - repositoryUrl: https://github.com/jenkinsci/kubernetes-operator.git</code></pre> -<p>and create a Kubernetes Secret (name of secret should be the same from <code>credentialID</code> field):</p> -<pre><code>apiVersion: v1 -kind: Secret -metadata: - name: k8s-user-pass -stringData: - username: github_user_name - password: password_or_token</code></pre> -<h3 id="external-authentication">External authentication</h3> - -<p>You can use <code>external</code> credential type if you want to configure authentication using Configuration As Code or Groovy Script.</p> - -<p>Example:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.io/v1alpha2<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>example<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>seedJobs<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>id<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-external<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>credentialType<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>external<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>credentialID<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>k8s-external<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>targets<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;cicd/jobs/*.jenkins&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>description<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Jenkins Operator repository&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>repositoryBranch<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>master<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>repositoryUrl<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>https<span style="color:#000;font-weight:bold">:</span>//github.com/jenkinsci/kubernetes-operator.git</code></pre></div> -<p>Remember that <code>credentialID</code> must match the id of the credentials configured in Jenkins. Consult the -<a href="https://www.jenkins.io/doc/book/using/using-credentials/">Jenkins docs for using credentials</a> for details.</p> - -<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 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"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-master<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>env<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>CURL_OPTIONS<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-L<span style="color:#f8f8f8;text-decoration:underline"> </span>-x<span style="color:#f8f8f8;text-decoration:underline"> </span>&lt;proxy_url&gt;</code></pre></div> -<p>In <code>CURL_OPTIONS</code> var you can set additional arguments to <code>curl</code> command.</p> - -<h2 id="pulling-docker-images-from-private-repositories">Pulling Docker images from private repositories</h2> - -<p>To pull a Docker Image from private repository you can use <code>imagePullSecrets</code>.</p> - -<p>Please follow the instructions on <a href="https://kubernetes.io/docs/concepts/containers/images/?origin_team=T42NTAGHM#creating-a-secret-with-a-docker-config">creating a secret with a docker config</a>.</p> - -<h3 id="docker-hub-configuration">Docker Hub Configuration</h3> - -<p>To use Docker Hub additional steps are required.</p> - -<p>Edit the previously created secret:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl -n &lt;namespace&gt; edit secret &lt;name&gt;</code></pre></div> -<p>The <code>.dockerconfigjson</code> key&rsquo;s value needs to be replaced with a modified version.</p> - -<p>After modifications, it needs to be encoded as a Base64 value before setting the <code>.dockerconfigjson</code> key.</p> - -<p>Example config file to modify and use:</p> -<pre><code>{ - "auths":{ - "https://index.docker.io/v1/":{ - "username":"user", - "password":"password", - "email":"yourdockeremail@gmail.com", - "auth":"base64 of string user:password" - }, - "auth.docker.io":{ - "username":"user", - "password":"password", - "email":"yourdockeremail@gmail.com", - "auth":"base64 of string user:password" - }, - "registry.docker.io":{ - "username":"user", - "password":"password", - "email":"yourdockeremail@gmail.com", - "auth":"base64 of string user:password" - }, - "docker.io":{ - "username":"user", - "password":"password", - "email":"yourdockeremail@gmail.com", - "auth":"base64 of string user:password" - }, - "https://registry-1.docker.io/v2/": { - "username":"user", - "password":"password", - "email":"yourdockeremail@gmail.com", - "auth":"base64 of string user:password" - }, - "registry-1.docker.io/v2/": { - "username":"user", - "password":"password", - "email":"yourdockeremail@gmail.com", - "auth":"base64 of string user:password" - }, - "registry-1.docker.io": { - "username":"user", - "password":"password", - "email":"yourdockeremail@gmail.com", - "auth":"base64 of string user:password" - }, - "https://registry-1.docker.io": { - "username":"user", - "password":"password", - "email":"yourdockeremail@gmail.com", - "auth":"base64 of string user:password" - } - } -}</code></pre> - - - - - Docs: Configuring Seed Jobs and Pipelines - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.6.x/configuring-seed-jobs-and-pipelines/ - Wed, 08 Dec 2021 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.6.x/configuring-seed-jobs-and-pipelines/ - - - - - -<h2 id="configure-seed-jobs-and-pipelines">Configure Seed Jobs and Pipelines</h2> - -<p>Jenkins operator uses <a href="https://github.com/jenkinsci/job-dsl-plugin">job-dsl</a> and <a href="https://jenkinsci.github.io/kubernetes-credentials-provider-plugin/">kubernetes-credentials-provider</a> plugins for configuring jobs -and deploy keys.</p> - -<h2 id="prepare-job-definitions-and-pipelines">Prepare job definitions and pipelines</h2> - -<p>First you have to prepare pipelines and job definition in your GitHub repository using the following structure:</p> -<pre><code>cicd/ -├── jobs -│   └── k8s.jenkins -└── pipelines - └── k8s.jenkins</code></pre> -<p><strong><code>cicd/jobs/k8s.jenkins</code></strong> is a job definition:</p> -<pre><code>#!/usr/bin/env groovy - -pipelineJob('k8s-e2e') { - displayName('Kubernetes Plugin E2E Test') - - logRotator { - numToKeep(10) - daysToKeep(30) - } - - configure { project -> - project / 'properties' / 'org.jenkinsci.plugins.workflow.job.properties.DurabilityHintJobProperty' { - hint('PERFORMANCE_OPTIMIZED') - } - } - - definition { - cpsScm { - scm { - git { - remote { - url('https://github.com/jenkinsci/kubernetes-operator.git') - credentials('jenkins-operator') - } - branches('*/master') - } - } - scriptPath('cicd/pipelines/k8s.jenkins') - } - } -}</code></pre> -<p><strong><code>cicd/pipelines/k8s.jenkins</code></strong> is an actual Jenkins pipeline:</p> -<pre><code>#!/usr/bin/env groovy - -def label = "k8s-${UUID.randomUUID().toString()}" -def home = "/home/jenkins" -def workspace = "${home}/workspace/build-jenkins-operator" -def workdir = "${workspace}/src/github.com/jenkinsci/kubernetes-operator/" - -podTemplate(label: label, - containers: [ - containerTemplate(name: 'alpine', image: 'alpine:3.11', ttyEnabled: true, command: 'cat'), - ], - ) { - node(label) { - stage('Run shell') { - container('alpine') { - sh 'echo "hello world"' - } - } - } -}</code></pre> -<h2 id="configure-seed-jobs">Configure Seed Jobs</h2> - -<p>Jenkins Seed Jobs are configured using <code>Jenkins.spec.seedJobs</code> section from your custom resource manifest:</p> -<pre><code>apiVersion: jenkins.io/v1alpha2 -kind: Jenkins -metadata: - name: example -spec: - seedJobs: - - id: jenkins-operator - targets: "cicd/jobs/*.jenkins" - description: "Jenkins Operator repository" - repositoryBranch: master - repositoryUrl: https://github.com/jenkinsci/kubernetes-operator.git</code></pre> -<p><strong>Jenkins Operator</strong> will automatically discover and configure all the seed jobs.</p> - -<p>You can verify if deploy keys were successfully configured in the Jenkins <strong>Credentials</strong> tab.</p> - -<p><img src="https://jenkinsci.github.io/kubernetes-operator/kubernetes-operator/img/jenkins-credentials.png" alt="jenkins" /></p> - -<p>You can verify if your pipelines were successfully configured in the Jenkins Seed Job console output.</p> - -<p><img src="https://jenkinsci.github.io/kubernetes-operator/kubernetes-operator/img/jenkins-seed.png" alt="jenkins" /></p> - -<p>If your GitHub repository is <strong>private</strong> you have to configure SSH or username/password authentication.</p> - -<h3 id="ssh-authentication">SSH authentication</h3> - -<h4 id="generate-ssh-keys">Generate SSH Keys</h4> - -<p>There are two methods of SSH private key generation:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">$ openssl genrsa -out &lt;filename&gt; <span style="color:#0000cf;font-weight:bold">2048</span></code></pre></div> -<p>or</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">$ ssh-keygen -t rsa -b <span style="color:#0000cf;font-weight:bold">2048</span> -$ ssh-keygen -p -f &lt;filename&gt; -m pem</code></pre></div> -<p>Then copy content from generated file.</p> - -<h4 id="public-key">Public key</h4> - -<p>If you want to upload your public key to your Git server you need to extract it.</p> - -<p>If key was generated by <code>openssl</code> then you need to type this to extract public key:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">$ openssl rsa -in &lt;filename&gt; -pubout &gt; &lt;filename&gt;.pub</code></pre></div> -<p>If key was generated by <code>ssh-keygen</code> the public key content is located in <filename>.pub and there is no need to extract public key</p> - -<h4 id="configure-ssh-authentication">Configure SSH authentication</h4> - -<p>Configure a seed job like this:</p> -<pre><code>apiVersion: jenkins.io/v1alpha2 -kind: Jenkins -metadata: - name: example -spec: - seedJobs: - - id: jenkins-operator-ssh - credentialType: basicSSHUserPrivateKey - credentialID: k8s-ssh - targets: "cicd/jobs/*.jenkins" - description: "Jenkins Operator repository" - repositoryBranch: master - repositoryUrl: git@github.com:jenkinsci/kubernetes-operator.git</code></pre> -<p>and create a Kubernetes Secret (name of secret should be the same from <code>credentialID</code> field):</p> -<pre><code>apiVersion: v1 -kind: Secret -metadata: - name: k8s-ssh - labels: - "jenkins.io/credentials-type": "basicSSHUserPrivateKey" - annotations: - "jenkins.io/credentials-description" : "ssh github.com:jenkinsci/kubernetes-operator" -stringData: - privateKey: | - -----BEGIN RSA PRIVATE KEY----- - MIIJKAIBAAKCAgEAxxDpleJjMCN5nusfW/AtBAZhx8UVVlhhhIKXvQ+dFODQIdzO - oDXybs1zVHWOj31zqbbJnsfsVZ9Uf3p9k6xpJ3WFY9b85WasqTDN1xmSd6swD4N8 - ... - username: github_user_name</code></pre> -<h3 id="username-password-authentication">Username &amp; password authentication</h3> - -<p>Configure the seed job like:</p> -<pre><code>apiVersion: jenkins.io/v1alpha2 -kind: Jenkins -metadata: - name: example -spec: - seedJobs: - - id: jenkins-operator-user-pass - credentialType: usernamePassword - credentialID: k8s-user-pass - targets: "cicd/jobs/*.jenkins" - description: "Jenkins Operator repository" - repositoryBranch: master - repositoryUrl: https://github.com/jenkinsci/kubernetes-operator.git</code></pre> -<p>and create a Kubernetes Secret (name of secret should be the same from <code>credentialID</code> field):</p> -<pre><code>apiVersion: v1 -kind: Secret -metadata: - name: k8s-user-pass -stringData: - username: github_user_name - password: password_or_token</code></pre> -<h3 id="external-authentication">External authentication</h3> - -<p>You can use <code>external</code> credential type if you want to configure authentication using Configuration As Code or Groovy Script.</p> - -<p>Example:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.io/v1alpha2<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>example<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>seedJobs<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>id<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-external<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>credentialType<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>external<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>credentialID<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>k8s-external<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>targets<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;cicd/jobs/*.jenkins&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>description<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Jenkins Operator repository&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>repositoryBranch<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>master<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>repositoryUrl<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>https<span style="color:#000;font-weight:bold">:</span>//github.com/jenkinsci/kubernetes-operator.git</code></pre></div> -<p>Remember that <code>credentialID</code> must match the id of the credentials configured in Jenkins. Consult the -<a href="https://www.jenkins.io/doc/book/using/using-credentials/">Jenkins docs for using credentials</a> for details.</p> - -<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 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"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-master<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>env<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>CURL_OPTIONS<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-L<span style="color:#f8f8f8;text-decoration:underline"> </span>-x<span style="color:#f8f8f8;text-decoration:underline"> </span>&lt;proxy_url&gt;</code></pre></div> -<p>In <code>CURL_OPTIONS</code> var you can set additional arguments to <code>curl</code> command.</p> - -<h2 id="pulling-docker-images-from-private-repositories">Pulling Docker images from private repositories</h2> - -<p>To pull a Docker Image from private repository you can use <code>imagePullSecrets</code>.</p> - -<p>Please follow the instructions on <a href="https://kubernetes.io/docs/concepts/containers/images/?origin_team=T42NTAGHM#creating-a-secret-with-a-docker-config">creating a secret with a docker config</a>.</p> - -<h3 id="docker-hub-configuration">Docker Hub Configuration</h3> - -<p>To use Docker Hub additional steps are required.</p> - -<p>Edit the previously created secret:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl -n &lt;namespace&gt; edit secret &lt;name&gt;</code></pre></div> -<p>The <code>.dockerconfigjson</code> key&rsquo;s value needs to be replaced with a modified version.</p> - -<p>After modifications, it needs to be encoded as a Base64 value before setting the <code>.dockerconfigjson</code> key.</p> - -<p>Example config file to modify and use:</p> -<pre><code>{ - "auths":{ - "https://index.docker.io/v1/":{ - "username":"user", - "password":"password", - "email":"yourdockeremail@gmail.com", - "auth":"base64 of string user:password" - }, - "auth.docker.io":{ - "username":"user", - "password":"password", - "email":"yourdockeremail@gmail.com", - "auth":"base64 of string user:password" - }, - "registry.docker.io":{ - "username":"user", - "password":"password", - "email":"yourdockeremail@gmail.com", - "auth":"base64 of string user:password" - }, - "docker.io":{ - "username":"user", - "password":"password", - "email":"yourdockeremail@gmail.com", - "auth":"base64 of string user:password" - }, - "https://registry-1.docker.io/v2/": { - "username":"user", - "password":"password", - "email":"yourdockeremail@gmail.com", - "auth":"base64 of string user:password" - }, - "registry-1.docker.io/v2/": { - "username":"user", - "password":"password", - "email":"yourdockeremail@gmail.com", - "auth":"base64 of string user:password" - }, - "registry-1.docker.io": { - "username":"user", - "password":"password", - "email":"yourdockeremail@gmail.com", - "auth":"base64 of string user:password" - }, - "https://registry-1.docker.io": { - "username":"user", - "password":"password", - "email":"yourdockeremail@gmail.com", - "auth":"base64 of string user:password" - } - } -}</code></pre> - - - - - Docs: Configuring backup and restore - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configuring-backup-and-restore/ - Sun, 08 Jan 2023 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configuring-backup-and-restore/ - - - - - -<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> - -<h4 id="create-pvc">Create PVC</h4> - -<p>Save to the file named pvc.yaml:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>v1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>PersistentVolumeClaim<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>&lt;pvc_name<span style="color:#8f5902;font-style:italic">&gt; -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">namespace: &lt;namespace&gt;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>accessModes<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>ReadWriteOnce<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>requests<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>storage<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>500Gi</code></pre></div> -<p>Run the following command:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">$ kubectl -n &lt;namespace&gt; create -f pvc.yaml</code></pre></div> -<h4 id="configure-jenkins-cr">Configure Jenkins CR</h4> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.io/v1alpha2<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-cr<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>jenkinsAPISettings<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>authorizationStrategy<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>createUser<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>master<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>securityContext<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>runAsUser<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1000</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>fsGroup<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1000</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>disableCSRFProtection<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">false</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>containers<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-master<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>image<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins/jenkins<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">2.277</span><span style="color:#0000cf;font-weight:bold">.4</span>-lts-alpine<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>imagePullPolicy<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>IfNotPresent<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>limits<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>cpu<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>1500m<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>memory<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>3Gi<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>requests<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>cpu<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;1&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>memory<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>500Mi<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># container responsible for the backup and restore</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>env<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>BACKUP_DIR<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/backup<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>JENKINS_HOME<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/jenkins-home<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>BACKUP_COUNT<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;3&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># keep only the 2 most recent backups</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>image<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>virtuslab/jenkins-operator-backup-pvc<span style="color:#000;font-weight:bold">:</span>v0<span style="color:#0000cf;font-weight:bold">.1</span><span style="color:#0000cf;font-weight:bold">.1</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># look at backup/pvc directory</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>imagePullPolicy<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>IfNotPresent<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>volumeMounts<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>mountPath<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/jenkins-home<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># Jenkins home volume</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-home<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>mountPath<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># backup volume</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>limits<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>cpu<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>1000m<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>memory<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>3Gi<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>requests<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>cpu<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;1&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>memory<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>500Mi<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>volumes<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># PVC volume where backups will be stored</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>persistentVolumeClaim<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>claimName<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>&lt;pvc_name<span style="color:#8f5902;font-style:italic">&gt; -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">backup:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>containerName<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># container name is responsible for backup</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>action<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>command<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>/home/user/bin/backup.sh<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># this command is invoked on &#34;backup&#34; container to make backup, for example /home/user/bin/backup.sh &lt;backup_number&gt;, &lt;backup_number&gt; is passed by operator</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>interval<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">30</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># how often make backup in seconds</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>makeBackupBeforePodDeletion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">true</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># make a backup before pod deletion</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>restore<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>containerName<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># container name is responsible for restore backup</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>action<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>command<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>/home/user/bin/restore.sh<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># this command is invoked on &#34;backup&#34; container to make restore backup, for example /home/user/bin/restore.sh &lt;backup_number&gt;, &lt;backup_number&gt; is passed by operator</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">#recoveryOnce: &lt;backup_number&gt; # if want to restore specific backup configure this field and then Jenkins will be restarted and desired backup will be restored</span><span style="color:#f8f8f8;text-decoration:underline"> -</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; not having it in the CR may cause loss of data</span></code></pre></div> - - - - - Docs: Configuring backup and restore - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.6.x/configuring-backup-and-restore/ - Wed, 08 Dec 2021 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.6.x/configuring-backup-and-restore/ - - - - - -<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> - -<h4 id="create-pvc">Create PVC</h4> - -<p>Save to the file named pvc.yaml:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>v1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>PersistentVolumeClaim<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>&lt;pvc_name<span style="color:#8f5902;font-style:italic">&gt; -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">namespace: &lt;namespace&gt;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>accessModes<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>ReadWriteOnce<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>requests<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>storage<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>500Gi</code></pre></div> -<p>Run the following command:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">$ kubectl -n &lt;namespace&gt; create -f pvc.yaml</code></pre></div> -<h4 id="configure-jenkins-cr">Configure Jenkins CR</h4> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.io/v1alpha2<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>&lt;cr_name<span style="color:#8f5902;font-style:italic">&gt; -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">namespace: &lt;namespace&gt;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>master<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>securityContext<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>runAsUser<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1000</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>fsGroup<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1000</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>containers<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-master<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>image<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins/jenkins<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">2.277</span><span style="color:#0000cf;font-weight:bold">.4</span>-lts-alpine<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># container responsible for the backup and restore</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>env<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>BACKUP_DIR<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/backup<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>JENKINS_HOME<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/jenkins-home<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>BACKUP_COUNT<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;3&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># keep only the 2 most recent backups</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>image<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>virtuslab/jenkins-operator-backup-pvc<span style="color:#000;font-weight:bold">:</span>v0<span style="color:#0000cf;font-weight:bold">.1</span><span style="color:#0000cf;font-weight:bold">.0</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># look at backup/pvc directory</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>imagePullPolicy<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>IfNotPresent<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>volumeMounts<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>mountPath<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/jenkins-home<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># Jenkins home volume</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-home<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>mountPath<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># backup volume</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>volumes<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># PVC volume where backups will be stored</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>persistentVolumeClaim<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>claimName<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>&lt;pvc_name<span style="color:#8f5902;font-style:italic">&gt; -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">backup:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>containerName<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># container name is responsible for backup</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>action<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>command<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>/home/user/bin/backup.sh<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># this command is invoked on &#34;backup&#34; container to make backup, for example /home/user/bin/backup.sh &lt;backup_number&gt;, &lt;backup_number&gt; is passed by operator</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>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; 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"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>containerName<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># container name is responsible for restore backup</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>action<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>command<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>/home/user/bin/restore.sh<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># this command is invoked on &#34;backup&#34; container to make restore backup, for example /home/user/bin/restore.sh &lt;backup_number&gt;, &lt;backup_number&gt; is passed by operator</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">#recoveryOnce: &lt;backup_number&gt; # if want to restore specific backup configure this field and then Jenkins will be restarted and desired backup will be restored</span></code></pre></div> - - - - - Docs: Separate namespaces for Jenkins and Operator - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/separate-namespaces/ - Wed, 08 Dec 2021 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/separate-namespaces/ - - - - - -<h2 id="create-namespaces">Create namespaces</h2> - -<p>You need to create two namespaces, for example we&rsquo;ll call them <strong>jenkins</strong> for Jenkins and <strong>jenkins-operator</strong> for Jenkins Operator.</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 ns jenkins-operator -$ kubectl create ns jenkins</code></pre></div> -<h2 id="create-necessary-resources-in-jenkins-operator-namespace">Create necessary resources in Jenkins Operator namespace</h2> - -<p>Next, you need to install resources necessary for the Operator to work in the <code>jenkins-operator</code> namespace. To do that, -copy the manifest you see below to <code>jenkins-operator-rbac.yaml</code>file.</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">---<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>v1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>ServiceAccount<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>---<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#8f5902;font-style:italic"># permissions to do leader election.</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>rbac.authorization.k8s.io/v1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Role<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>leader-election-role<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>rules<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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:#4e9a06">&#34;&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>coordination.k8s.io<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>configmaps<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>leases<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>get<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>list<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>watch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>create<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>update<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>patch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>delete<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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:#4e9a06">&#34;&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>events<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>create<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>patch<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>apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>rbac.authorization.k8s.io/v1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>RoleBinding<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>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>leader-election-rolebinding<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>roleRef<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroup<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>rbac.authorization.k8s.io<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>Role<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>leader-election-role<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>subjects<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>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>ServiceAccount<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<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>apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>rbac.authorization.k8s.io/v1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Role<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>rules<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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>apps<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>daemonsets<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>deployments<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>replicasets<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>statefulsets<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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:#4e9a06">&#39;*&#39;</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>apiGroups<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>apps<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>deployments/finalizers<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>update<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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>build.openshift.io<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>buildconfigs<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>builds<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>get<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>list<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>watch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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:#4e9a06">&#34;&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>configmaps<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>secrets<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>services<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>create<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>get<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>list<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>update<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>watch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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:#4e9a06">&#34;&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>events<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>create<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>get<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>list<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>patch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>watch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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:#4e9a06">&#34;&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>persistentvolumeclaims<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>get<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>list<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>watch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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:#4e9a06">&#34;&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>pods<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>create<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>delete<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>get<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>list<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>patch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>update<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>watch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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:#4e9a06">&#34;&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>pods<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>pods/exec<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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:#4e9a06">&#39;*&#39;</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>apiGroups<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:#4e9a06">&#34;&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>pods/log<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>get<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>list<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>watch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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:#4e9a06">&#34;&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>pods/portforward<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>create<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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:#4e9a06">&#34;&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>serviceaccounts<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>create<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>get<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>list<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>update<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>watch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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>image.openshift.io<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>imagestreams<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>get<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>list<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>watch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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>jenkins.io<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#39;*&#39;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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:#4e9a06">&#39;*&#39;</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>apiGroups<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>jenkins.io<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<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>verbs<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>create<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>delete<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>get<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>list<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>patch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>update<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>watch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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>jenkins.io<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins/finalizers<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>update<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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>jenkins.io<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins/status<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>get<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>patch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>update<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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>rbac.authorization.k8s.io<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>rolebindings<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>roles<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>create<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>get<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>list<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>update<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>watch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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>route.openshift.io<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>routes<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>create<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>get<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>list<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>update<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>watch<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>apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>rbac.authorization.k8s.io/v1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>RoleBinding<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>subjects<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>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>ServiceAccount<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<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>roleRef<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroup<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>rbac.authorization.k8s.io<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>Role<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</code></pre></div> -<p>Now install the required resources in <code>jenkins-operator</code> namespace with:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl apply -n jenkins-operator -f jenkins-operator-rbac.yaml</code></pre></div> -<p>There&rsquo;s only one thing left to install in <code>jenkins-operator</code> namespace, and that is the Operator itself. The manifest -below contains the Operator as defined in all-in-one manifest found in <a href="https://jenkinsci.github.io/kubernetes-operator/kubernetes-operator/docs/getting-started/latest/installing-the-operator/">Installing the Operator</a> -page, the only difference is that the one here sets <code>WATCH_NAMESPACE</code> to the <code>jenkins</code> namespace we created.</p> - -<p>Copy its content to <code>jenkins-operator.yaml</code> file.</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">apiVersion: apps/v1 -kind: Deployment -metadata: - name: jenkins-operator - labels: - control-plane: controller-manager -spec: - selector: - matchLabels: - control-plane: controller-manager - replicas: <span style="color:#0000cf;font-weight:bold">1</span> - template: - metadata: - labels: - control-plane: controller-manager - spec: - serviceAccountName: jenkins-operator - securityContext: - runAsUser: <span style="color:#0000cf;font-weight:bold">65532</span> - containers: - - command: - - /manager - args: - - --leader-elect - image: virtuslab/jenkins-operator:v0.7.0 - name: jenkins-operator - imagePullPolicy: IfNotPresent - securityContext: - allowPrivilegeEscalation: <span style="color:#204a87">false</span> - livenessProbe: - httpGet: - path: /healthz - port: <span style="color:#0000cf;font-weight:bold">8081</span> - initialDelaySeconds: <span style="color:#0000cf;font-weight:bold">15</span> - periodSeconds: <span style="color:#0000cf;font-weight:bold">20</span> - readinessProbe: - httpGet: - path: /readyz - port: <span style="color:#0000cf;font-weight:bold">8081</span> - initialDelaySeconds: <span style="color:#0000cf;font-weight:bold">5</span> - periodSeconds: <span style="color:#0000cf;font-weight:bold">10</span> - resources: - limits: - cpu: 100m - memory: 30Mi - requests: - cpu: 100m - memory: 20Mi - env: - - name: WATCH_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - terminationGracePeriodSeconds: <span style="color:#0000cf;font-weight:bold">10</span></code></pre></div> -<p>Install the Operator in <code>jenkins-operator</code> namespace with:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl apply -n jenkins-operator -f jenkins-operator.yaml</code></pre></div> -<p>You have installed the Operator in <code>jenkins-operator</code> namespace, watching for Jenkins in <code>jenkins</code> namespace. Now -there are two things left to do: creating necessary Role and RoleBinding for the Operator in <code>jenkins</code> namespace, and -deploying actual Jenkins instance there.</p> - -<h2 id="create-necessary-resources-in-jenkins-namespace">Create necessary resources in Jenkins namespace</h2> - -<p>Below you can find manifest with RBAC that needs to be created in <code>jenkins</code> namespace. Copy its content to <code>jenkins-ns-rbac.yaml</code> file.</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>rbac.authorization.k8s.io/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>Role<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>rules<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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>apps<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>daemonsets<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>deployments<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>replicasets<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>statefulsets<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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:#4e9a06">&#39;*&#39;</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>apiGroups<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>apps<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>deployments/finalizers<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>update<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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>build.openshift.io<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>buildconfigs<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>builds<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>get<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>list<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>watch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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:#4e9a06">&#34;&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>configmaps<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>secrets<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>services<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>create<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>get<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>list<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>update<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>watch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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:#4e9a06">&#34;&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>events<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>create<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>get<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>list<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>patch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>watch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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:#4e9a06">&#34;&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>persistentvolumeclaims<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>get<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>list<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>watch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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:#4e9a06">&#34;&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>pods<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>create<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>delete<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>get<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>list<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>patch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>update<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>watch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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:#4e9a06">&#34;&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>pods<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>pods/exec<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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:#4e9a06">&#39;*&#39;</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>apiGroups<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:#4e9a06">&#34;&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>pods/log<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>get<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>list<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>watch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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:#4e9a06">&#34;&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>pods/portforward<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>create<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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:#4e9a06">&#34;&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>serviceaccounts<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>create<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>get<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>list<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>update<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>watch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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>image.openshift.io<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>imagestreams<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>get<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>list<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>watch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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>jenkins.io<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#39;*&#39;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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:#4e9a06">&#39;*&#39;</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>apiGroups<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>jenkins.io<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<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>verbs<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>create<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>delete<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>get<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>list<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>patch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>update<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>watch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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>jenkins.io<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins/finalizers<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>update<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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>jenkins.io<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins/status<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>get<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>patch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>update<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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>rbac.authorization.k8s.io<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>rolebindings<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>roles<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>create<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>get<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>list<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>update<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>watch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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>route.openshift.io<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>routes<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>create<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>get<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>list<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>update<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>watch<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>apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>rbac.authorization.k8s.io/v1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>RoleBinding<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>subjects<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>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>ServiceAccount<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<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>namespace<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>roleRef<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroup<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>rbac.authorization.k8s.io<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>Role<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</code></pre></div> -<p>Now apply it with:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl apply -n jenkins -f jenkins-ns-rbac.yaml</code></pre></div> -<p>The last thing to do is to deploy Jenkins. Below you can find an example Jenkins resource manifest. -It&rsquo;s the same as one used in <a href="https://jenkinsci.github.io/kubernetes-operator/kubernetes-operator/docs/getting-started/latest/deploying-jenkins/">Deploying Jenkins</a>. -Copy it to <code>jenkins-instance.yaml</code></p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.io/v1alpha2<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>example<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurationAsCode<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurations<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">]</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>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><span style="color:#4e9a06">&#34;&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>groovyScripts<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurations<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">]</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>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><span style="color:#4e9a06">&#34;&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkinsAPISettings<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>authorizationStrategy<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>createUser<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>disableCSRFProtection<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">false</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>containers<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-master<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>image<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins/jenkins<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">2.319</span><span style="color:#0000cf;font-weight:bold">.1</span>-lts-alpine<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>imagePullPolicy<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Always<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>livenessProbe<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>failureThreshold<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">12</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>httpGet<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>path<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/login<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>port<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>http<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>scheme<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>HTTP<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>initialDelaySeconds<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">100</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>periodSeconds<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">10</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>successThreshold<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>timeoutSeconds<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">5</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>readinessProbe<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>failureThreshold<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">10</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>httpGet<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>path<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/login<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>port<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>http<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>scheme<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>HTTP<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>initialDelaySeconds<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">80</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>periodSeconds<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">10</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>successThreshold<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>timeoutSeconds<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>limits<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>cpu<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>1500m<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>memory<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>3Gi<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>requests<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>cpu<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;1&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>memory<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>500Mi<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>seedJobs<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>id<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>targets<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;cicd/jobs/*.jenkins&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>description<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Jenkins Operator repository&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>repositoryBranch<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>master<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>repositoryUrl<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>https<span style="color:#000;font-weight:bold">:</span>//github.com/jenkinsci/kubernetes-operator.git</code></pre></div> -<p>Now you can deploy it with:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl apply -n jenkins -f jenkins-instance.yaml</code></pre></div> -<p>With this, you have just set up Jenkins Operator and Jenkins in separate namespaces. Now the Operator will run in -its own namespace (<code>jenkins-operator</code>), watch for CRs in <code>jenkins</code> namespace, and deploy Jenkins there.</p> - - - - - - Docs: Separate namespaces for Jenkins and Operator - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.6.x/separate-namespaces/ - Wed, 08 Dec 2021 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.6.x/separate-namespaces/ - - - - - -<h2 id="create-namespaces">Create namespaces</h2> - -<p>You need to create two namespaces, for example we&rsquo;ll call them <strong>jenkins</strong> for Jenkins and <strong>jenkins-operator</strong> for Jenkins Operator.</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 ns jenkins-operator -$ kubectl create ns jenkins</code></pre></div> -<h2 id="create-necessary-resources-in-jenkins-operator-namespace">Create necessary resources in Jenkins Operator namespace</h2> - -<p>Next, you need to install resources necessary for the Operator to work in the <code>jenkins-operator</code> namespace. To do that, -copy the manifest you see below to <code>jenkins-operator-rbac.yaml</code>file.</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">---<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>v1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>ServiceAccount<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>---<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#8f5902;font-style:italic"># permissions to do leader election.</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>rbac.authorization.k8s.io/v1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Role<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>leader-election-role<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>rules<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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:#4e9a06">&#34;&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>coordination.k8s.io<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>configmaps<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>leases<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>get<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>list<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>watch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>create<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>update<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>patch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>delete<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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:#4e9a06">&#34;&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>events<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>create<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>patch<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>apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>rbac.authorization.k8s.io/v1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>RoleBinding<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>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>leader-election-rolebinding<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>roleRef<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroup<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>rbac.authorization.k8s.io<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>Role<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>leader-election-role<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>subjects<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>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>ServiceAccount<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<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>apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>rbac.authorization.k8s.io/v1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Role<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>rules<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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>apps<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>daemonsets<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>deployments<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>replicasets<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>statefulsets<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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:#4e9a06">&#39;*&#39;</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>apiGroups<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>apps<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>deployments/finalizers<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>update<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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>build.openshift.io<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>buildconfigs<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>builds<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>get<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>list<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>watch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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:#4e9a06">&#34;&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>configmaps<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>secrets<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>services<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>create<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>get<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>list<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>update<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>watch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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:#4e9a06">&#34;&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>events<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>create<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>get<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>list<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>patch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>watch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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:#4e9a06">&#34;&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>persistentvolumeclaims<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>get<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>list<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>watch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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:#4e9a06">&#34;&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>pods<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>create<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>delete<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>get<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>list<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>patch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>update<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>watch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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:#4e9a06">&#34;&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>pods<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>pods/exec<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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:#4e9a06">&#39;*&#39;</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>apiGroups<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:#4e9a06">&#34;&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>pods/log<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>get<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>list<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>watch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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:#4e9a06">&#34;&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>pods/portforward<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>create<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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:#4e9a06">&#34;&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>serviceaccounts<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>create<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>get<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>list<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>update<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>watch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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>image.openshift.io<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>imagestreams<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>get<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>list<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>watch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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>jenkins.io<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#39;*&#39;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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:#4e9a06">&#39;*&#39;</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>apiGroups<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>jenkins.io<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<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>verbs<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>create<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>delete<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>get<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>list<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>patch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>update<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>watch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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>jenkins.io<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins/finalizers<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>update<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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>jenkins.io<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins/status<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>get<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>patch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>update<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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>rbac.authorization.k8s.io<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>rolebindings<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>roles<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>create<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>get<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>list<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>update<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>watch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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>route.openshift.io<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>routes<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>create<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>get<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>list<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>update<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>watch<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>apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>rbac.authorization.k8s.io/v1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>RoleBinding<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>subjects<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>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>ServiceAccount<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<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>roleRef<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroup<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>rbac.authorization.k8s.io<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>Role<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</code></pre></div> -<p>Now install the required resources in <code>jenkins-operator</code> namespace with:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl apply -n jenkins-operator -f jenkins-operator-rbac.yaml</code></pre></div> -<p>There&rsquo;s only one thing left to install in <code>jenkins-operator</code> namespace, and that is the Operator itself. The manifest -below contains the Operator as defined in all-in-one manifest found in <a href="https://jenkinsci.github.io/kubernetes-operator/kubernetes-operator/docs/getting-started/latest/installing-the-operator/">Installing the Operator</a> -page, the only difference is that the one here sets <code>WATCH_NAMESPACE</code> to the <code>jenkins</code> namespace we created.</p> - -<p>Copy its content to <code>jenkins-operator.yaml</code> file.</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">apiVersion: apps/v1 -kind: Deployment -metadata: - name: jenkins-operator - labels: - control-plane: controller-manager -spec: - selector: - matchLabels: - control-plane: controller-manager - replicas: <span style="color:#0000cf;font-weight:bold">1</span> - template: - metadata: - labels: - control-plane: controller-manager - spec: - serviceAccountName: jenkins-operator - securityContext: - runAsUser: <span style="color:#0000cf;font-weight:bold">65532</span> - containers: - - command: - - /manager - args: - - --leader-elect - image: virtuslab/jenkins-operator:v0.6.0 - name: jenkins-operator - imagePullPolicy: IfNotPresent - securityContext: - allowPrivilegeEscalation: <span style="color:#204a87">false</span> - livenessProbe: - httpGet: - path: /healthz - port: <span style="color:#0000cf;font-weight:bold">8081</span> - initialDelaySeconds: <span style="color:#0000cf;font-weight:bold">15</span> - periodSeconds: <span style="color:#0000cf;font-weight:bold">20</span> - readinessProbe: - httpGet: - path: /readyz - port: <span style="color:#0000cf;font-weight:bold">8081</span> - initialDelaySeconds: <span style="color:#0000cf;font-weight:bold">5</span> - periodSeconds: <span style="color:#0000cf;font-weight:bold">10</span> - resources: - limits: - cpu: 100m - memory: 30Mi - requests: - cpu: 100m - memory: 20Mi - env: - - name: WATCH_NAMESPACE - value: jenkins - terminationGracePeriodSeconds: <span style="color:#0000cf;font-weight:bold">10</span></code></pre></div> -<p>Install the Operator in <code>jenkins-operator</code> namespace with:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl apply -n jenkins-operator -f jenkins-operator.yaml</code></pre></div> -<p>You have installed the Operator in <code>jenkins-operator</code> namespace, watching for Jenkins in <code>jenkins</code> namespace. Now -there are two things left to do: creating necessary Role and RoleBinding for the Operator in <code>jenkins</code> namespace, and -deploying actual Jenkins instance there.</p> - -<h2 id="create-necessary-resources-in-jenkins-namespace">Create necessary resources in Jenkins namespace</h2> - -<p>Below you can find manifest with RBAC that needs to be created in <code>jenkins</code> namespace. Copy its content to <code>jenkins-ns-rbac.yaml</code> file.</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>rbac.authorization.k8s.io/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>Role<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>rules<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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>apps<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>daemonsets<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>deployments<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>replicasets<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>statefulsets<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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:#4e9a06">&#39;*&#39;</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>apiGroups<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>apps<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>deployments/finalizers<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>update<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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>build.openshift.io<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>buildconfigs<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>builds<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>get<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>list<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>watch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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:#4e9a06">&#34;&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>configmaps<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>secrets<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>services<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>create<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>get<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>list<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>update<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>watch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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:#4e9a06">&#34;&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>events<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>create<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>get<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>list<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>patch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>watch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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:#4e9a06">&#34;&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>persistentvolumeclaims<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>get<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>list<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>watch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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:#4e9a06">&#34;&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>pods<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>create<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>delete<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>get<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>list<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>patch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>update<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>watch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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:#4e9a06">&#34;&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>pods<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>pods/exec<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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:#4e9a06">&#39;*&#39;</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>apiGroups<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:#4e9a06">&#34;&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>pods/log<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>get<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>list<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>watch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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:#4e9a06">&#34;&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>pods/portforward<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>create<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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:#4e9a06">&#34;&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>serviceaccounts<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>create<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>get<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>list<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>update<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>watch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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>image.openshift.io<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>imagestreams<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>get<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>list<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>watch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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>jenkins.io<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#39;*&#39;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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:#4e9a06">&#39;*&#39;</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>apiGroups<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>jenkins.io<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<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>verbs<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>create<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>delete<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>get<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>list<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>patch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>update<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>watch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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>jenkins.io<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins/finalizers<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>update<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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>jenkins.io<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins/status<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>get<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>patch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>update<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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>rbac.authorization.k8s.io<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>rolebindings<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>roles<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>create<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>get<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>list<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>update<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>watch<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroups<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>route.openshift.io<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>routes<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>verbs<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>create<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>get<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>list<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>update<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>watch<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>apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>rbac.authorization.k8s.io/v1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>RoleBinding<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>subjects<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>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>ServiceAccount<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<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>namespace<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>roleRef<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>apiGroup<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>rbac.authorization.k8s.io<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>Role<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</code></pre></div> -<p>Now apply it with:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl apply -n jenkins -f jenkins-ns-rbac.yaml</code></pre></div> -<p>The last thing to do is to deploy Jenkins. Below you can find an example Jenkins resource manifest. -It&rsquo;s the same as one used in <a href="https://jenkinsci.github.io/kubernetes-operator/kubernetes-operator/docs/getting-started/latest/deploying-jenkins/">Deploying Jenkins</a>. -Copy it to <code>jenkins-instance.yaml</code></p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.io/v1alpha2<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>example<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurationAsCode<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurations<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">]</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>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><span style="color:#4e9a06">&#34;&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>groovyScripts<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurations<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">]</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>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><span style="color:#4e9a06">&#34;&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkinsAPISettings<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>authorizationStrategy<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>createUser<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>disableCSRFProtection<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">false</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>containers<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-master<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>image<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins/jenkins<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">2.277</span><span style="color:#0000cf;font-weight:bold">.4</span>-lts-alpine<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>imagePullPolicy<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Always<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>livenessProbe<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>failureThreshold<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">12</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>httpGet<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>path<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/login<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>port<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>http<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>scheme<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>HTTP<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>initialDelaySeconds<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">100</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>periodSeconds<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">10</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>successThreshold<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>timeoutSeconds<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">5</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>readinessProbe<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>failureThreshold<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">10</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>httpGet<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>path<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/login<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>port<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>http<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>scheme<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>HTTP<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>initialDelaySeconds<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">80</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>periodSeconds<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">10</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>successThreshold<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>timeoutSeconds<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>limits<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>cpu<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>1500m<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>memory<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>3Gi<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>requests<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>cpu<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;1&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>memory<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>500Mi<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>seedJobs<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>id<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>targets<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;cicd/jobs/*.jenkins&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>description<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Jenkins Operator repository&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>repositoryBranch<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>master<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>repositoryUrl<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>https<span style="color:#000;font-weight:bold">:</span>//github.com/jenkinsci/kubernetes-operator.git</code></pre></div> -<p>Now you can deploy it with:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl apply -n jenkins -f jenkins-instance.yaml</code></pre></div> -<p>With this, you have just set up Jenkins Operator and Jenkins in separate namespaces. Now the Operator will run in -its own namespace (<code>jenkins-operator</code>), watch for CRs in <code>jenkins</code> namespace, and deploy Jenkins there.</p> - - - - - - Docs: Custom backup and restore providers - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/custom-backup-and-restore/ - Wed, 08 Dec 2021 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/custom-backup-and-restore/ - - - - - -<p>With enough effort one can create a custom backup and restore provider -for the Jenkins Operator.</p> - -<h2 id="requirements">Requirements</h2> - -<p>Two commands (e.g. scripts) are required:</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> - -<p>One of those scripts (or the entry point of the container) needs to be responsible -for backup cleanup or rotation if required, or an external system.</p> - -<h2 id="how-it-works">How it works</h2> - -<p>The mechanism relies on basic Kubernetes and UNIX functionalities.</p> - -<p>The backup (and restore) container runs as a sidecar in the same -Kubernetes pod as the Jenkins master.</p> - -<p>Name of the backup and restore containers can be set as necessary using -<code>spec.backup.containerName</code> and <code>spec.restore.containerName</code>. -In most cases it will be the same container, but we allow for less common use cases.</p> - -<p>The operator will call a backup or restore commands inside a sidecar container when necessary:</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> - -<p>This example shows abbreviated version of a simple AWS S3 backup implementation -using: <code>aws-cli</code>, <code>bash</code> and <code>kube2iam</code>.</p> - -<p>In addition to your normal <code>Jenkins</code> <code>CustomResource</code> some additional settings -for backup and restore are required, e.g.:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.io/v1alpha1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>example<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>namespace<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>master<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>masterAnnotations<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>iam.amazonaws.com/role<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;my-example-backup-role&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># tell kube2iam where the AWS IAM role is</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>containers<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-master<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>...<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># container responsible for backup and restore</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>image<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>quay.io/virtuslab/aws-cli<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.16</span><span style="color:#0000cf;font-weight:bold">.263</span><span style="color:#0000cf;font-weight:bold">-2</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>workingDir<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/home/user/bin/<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>command<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># our container entry point</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>sleep<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>infinity<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>env<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>BACKUP_BUCKET<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>my-example-bucket<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># the S3 bucket name to use</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>BACKUP_PATH<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>my-backup-path<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># the S3 bucket path prefix to use</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>JENKINS_HOME<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/jenkins-home<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># the path to mount jenkins home dir in the backup container</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>volumeMounts<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>mountPath<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/jenkins-home<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># Jenkins home volume</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-home<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>mountPath<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/home/user/bin/backup.sh<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup-scripts<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>subPath<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup.sh<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>readOnly<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">true</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>mountPath<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/home/user/bin/restore.sh<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup-scripts<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>subPath<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>restore.sh<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>readOnly<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">true</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>volumes<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup-scripts<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configMap<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>defaultMode<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">0754</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-backup-s3<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>securityContext<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># make sure both containers use the same UID and GUID</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>runAsUser<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1000</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>fsGroup<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1000</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>...<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>containerName<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># container name responsible for backup</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>interval<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">3600</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># how often make a backup in seconds</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>makeBackupBeforePodDeletion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">true</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># trigger backup just before deleting the pod</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>action<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>command<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># this command is invoked on &#34;backup&#34; container to create a backup,</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># &lt;backup_number&gt; is passed by operator,</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># for example /home/user/bin/backup.sh &lt;backup_number&gt;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>/home/user/bin/backup.sh<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>restore<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>containerName<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># container name is responsible for restore backup</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>action<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>command<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># this command is invoked on &#34;backup&#34; container to restore a backup,</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># &lt;backup_number&gt; is passed by operator</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># for example /home/user/bin/restore.sh &lt;backup_number&gt;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>/home/user/bin/restore.sh<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#8f5902;font-style:italic"># recoveryOnce: &lt;backup_number&gt; # if want to restore specific backup configure this field and then Jenkins will be restarted and desired backup will be restored</span></code></pre></div> -<p>The actual backup and restore scripts will be provided in a <code>ConfigMap</code>:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>ConfigMap<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>v1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-backup-s3<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>namespace<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>labels<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>app<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>data<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup.sh<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>|<span style="color:#8f5902;font-style:italic">- -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">#!/bin/bash -xeu</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">[</span><span style="color:#f8f8f8;text-decoration:underline"> </span>!<span style="color:#f8f8f8;text-decoration:underline"> </span>$<span style="color:#8f5902;font-style:italic"># -eq 1 ]] &amp;&amp; echo &#34;Usage: $0 backup_number&#34; &amp;&amp; exit 1;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">[</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-z<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;${BACKUP_BUCKET}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">]</span><span style="color:#000;font-weight:bold">]</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Required &#39;BACKUP_BUCKET&#39; env not set&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exit<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>;<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">[</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-z<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;${BACKUP_PATH}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">]</span><span style="color:#000;font-weight:bold">]</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Required &#39;BACKUP_PATH&#39; env not set&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exit<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>;<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">[</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-z<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;${JENKINS_HOME}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">]</span><span style="color:#000;font-weight:bold">]</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Required &#39;JENKINS_HOME&#39; env not set&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exit<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>;<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup_number=$<span style="color:#0000cf;font-weight:bold">1</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Running backup #${backup_number}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>BACKUP_TMP_DIR=$(mktemp<span style="color:#f8f8f8;text-decoration:underline"> </span>-d)<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>tar<span style="color:#f8f8f8;text-decoration:underline"> </span>-C<span style="color:#f8f8f8;text-decoration:underline"> </span>${JENKINS_HOME}<span style="color:#f8f8f8;text-decoration:underline"> </span>-czf<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;${BACKUP_TMP_DIR}/${backup_number}.tar.gz&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>--exclude<span style="color:#f8f8f8;text-decoration:underline"> </span>jobs/<span style="color:#8f5902;font-style:italic">*/workspace*</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-c<span style="color:#f8f8f8;text-decoration:underline"> </span>jobs<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>\<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>aws<span style="color:#f8f8f8;text-decoration:underline"> </span>s3<span style="color:#f8f8f8;text-decoration:underline"> </span>cp<span style="color:#f8f8f8;text-decoration:underline"> </span>${BACKUP_TMP_DIR}/${backup_number}.tar.gz<span style="color:#f8f8f8;text-decoration:underline"> </span>s3<span style="color:#000;font-weight:bold">:</span>//${BACKUP_BUCKET}/${BACKUP_PATH}/${backup_number}.tar.gz<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span>Done<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>restore.sh<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>|<span style="color:#8f5902;font-style:italic">- -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">#!/bin/bash -xeu</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">[</span><span style="color:#f8f8f8;text-decoration:underline"> </span>!<span style="color:#f8f8f8;text-decoration:underline"> </span>$<span style="color:#8f5902;font-style:italic"># -eq 1 ]] &amp;&amp; echo &#34;Usage: $0 backup_number&#34; &amp;&amp; exit 1</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">[</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-z<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;${BACKUP_BUCKET}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">]</span><span style="color:#000;font-weight:bold">]</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Required &#39;BACKUP_BUCKET&#39; env not set&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exit<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>;<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">[</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-z<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;${BACKUP_PATH}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">]</span><span style="color:#000;font-weight:bold">]</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Required &#39;BACKUP_PATH&#39; env not set&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exit<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>;<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">[</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-z<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;${JENKINS_HOME}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">]</span><span style="color:#000;font-weight:bold">]</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Required &#39;JENKINS_HOME&#39; env not set&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exit<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>;<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup_number=$<span style="color:#0000cf;font-weight:bold">1</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Running restore #${backup_number}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>BACKUP_TMP_DIR=$(mktemp<span style="color:#f8f8f8;text-decoration:underline"> </span>-d)<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>aws<span style="color:#f8f8f8;text-decoration:underline"> </span>s3<span style="color:#f8f8f8;text-decoration:underline"> </span>cp<span style="color:#f8f8f8;text-decoration:underline"> </span>s3<span style="color:#000;font-weight:bold">:</span>//${BACKUP_BUCKET}/${BACKUP_PATH}/${backup_number}.tar.gz<span style="color:#f8f8f8;text-decoration:underline"> </span>${BACKUP_TMP_DIR}/${backup_number}.tar.gz<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>tar<span style="color:#f8f8f8;text-decoration:underline"> </span>-C<span style="color:#f8f8f8;text-decoration:underline"> </span>${JENKINS_HOME}<span style="color:#f8f8f8;text-decoration:underline"> </span>-zxf<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;${BACKUP_TMP_DIR}/${backup_number}.tar.gz&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span>Done</code></pre></div> -<p>In our example we will use S3 bucket lifecycle policy to keep -the number of backups under control, e.g. Cloud Formation fragment:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#f8f8f8;text-decoration:underline"> </span>Type<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>AWS<span style="color:#000;font-weight:bold">:</span><span style="color:#000;font-weight:bold">:</span>S3<span style="color:#000;font-weight:bold">:</span><span style="color:#000;font-weight:bold">:</span>Bucket<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Properties<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>BucketName<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>my-example-bucket<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>...<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>LifecycleConfiguration<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Rules<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>Id<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>BackupCleanup<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Status<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Enabled<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Prefix<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>my-backup-path<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>ExpirationInDays<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">7</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>NoncurrentVersionExpirationInDays<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">14</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>AbortIncompleteMultipartUpload<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>DaysAfterInitiation<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">3</span></code></pre></div> - - - - - Docs: Custom backup and restore providers - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.6.x/custom-backup-and-restore/ - Wed, 08 Dec 2021 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.6.x/custom-backup-and-restore/ - - - - - -<p>With enough effort one can create a custom backup and restore provider -for the Jenkins Operator.</p> - -<h2 id="requirements">Requirements</h2> - -<p>Two commands (e.g. scripts) are required:</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> - -<p>One of those scripts (or the entry point of the container) needs to be responsible -for backup cleanup or rotation if required, or an external system.</p> - -<h2 id="how-it-works">How it works</h2> - -<p>The mechanism relies on basic Kubernetes and UNIX functionalities.</p> - -<p>The backup (and restore) container runs as a sidecar in the same -Kubernetes pod as the Jenkins master.</p> - -<p>Name of the backup and restore containers can be set as necessary using -<code>spec.backup.containerName</code> and <code>spec.restore.containerName</code>. -In most cases it will be the same container, but we allow for less common use cases.</p> - -<p>The operator will call a backup or restore commands inside a sidecar container when necessary:</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> - -<p>This example shows abbreviated version of a simple AWS S3 backup implementation -using: <code>aws-cli</code>, <code>bash</code> and <code>kube2iam</code>.</p> - -<p>In addition to your normal <code>Jenkins</code> <code>CustomResource</code> some additional settings -for backup and restore are required, e.g.:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.io/v1alpha1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>example<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>namespace<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>master<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>masterAnnotations<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>iam.amazonaws.com/role<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;my-example-backup-role&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># tell kube2iam where the AWS IAM role is</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>containers<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-master<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>...<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># container responsible for backup and restore</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>image<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>quay.io/virtuslab/aws-cli<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.16</span><span style="color:#0000cf;font-weight:bold">.263</span><span style="color:#0000cf;font-weight:bold">-2</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>workingDir<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/home/user/bin/<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>command<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># our container entry point</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>sleep<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>infinity<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>env<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>BACKUP_BUCKET<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>my-example-bucket<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># the S3 bucket name to use</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>BACKUP_PATH<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>my-backup-path<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># the S3 bucket path prefix to use</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>JENKINS_HOME<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/jenkins-home<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># the path to mount jenkins home dir in the backup container</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>volumeMounts<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>mountPath<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/jenkins-home<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># Jenkins home volume</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-home<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>mountPath<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/home/user/bin/backup.sh<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup-scripts<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>subPath<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup.sh<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>readOnly<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">true</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>mountPath<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/home/user/bin/restore.sh<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup-scripts<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>subPath<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>restore.sh<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>readOnly<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">true</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>volumes<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup-scripts<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configMap<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>defaultMode<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">0754</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-backup-s3<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>securityContext<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># make sure both containers use the same UID and GUID</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>runAsUser<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1000</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>fsGroup<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1000</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>...<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>containerName<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># container name responsible for backup</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>interval<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">3600</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># how often make a backup in seconds</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>makeBackupBeforePodDeletion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">true</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># trigger backup just before deleting the pod</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>action<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>command<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># this command is invoked on &#34;backup&#34; container to create a backup,</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># &lt;backup_number&gt; is passed by operator,</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># for example /home/user/bin/backup.sh &lt;backup_number&gt;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>/home/user/bin/backup.sh<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>restore<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>containerName<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># container name is responsible for restore backup</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>action<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>command<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># this command is invoked on &#34;backup&#34; container to restore a backup,</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># &lt;backup_number&gt; is passed by operator</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># for example /home/user/bin/restore.sh &lt;backup_number&gt;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>/home/user/bin/restore.sh<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#8f5902;font-style:italic"># recoveryOnce: &lt;backup_number&gt; # if want to restore specific backup configure this field and then Jenkins will be restarted and desired backup will be restored</span></code></pre></div> -<p>The actual backup and restore scripts will be provided in a <code>ConfigMap</code>:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>ConfigMap<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>v1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-backup-s3<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>namespace<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>labels<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>app<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>data<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup.sh<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>|<span style="color:#8f5902;font-style:italic">- -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">#!/bin/bash -xeu</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">[</span><span style="color:#f8f8f8;text-decoration:underline"> </span>!<span style="color:#f8f8f8;text-decoration:underline"> </span>$<span style="color:#8f5902;font-style:italic"># -eq 1 ]] &amp;&amp; echo &#34;Usage: $0 backup_number&#34; &amp;&amp; exit 1;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">[</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-z<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;${BACKUP_BUCKET}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">]</span><span style="color:#000;font-weight:bold">]</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Required &#39;BACKUP_BUCKET&#39; env not set&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exit<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>;<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">[</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-z<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;${BACKUP_PATH}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">]</span><span style="color:#000;font-weight:bold">]</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Required &#39;BACKUP_PATH&#39; env not set&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exit<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>;<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">[</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-z<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;${JENKINS_HOME}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">]</span><span style="color:#000;font-weight:bold">]</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Required &#39;JENKINS_HOME&#39; env not set&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exit<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>;<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup_number=$<span style="color:#0000cf;font-weight:bold">1</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Running backup #${backup_number}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>BACKUP_TMP_DIR=$(mktemp<span style="color:#f8f8f8;text-decoration:underline"> </span>-d)<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>tar<span style="color:#f8f8f8;text-decoration:underline"> </span>-C<span style="color:#f8f8f8;text-decoration:underline"> </span>${JENKINS_HOME}<span style="color:#f8f8f8;text-decoration:underline"> </span>-czf<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;${BACKUP_TMP_DIR}/${backup_number}.tar.gz&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>--exclude<span style="color:#f8f8f8;text-decoration:underline"> </span>jobs/<span style="color:#8f5902;font-style:italic">*/workspace*</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-c<span style="color:#f8f8f8;text-decoration:underline"> </span>jobs<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>\<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>aws<span style="color:#f8f8f8;text-decoration:underline"> </span>s3<span style="color:#f8f8f8;text-decoration:underline"> </span>cp<span style="color:#f8f8f8;text-decoration:underline"> </span>${BACKUP_TMP_DIR}/${backup_number}.tar.gz<span style="color:#f8f8f8;text-decoration:underline"> </span>s3<span style="color:#000;font-weight:bold">:</span>//${BACKUP_BUCKET}/${BACKUP_PATH}/${backup_number}.tar.gz<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span>Done<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>restore.sh<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>|<span style="color:#8f5902;font-style:italic">- -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">#!/bin/bash -xeu</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">[</span><span style="color:#f8f8f8;text-decoration:underline"> </span>!<span style="color:#f8f8f8;text-decoration:underline"> </span>$<span style="color:#8f5902;font-style:italic"># -eq 1 ]] &amp;&amp; echo &#34;Usage: $0 backup_number&#34; &amp;&amp; exit 1</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">[</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-z<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;${BACKUP_BUCKET}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">]</span><span style="color:#000;font-weight:bold">]</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Required &#39;BACKUP_BUCKET&#39; env not set&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exit<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>;<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">[</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-z<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;${BACKUP_PATH}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">]</span><span style="color:#000;font-weight:bold">]</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Required &#39;BACKUP_PATH&#39; env not set&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exit<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>;<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">[</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-z<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;${JENKINS_HOME}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">]</span><span style="color:#000;font-weight:bold">]</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Required &#39;JENKINS_HOME&#39; env not set&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exit<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>;<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup_number=$<span style="color:#0000cf;font-weight:bold">1</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Running restore #${backup_number}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>BACKUP_TMP_DIR=$(mktemp<span style="color:#f8f8f8;text-decoration:underline"> </span>-d)<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>aws<span style="color:#f8f8f8;text-decoration:underline"> </span>s3<span style="color:#f8f8f8;text-decoration:underline"> </span>cp<span style="color:#f8f8f8;text-decoration:underline"> </span>s3<span style="color:#000;font-weight:bold">:</span>//${BACKUP_BUCKET}/${BACKUP_PATH}/${backup_number}.tar.gz<span style="color:#f8f8f8;text-decoration:underline"> </span>${BACKUP_TMP_DIR}/${backup_number}.tar.gz<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>tar<span style="color:#f8f8f8;text-decoration:underline"> </span>-C<span style="color:#f8f8f8;text-decoration:underline"> </span>${JENKINS_HOME}<span style="color:#f8f8f8;text-decoration:underline"> </span>-zxf<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;${BACKUP_TMP_DIR}/${backup_number}.tar.gz&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span>Done</code></pre></div> -<p>In our example we will use S3 bucket lifecycle policy to keep -the number of backups under control, e.g. Cloud Formation fragment:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#f8f8f8;text-decoration:underline"> </span>Type<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>AWS<span style="color:#000;font-weight:bold">:</span><span style="color:#000;font-weight:bold">:</span>S3<span style="color:#000;font-weight:bold">:</span><span style="color:#000;font-weight:bold">:</span>Bucket<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Properties<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>BucketName<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>my-example-bucket<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>...<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>LifecycleConfiguration<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Rules<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>Id<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>BackupCleanup<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Status<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Enabled<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Prefix<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>my-backup-path<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>ExpirationInDays<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">7</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>NoncurrentVersionExpirationInDays<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">14</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>AbortIncompleteMultipartUpload<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>DaysAfterInitiation<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">3</span></code></pre></div> - - - - - Docs: AKS - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/aks/ - Wed, 08 Dec 2021 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/aks/ - - - - <p>Azure AKS managed Kubernetes service adds to every pod the following environment variables:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>KUBERNETES_PORT_443_TCP_ADDR<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>KUBERNETES_PORT<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>tcp<span style="color:#000;font-weight:bold">:</span>//<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>KUBERNETES_PORT_443_TCP<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>tcp<span style="color:#000;font-weight:bold">:</span>//<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>KUBERNETES_SERVICE_HOST<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span></code></pre></div> -<p>The operator is aware of it and omits these environment variables when checking if a Jenkins pod environment has been changed. It prevents the -restart of a Jenkins pod over and over again.</p> - - - - - - Docs: AKS - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.6.x/aks/ - Wed, 08 Dec 2021 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.6.x/aks/ - - - - <p>Azure AKS managed Kubernetes service adds to every pod the following environment variables:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>KUBERNETES_PORT_443_TCP_ADDR<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>KUBERNETES_PORT<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>tcp<span style="color:#000;font-weight:bold">:</span>//<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>KUBERNETES_PORT_443_TCP<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>tcp<span style="color:#000;font-weight:bold">:</span>//<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>KUBERNETES_SERVICE_HOST<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span></code></pre></div> -<p>The operator is aware of it and omits these environment variables when checking if a Jenkins pod environment has been changed. It prevents the -restart of a Jenkins pod over and over again.</p> - - - - - - Docs: LDAP - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/ldap/ - Wed, 08 Dec 2021 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/ldap/ - - - - - -<p>Configuring LDAP is not supported out of the box, but can be achieved through -plugins and some well tuned configurations.</p> - -<p>The plugin we will use is: <a href="https://plugins.jenkins.io/ldap/">https://plugins.jenkins.io/ldap/</a></p> - -<blockquote> -<p>Note: This is an example of how LDAP authentication can be achieved. The LDAP -plugin is from a third-party, and there may be other alternatives that suits -your use case better. Use this guide with a grain of salt.</p> -</blockquote> - -<h2 id="requirements">Requirements</h2> - -<ul> -<li><p>LDAP server accessible from the Kubernetes cluster where your Jenkins -instance will live.</p></li> - -<li><p>Credentials to a manager account in your AD. Jenkins Operator will use -this account to authenticate with Jenkins for health checks, seed jobs, etc.</p></li> -</ul> - -<h2 id="steps">Steps</h2> - -<p>In your Jenkins configuration, add the following plugin:</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">plugins<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># Check https://plugins.jenkins.io/ldap/ to find the latest version.</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>ldap<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.7&#34;</span></code></pre></div> -<p>Easiest step is to then start up Jenkins then navigate to your instance&rsquo;s -&ldquo;Configure Global Security&rdquo; page and configure it accordingly.</p> - -<p><code>http://jenkins.example.com/configureSecurity/</code></p> - -<p>Once it&rsquo;s set up and tested, you can navigate to your JCasC page and export -the LDAP settings.</p> - -<p><code>https://jenkins.example.com/configuration-as-code/</code></p> - -<p>Feed the relevant new settings into your Kubernetes ConfigMap for your JCasC -settings.</p> - -<p>Here&rsquo;s a snippet of the LDAP-related configurations:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>v1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>ConfigMap<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-casc<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>data<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>ldap.yaml<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">| -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">jenkins:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>securityRealm<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>ldap<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>displayNameAttributeName<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;name&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>groupSearchBase<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;OU=Groups,OU=MyCompany&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>groupSearchFilter<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;(&amp; (cn={0}) (objectclass=group) )&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>inhibitInferRootDN<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">false</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>managerDN<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;CN=Jenkins Admin,OU=UsersSystem,OU=UsersOther,OU=MyCompany,DC=mycompany,DC=local&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>managerPasswordSecret<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;${LDAP_MANAGER_PASSWORD}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>rootDN<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;DC=mycompany,DC=local&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>server<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;MyCompany.local&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>userSearch<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;SamAccountName={0}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>userSearchBase<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;OU=MyCompany&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>disableMailAddressResolver<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">false</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>disableRolePrefixing<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">true</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>groupIdStrategy<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;caseInsensitive&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>userIdStrategy<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;caseInsensitive&#34;</span></code></pre></div> -<blockquote> -<p>Note the use of <code>${LDAP_MANAGER_PASSWORD}</code> above. You can reference -Kubernetes secrets in your JCasC ConfigMaps by adding the following to your -Jenkins object:</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">&gt;<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>&gt;<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:#8f5902;font-style:italic">&gt; </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">configurationAsCode:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#8f5902;font-style:italic">&gt; </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">configurations:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#8f5902;font-style:italic">&gt; </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">- name: jenkins-casc</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#8f5902;font-style:italic">&gt; </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">secret:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#8f5902;font-style:italic">&gt; </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"># This here</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#8f5902;font-style:italic">&gt; </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">name: jenkins-casc-secrets</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>&gt;<span style="color:#f8f8f8;text-decoration:underline"> </span>```<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>&gt;<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>&gt;<span style="color:#f8f8f8;text-decoration:underline"> </span>```yaml<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>&gt;<span style="color:#f8f8f8;text-decoration:underline"> </span>apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>v1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>&gt;<span style="color:#f8f8f8;text-decoration:underline"> </span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Secret<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>&gt;<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><span style="color:#8f5902;font-style:italic">&gt; </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">name: jenkins-cred-conf-secrets</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>&gt;<span style="color:#f8f8f8;text-decoration:underline"> </span>stringData<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#8f5902;font-style:italic">&gt; </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">LDAP_MANAGER_PASSWORD: &lt;password-for-manager-created-in-ldap&gt;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>&gt;<span style="color:#f8f8f8;text-decoration:underline"> </span>```<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>&gt;<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>&gt;<span style="color:#f8f8f8;text-decoration:underline"> </span>Schema<span style="color:#f8f8f8;text-decoration:underline"> </span>reference<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span>v1alpha2.ConfigurationAsCode<span style="color:#000;font-weight:bold">]</span>(./schema/<span style="color:#8f5902;font-style:italic">#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.ConfigurationAsCode)</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>Finally<span style="color:#f8f8f8;text-decoration:underline"> </span>you<span style="color:#f8f8f8;text-decoration:underline"> </span>must<span style="color:#f8f8f8;text-decoration:underline"> </span>configure<span style="color:#f8f8f8;text-decoration:underline"> </span>the<span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> </span>operator<span style="color:#f8f8f8;text-decoration:underline"> </span>to<span style="color:#f8f8f8;text-decoration:underline"> </span>use<span style="color:#f8f8f8;text-decoration:underline"> </span>the<span style="color:#f8f8f8;text-decoration:underline"> </span>manager<span style="color:#4e9a06">&#39;s -</span><span style="color:#4e9a06">credentials from the AD. -</span><span style="color:#4e9a06"> -</span><span style="color:#4e9a06">This is because this procedure will disable Jenkins&#39;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>own<span style="color:#f8f8f8;text-decoration:underline"> </span>user<span style="color:#f8f8f8;text-decoration:underline"> </span>database<span style="color:#000;font-weight:bold">,</span><span style="color:#f8f8f8;text-decoration:underline"> </span>and<span style="color:#f8f8f8;text-decoration:underline"> </span>the<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> </span>operator<span style="color:#f8f8f8;text-decoration:underline"> </span>still<span style="color:#f8f8f8;text-decoration:underline"> </span>needs<span style="color:#f8f8f8;text-decoration:underline"> </span>to<span style="color:#f8f8f8;text-decoration:underline"> </span>be<span style="color:#f8f8f8;text-decoration:underline"> </span>able<span style="color:#f8f8f8;text-decoration:underline"> </span>to<span style="color:#f8f8f8;text-decoration:underline"> </span>talk<span style="color:#f8f8f8;text-decoration:underline"> </span>to<span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> </span>in<span style="color:#f8f8f8;text-decoration:underline"> </span>an<span style="color:#f8f8f8;text-decoration:underline"> </span>authorized<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>manner.<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>Create<span style="color:#f8f8f8;text-decoration:underline"> </span>the<span style="color:#f8f8f8;text-decoration:underline"> </span>following<span style="color:#f8f8f8;text-decoration:underline"> </span>Kubernetes<span style="color:#f8f8f8;text-decoration:underline"> </span>secret<span style="color:#000;font-weight:bold">:</span></code></pre></div> -<p>yaml -apiVersion: v1 -kind: Secret -metadata: - name: jenkins-operator-credentials-<jenkins-cr-name> - namespace: <jenkins-cr-namespace> -stringData: - user: <username-for-manager-created-in-ldap> - password: <password-for-manager-created-in-ldap> -```</p> - -<p>Note: Values in stringData do not need to be base64 encoded. They are -encoded by Kubernetes when the manifest is applied.</p> -</blockquote> - - - - - - Docs: LDAP - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.6.x/ldap/ - Wed, 08 Dec 2021 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.6.x/ldap/ - - - - - -<p>Configuring LDAP is not supported out of the box, but can be achieved through -plugins and some well tuned configurations.</p> - -<p>The plugin we will use is: <a href="https://plugins.jenkins.io/ldap/">https://plugins.jenkins.io/ldap/</a></p> - -<blockquote> -<p>Note: This is an example of how LDAP authentication can be achieved. The LDAP -plugin is from a third-party, and there may be other alternatives that suits -your use case better. Use this guide with a grain of salt.</p> -</blockquote> - -<h2 id="requirements">Requirements</h2> - -<ul> -<li><p>LDAP server accessible from the Kubernetes cluster where your Jenkins -instance will live.</p></li> - -<li><p>Credentials to a manager account in your AD. Jenkins Operator will use -this account to authenticate with Jenkins for health checks, seed jobs, etc.</p></li> -</ul> - -<h2 id="steps">Steps</h2> - -<p>In your Jenkins configuration, add the following plugin:</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">plugins<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># Check https://plugins.jenkins.io/ldap/ to find the latest version.</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>ldap<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.7&#34;</span></code></pre></div> -<p>Easiest step is to then start up Jenkins then navigate to your instance&rsquo;s -&ldquo;Configure Global Security&rdquo; page and configure it accordingly.</p> - -<p><code>http://jenkins.example.com/configureSecurity/</code></p> - -<p>Once it&rsquo;s set up and tested, you can navigate to your JCasC page and export -the LDAP settings.</p> - -<p><code>https://jenkins.example.com/configuration-as-code/</code></p> - -<p>Feed the relevant new settings into your Kubernetes ConfigMap for your JCasC -settings.</p> - -<p>Here&rsquo;s a snippet of the LDAP-related configurations:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>v1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>ConfigMap<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-casc<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>data<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>ldap.yaml<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">| -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">jenkins:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>securityRealm<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>ldap<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>displayNameAttributeName<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;name&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>groupSearchBase<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;OU=Groups,OU=MyCompany&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>groupSearchFilter<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;(&amp; (cn={0}) (objectclass=group) )&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>inhibitInferRootDN<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">false</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>managerDN<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;CN=Jenkins Admin,OU=UsersSystem,OU=UsersOther,OU=MyCompany,DC=mycompany,DC=local&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>managerPasswordSecret<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;${LDAP_MANAGER_PASSWORD}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>rootDN<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;DC=mycompany,DC=local&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>server<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;MyCompany.local&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>userSearch<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;SamAccountName={0}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>userSearchBase<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;OU=MyCompany&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>disableMailAddressResolver<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">false</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>disableRolePrefixing<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">true</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>groupIdStrategy<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;caseInsensitive&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>userIdStrategy<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;caseInsensitive&#34;</span></code></pre></div> -<blockquote> -<p>Note the use of <code>${LDAP_MANAGER_PASSWORD}</code> above. You can reference -Kubernetes secrets in your JCasC ConfigMaps by adding the following to your -Jenkins object:</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">&gt;<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>&gt;<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:#8f5902;font-style:italic">&gt; </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">configurationAsCode:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#8f5902;font-style:italic">&gt; </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">configurations:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#8f5902;font-style:italic">&gt; </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">- name: jenkins-casc</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#8f5902;font-style:italic">&gt; </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">secret:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#8f5902;font-style:italic">&gt; </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"># This here</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#8f5902;font-style:italic">&gt; </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">name: jenkins-casc-secrets</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>&gt;<span style="color:#f8f8f8;text-decoration:underline"> </span>```<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>&gt;<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>&gt;<span style="color:#f8f8f8;text-decoration:underline"> </span>```yaml<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>&gt;<span style="color:#f8f8f8;text-decoration:underline"> </span>apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>v1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>&gt;<span style="color:#f8f8f8;text-decoration:underline"> </span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Secret<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>&gt;<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><span style="color:#8f5902;font-style:italic">&gt; </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">name: jenkins-cred-conf-secrets</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>&gt;<span style="color:#f8f8f8;text-decoration:underline"> </span>stringData<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#8f5902;font-style:italic">&gt; </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">LDAP_MANAGER_PASSWORD: &lt;password-for-manager-created-in-ldap&gt;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>&gt;<span style="color:#f8f8f8;text-decoration:underline"> </span>```<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>&gt;<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>&gt;<span style="color:#f8f8f8;text-decoration:underline"> </span>Schema<span style="color:#f8f8f8;text-decoration:underline"> </span>reference<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span>v1alpha2.ConfigurationAsCode<span style="color:#000;font-weight:bold">]</span>(./schema/<span style="color:#8f5902;font-style:italic">#github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2.ConfigurationAsCode)</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>Finally<span style="color:#f8f8f8;text-decoration:underline"> </span>you<span style="color:#f8f8f8;text-decoration:underline"> </span>must<span style="color:#f8f8f8;text-decoration:underline"> </span>configure<span style="color:#f8f8f8;text-decoration:underline"> </span>the<span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> </span>operator<span style="color:#f8f8f8;text-decoration:underline"> </span>to<span style="color:#f8f8f8;text-decoration:underline"> </span>use<span style="color:#f8f8f8;text-decoration:underline"> </span>the<span style="color:#f8f8f8;text-decoration:underline"> </span>manager<span style="color:#4e9a06">&#39;s -</span><span style="color:#4e9a06">credentials from the AD. -</span><span style="color:#4e9a06"> -</span><span style="color:#4e9a06">This is because this procedure will disable Jenkins&#39;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>own<span style="color:#f8f8f8;text-decoration:underline"> </span>user<span style="color:#f8f8f8;text-decoration:underline"> </span>database<span style="color:#000;font-weight:bold">,</span><span style="color:#f8f8f8;text-decoration:underline"> </span>and<span style="color:#f8f8f8;text-decoration:underline"> </span>the<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> </span>operator<span style="color:#f8f8f8;text-decoration:underline"> </span>still<span style="color:#f8f8f8;text-decoration:underline"> </span>needs<span style="color:#f8f8f8;text-decoration:underline"> </span>to<span style="color:#f8f8f8;text-decoration:underline"> </span>be<span style="color:#f8f8f8;text-decoration:underline"> </span>able<span style="color:#f8f8f8;text-decoration:underline"> </span>to<span style="color:#f8f8f8;text-decoration:underline"> </span>talk<span style="color:#f8f8f8;text-decoration:underline"> </span>to<span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> </span>in<span style="color:#f8f8f8;text-decoration:underline"> </span>an<span style="color:#f8f8f8;text-decoration:underline"> </span>authorized<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>manner.<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>Create<span style="color:#f8f8f8;text-decoration:underline"> </span>the<span style="color:#f8f8f8;text-decoration:underline"> </span>following<span style="color:#f8f8f8;text-decoration:underline"> </span>Kubernetes<span style="color:#f8f8f8;text-decoration:underline"> </span>secret<span style="color:#000;font-weight:bold">:</span></code></pre></div> -<p>yaml -apiVersion: v1 -kind: Secret -metadata: - name: jenkins-operator-credentials-<jenkins-cr-name> - namespace: <jenkins-cr-namespace> -stringData: - user: <username-for-manager-created-in-ldap> - password: <password-for-manager-created-in-ldap> -```</p> - -<p>Note: Values in stringData do not need to be base64 encoded. They are -encoded by Kubernetes when the manifest is applied.</p> -</blockquote> - - - - - - Docs: OpenShift - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/openshift/ - Wed, 08 Dec 2021 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/openshift/ - - - - - -<h2 id="release-0-7-0-is-not-compatible-with-openshift">Release 0.7.0 is not compatible with OpenShift.</h2> - - - - - - Docs: OpenShift - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.6.x/openshift/ - Wed, 08 Dec 2021 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.6.x/openshift/ - - - - - -<h2 id="release-0-6-0-is-not-compatible-with-openshift-and-jenkinsimage-crd-was-removed-from-it">Release 0.6.0 is not compatible with OpenShift and JenkinsImage crd was removed from it.</h2> - - - - - - Docs: Configure backup and restore - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.5.x/configure-backup-and-restore/ - Mon, 25 Jan 2021 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.5.x/configure-backup-and-restore/ - - - - - -<p>Backup and restore is done by a container sidecar.</p> - -<h3 id="pvc">PVC</h3> - -<h4 id="create-pvc">Create PVC</h4> - -<p>Save to the file named pvc.yaml:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>v1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>PersistentVolumeClaim<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>&lt;pvc_name<span style="color:#8f5902;font-style:italic">&gt; -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">namespace: &lt;namespace&gt;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>accessModes<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>ReadWriteOnce<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>requests<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>storage<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>500Gi</code></pre></div> -<p>Run the following command:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">$ kubectl -n &lt;namespace&gt; create -f pvc.yaml</code></pre></div> -<h4 id="configure-jenkins-cr">Configure Jenkins CR</h4> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.io/v1alpha2<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>&lt;cr_name<span style="color:#8f5902;font-style:italic">&gt; -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">namespace: &lt;namespace&gt;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>master<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>securityContext<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>runAsUser<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1000</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>fsGroup<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1000</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>containers<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-master<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>image<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins/jenkins<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">2.263</span><span style="color:#0000cf;font-weight:bold">.2</span>-lts-alpine<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># container responsible for the backup and restore</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>env<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>BACKUP_DIR<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/backup<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>JENKINS_HOME<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/jenkins-home<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>BACKUP_COUNT<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;3&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># keep only the 2 most recent backups</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>image<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>virtuslab/jenkins-operator-backup-pvc<span style="color:#000;font-weight:bold">:</span>v0<span style="color:#0000cf;font-weight:bold">.1</span><span style="color:#0000cf;font-weight:bold">.0</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># look at backup/pvc directory</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>imagePullPolicy<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>IfNotPresent<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>volumeMounts<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>mountPath<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/jenkins-home<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># Jenkins home volume</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-home<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>mountPath<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># backup volume</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>volumes<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># PVC volume where backups will be stored</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>persistentVolumeClaim<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>claimName<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>&lt;pvc_name<span style="color:#8f5902;font-style:italic">&gt; -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">backup:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>containerName<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># container name is responsible for backup</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>action<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>command<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>/home/user/bin/backup.sh<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># this command is invoked on &#34;backup&#34; container to make backup, for example /home/user/bin/backup.sh &lt;backup_number&gt;, &lt;backup_number&gt; is passed by operator</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>interval<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">30</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># how often make backup in seconds</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>makeBackupBeforePodDeletion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">true</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># make a backup before pod deletion</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>restore<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>containerName<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># container name is responsible for restore backup</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>action<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>command<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>/home/user/bin/restore.sh<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># this command is invoked on &#34;backup&#34; container to make restore backup, for example /home/user/bin/restore.sh &lt;backup_number&gt;, &lt;backup_number&gt; is passed by operator</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>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; 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> - - - - - Docs: AKS - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.5.x/aks/ - Mon, 18 Jan 2021 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.5.x/aks/ - - - - <p>Azure AKS managed Kubernetes service adds to every pod the following environment variables:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>KUBERNETES_PORT_443_TCP_ADDR<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>KUBERNETES_PORT<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>tcp<span style="color:#000;font-weight:bold">:</span>//<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>KUBERNETES_PORT_443_TCP<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>tcp<span style="color:#000;font-weight:bold">:</span>//<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>KUBERNETES_SERVICE_HOST<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span></code></pre></div> -<p>The operator is aware of it and omits these environment variables when checking if a Jenkins pod environment has been changed. It prevents the -restart of a Jenkins pod over and over again.</p> - - - - - - Docs: Custom Backup and Restore Providers - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.5.x/custom-backup-and-restore/ - Mon, 18 Jan 2021 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.5.x/custom-backup-and-restore/ - - - - - -<p>With enough effort one can create a custom backup and restore provider -for the Jenkins Operator.</p> - -<h2 id="requirements">Requirements</h2> - -<p>Two commands (e.g. scripts) are required:</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> - -<p>One of those scripts (or the entry point of the container) needs to be responsible -for backup cleanup or rotation if required, or an external system.</p> - -<h2 id="how-it-works">How it works</h2> - -<p>The mechanism relies on basic Kubernetes and UNIX functionalities.</p> - -<p>The backup (and restore) container runs as a sidecar in the same -Kubernetes pod as the Jenkins master.</p> - -<p>Name of the backup and restore containers can be set as necessary using -<code>spec.backup.containerName</code> and <code>spec.restore.containerName</code>. -In most cases it will be the same container, but we allow for less common use cases.</p> - -<p>The operator will call a backup or restore commands inside a sidecar container when necessary:</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> - -<p>This example shows abbreviated version of a simple AWS S3 backup implementation -using: <code>aws-cli</code>, <code>bash</code> and <code>kube2iam</code>.</p> - -<p>In addition to your normal <code>Jenkins</code> <code>CustomResource</code> some additional settings -for backup and restore are required, e.g.:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.io/v1alpha1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>example<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>namespace<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>master<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>masterAnnotations<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>iam.amazonaws.com/role<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;my-example-backup-role&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># tell kube2iam where the AWS IAM role is</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>containers<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-master<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>...<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># container responsible for backup and restore</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>image<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>quay.io/virtuslab/aws-cli<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.16</span><span style="color:#0000cf;font-weight:bold">.263</span><span style="color:#0000cf;font-weight:bold">-2</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>workingDir<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/home/user/bin/<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>command<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># our container entry point</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>sleep<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>infinity<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>env<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>BACKUP_BUCKET<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>my-example-bucket<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># the S3 bucket name to use</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>BACKUP_PATH<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>my-backup-path<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># the S3 bucket path prefix to use</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>JENKINS_HOME<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/jenkins-home<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># the path to mount jenkins home dir in the backup container</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>volumeMounts<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>mountPath<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/jenkins-home<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># Jenkins home volume</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-home<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>mountPath<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/home/user/bin/backup.sh<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup-scripts<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>subPath<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup.sh<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>readOnly<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">true</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>mountPath<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/home/user/bin/restore.sh<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup-scripts<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>subPath<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>restore.sh<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>readOnly<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">true</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>volumes<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup-scripts<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configMap<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>defaultMode<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">0754</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-backup-s3<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>securityContext<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># make sure both containers use the same UID and GUID</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>runAsUser<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1000</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>fsGroup<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1000</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>...<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>containerName<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># container name responsible for backup</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>interval<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">3600</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># how often make a backup in seconds</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>makeBackupBeforePodDeletion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">true</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># trigger backup just before deleting the pod</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>action<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>command<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># this command is invoked on &#34;backup&#34; container to create a backup,</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># &lt;backup_number&gt; is passed by operator,</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># for example /home/user/bin/backup.sh &lt;backup_number&gt;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>/home/user/bin/backup.sh<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>restore<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>containerName<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># container name is responsible for restore backup</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>action<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>command<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># this command is invoked on &#34;backup&#34; container to restore a backup,</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># &lt;backup_number&gt; is passed by operator</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># for example /home/user/bin/restore.sh &lt;backup_number&gt;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>/home/user/bin/restore.sh<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#8f5902;font-style:italic"># recoveryOnce: &lt;backup_number&gt; # if want to restore specific backup configure this field and then Jenkins will be restarted and desired backup will be restored</span></code></pre></div> -<p>The actual backup and restore scripts will be provided in a <code>ConfigMap</code>:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>ConfigMap<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>v1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-backup-s3<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>namespace<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>labels<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>app<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>data<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup.sh<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>|<span style="color:#8f5902;font-style:italic">- -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">#!/bin/bash -xeu</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">[</span><span style="color:#f8f8f8;text-decoration:underline"> </span>!<span style="color:#f8f8f8;text-decoration:underline"> </span>$<span style="color:#8f5902;font-style:italic"># -eq 1 ]] &amp;&amp; echo &#34;Usage: $0 backup_number&#34; &amp;&amp; exit 1;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">[</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-z<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;${BACKUP_BUCKET}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">]</span><span style="color:#000;font-weight:bold">]</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Required &#39;BACKUP_BUCKET&#39; env not set&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exit<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>;<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">[</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-z<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;${BACKUP_PATH}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">]</span><span style="color:#000;font-weight:bold">]</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Required &#39;BACKUP_PATH&#39; env not set&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exit<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>;<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">[</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-z<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;${JENKINS_HOME}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">]</span><span style="color:#000;font-weight:bold">]</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Required &#39;JENKINS_HOME&#39; env not set&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exit<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>;<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup_number=$<span style="color:#0000cf;font-weight:bold">1</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Running backup #${backup_number}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>BACKUP_TMP_DIR=$(mktemp<span style="color:#f8f8f8;text-decoration:underline"> </span>-d)<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>tar<span style="color:#f8f8f8;text-decoration:underline"> </span>-C<span style="color:#f8f8f8;text-decoration:underline"> </span>${JENKINS_HOME}<span style="color:#f8f8f8;text-decoration:underline"> </span>-czf<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;${BACKUP_TMP_DIR}/${backup_number}.tar.gz&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>--exclude<span style="color:#f8f8f8;text-decoration:underline"> </span>jobs/<span style="color:#8f5902;font-style:italic">*/workspace*</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-c<span style="color:#f8f8f8;text-decoration:underline"> </span>jobs<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>\<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>aws<span style="color:#f8f8f8;text-decoration:underline"> </span>s3<span style="color:#f8f8f8;text-decoration:underline"> </span>cp<span style="color:#f8f8f8;text-decoration:underline"> </span>${BACKUP_TMP_DIR}/${backup_number}.tar.gz<span style="color:#f8f8f8;text-decoration:underline"> </span>s3<span style="color:#000;font-weight:bold">:</span>//${BACKUP_BUCKET}/${BACKUP_PATH}/${backup_number}.tar.gz<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span>Done<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>restore.sh<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>|<span style="color:#8f5902;font-style:italic">- -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">#!/bin/bash -xeu</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">[</span><span style="color:#f8f8f8;text-decoration:underline"> </span>!<span style="color:#f8f8f8;text-decoration:underline"> </span>$<span style="color:#8f5902;font-style:italic"># -eq 1 ]] &amp;&amp; echo &#34;Usage: $0 backup_number&#34; &amp;&amp; exit 1</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">[</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-z<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;${BACKUP_BUCKET}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">]</span><span style="color:#000;font-weight:bold">]</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Required &#39;BACKUP_BUCKET&#39; env not set&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exit<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>;<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">[</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-z<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;${BACKUP_PATH}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">]</span><span style="color:#000;font-weight:bold">]</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Required &#39;BACKUP_PATH&#39; env not set&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exit<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>;<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">[</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-z<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;${JENKINS_HOME}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">]</span><span style="color:#000;font-weight:bold">]</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Required &#39;JENKINS_HOME&#39; env not set&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exit<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>;<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup_number=$<span style="color:#0000cf;font-weight:bold">1</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Running restore #${backup_number}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>BACKUP_TMP_DIR=$(mktemp<span style="color:#f8f8f8;text-decoration:underline"> </span>-d)<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>aws<span style="color:#f8f8f8;text-decoration:underline"> </span>s3<span style="color:#f8f8f8;text-decoration:underline"> </span>cp<span style="color:#f8f8f8;text-decoration:underline"> </span>s3<span style="color:#000;font-weight:bold">:</span>//${BACKUP_BUCKET}/${BACKUP_PATH}/${backup_number}.tar.gz<span style="color:#f8f8f8;text-decoration:underline"> </span>${BACKUP_TMP_DIR}/${backup_number}.tar.gz<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>tar<span style="color:#f8f8f8;text-decoration:underline"> </span>-C<span style="color:#f8f8f8;text-decoration:underline"> </span>${JENKINS_HOME}<span style="color:#f8f8f8;text-decoration:underline"> </span>-zxf<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;${BACKUP_TMP_DIR}/${backup_number}.tar.gz&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span>Done</code></pre></div> -<p>In our example we will use S3 bucket lifecycle policy to keep -the number of backups under control, e.g. Cloud Formation fragment:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#f8f8f8;text-decoration:underline"> </span>Type<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>AWS<span style="color:#000;font-weight:bold">:</span><span style="color:#000;font-weight:bold">:</span>S3<span style="color:#000;font-weight:bold">:</span><span style="color:#000;font-weight:bold">:</span>Bucket<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Properties<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>BucketName<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>my-example-bucket<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>...<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>LifecycleConfiguration<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Rules<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>Id<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>BackupCleanup<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Status<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Enabled<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Prefix<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>my-backup-path<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>ExpirationInDays<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">7</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>NoncurrentVersionExpirationInDays<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">14</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>AbortIncompleteMultipartUpload<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>DaysAfterInitiation<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">3</span></code></pre></div> - - - - - Docs: Notifications - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.5.x/notifications/ - Mon, 18 Jan 2021 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.5.x/notifications/ - - - - - -<h2 id="slack">Slack</h2> - -<p>Please follow <a href="https://api.slack.com/incoming-webhooks">this</a> instructions to get web hook URL.</p> - -<p>Create web hook secret with name <code>jenkins-operator-notification-data</code>. Contains key <code>url</code> with provided web hook URL.</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">$ kubectl create secret generic jenkins-operator-notification-data --from-literal<span style="color:#ce5c00;font-weight:bold">=</span><span style="color:#000">url</span><span style="color:#ce5c00;font-weight:bold">=</span>&lt;webhook_url&gt;</code></pre></div> -<p>Example configuration for Slack:</p> -<pre><code>kind: Jenkins -spec: - master: - notifications: - - level: info - verbose: true - name: <name> - slack: - webHookURLSecretKeySelector: - secret: - name: <secret_name> - key: <key></code></pre> -<h2 id="microsoft-teams">Microsoft Teams</h2> - -<p>Please follow <a href="https://docs.microsoft.com/en-gb/outlook/actionable-messages/send-via-connectors">this</a> instructions to get web hook URL.</p> - -<p>Example configuration for Microsoft Teams:</p> -<pre><code>kind: Jenkins -spec: - master: - notifications: - - level: info - verbose: true - name: <name> - teams: - webHookURLSecretKeySelector: - secret: - name: <secret_name> - key: <key></code></pre> -<h2 id="mailgun">Mailgun</h2> - -<p>Example configuration for Mailgun:</p> -<pre><code>kind: Jenkins -spec: - master: - notifications: - - level: info - verbose: true - name: <name> - mailgun: - domain: <domain> - apiKeySecretKeySelector: - secret: - name: <secret_name> - key: <key> - recipient: <your_email> - from: <mailgun_email></code></pre> -<h2 id="debug-options">Debug options</h2> - -<p>As you see there is two debugging options:</p> - -<ul> -<li><p><code>level</code> (warning/info) - Set level of messages to send.</p></li> - -<li><p><code>verbose</code> - Print stacktrace and additional error messages</p></li> -</ul> - -<h2 id="multiple-providers">Multiple providers</h2> - -<p>You can use multiple providers to send notification to another communication channels at the same time. -For example you will send notifications to Slack and Teams.</p> -<pre><code>kind: Jenkins -spec: - master: - notifications: - - level: info - verbose: true - name: nslack - slack: - webHookURLSecretKeySelector: - secret: - name: <secret_name> - key: <key> - - level: info - verbose: true - name: nteams - teams: - webHookURLSecretKeySelector: - secret: - name: <secret_name> - key: <key></code></pre> - - - - - Docs: AKS - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.4.x/aks/ - Mon, 13 Apr 2020 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.4.x/aks/ - - - - <p>Azure AKS managed Kubernetes service adds to every pod the following environment variables:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>KUBERNETES_PORT_443_TCP_ADDR<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>KUBERNETES_PORT<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>tcp<span style="color:#000;font-weight:bold">:</span>//<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>KUBERNETES_PORT_443_TCP<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>tcp<span style="color:#000;font-weight:bold">:</span>//<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>KUBERNETES_SERVICE_HOST<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span></code></pre></div> -<p>The operator is aware of it and omits these environment variables when checking if a Jenkins pod environment has been changed. It prevents the -restart of a Jenkins pod over and over again.</p> - - - - - - Docs: Configure backup and restore - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.4.x/configure-backup-and-restore/ - Mon, 13 Apr 2020 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.4.x/configure-backup-and-restore/ - - - - - -<p>Backup and restore is done by a container sidecar.</p> - -<h3 id="pvc">PVC</h3> - -<h4 id="create-pvc">Create PVC</h4> - -<p>Save to the file named pvc.yaml:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>v1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>PersistentVolumeClaim<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>&lt;pvc_name<span style="color:#8f5902;font-style:italic">&gt; -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">namespace: &lt;namespace&gt;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>accessModes<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>ReadWriteOnce<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>requests<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>storage<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>500Gi</code></pre></div> -<p>Run the following command:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">$ kubectl -n &lt;namespace&gt; create -f pvc.yaml</code></pre></div> -<h4 id="configure-jenkins-cr">Configure Jenkins CR</h4> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.io/v1alpha2<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>&lt;cr_name<span style="color:#8f5902;font-style:italic">&gt; -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">namespace: &lt;namespace&gt;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>master<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>securityContext<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>runAsUser<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1000</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>fsGroup<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1000</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>containers<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-master<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>image<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins/jenkins<span style="color:#000;font-weight:bold">:</span>lts<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># container responsible for the backup and restore</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>env<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>BACKUP_DIR<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/backup<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>JENKINS_HOME<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/jenkins-home<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>BACKUP_COUNT<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;3&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># keep only the 2 most recent backups</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>image<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>virtuslab/jenkins-operator-backup-pvc<span style="color:#000;font-weight:bold">:</span>v0<span style="color:#0000cf;font-weight:bold">.0</span><span style="color:#0000cf;font-weight:bold">.8</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># look at backup/pvc directory</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>imagePullPolicy<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>IfNotPresent<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>volumeMounts<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>mountPath<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/jenkins-home<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># Jenkins home volume</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-home<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>mountPath<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># backup volume</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>volumes<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># PVC volume where backups will be stored</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>persistentVolumeClaim<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>claimName<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>&lt;pvc_name<span style="color:#8f5902;font-style:italic">&gt; -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">backup:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>containerName<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># container name is responsible for backup</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>action<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>command<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>/home/user/bin/backup.sh<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># this command is invoked on &#34;backup&#34; container to make backup, for example /home/user/bin/backup.sh &lt;backup_number&gt;, &lt;backup_number&gt; is passed by operator</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>interval<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">30</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># how often make backup in seconds</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>makeBackupBeforePodDeletion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">true</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># make a backup before pod deletion</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>restore<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>containerName<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># container name is responsible for restore backup</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>action<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>command<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>/home/user/bin/restore.sh<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># this command is invoked on &#34;backup&#34; container to make restore backup, for example /home/user/bin/restore.sh &lt;backup_number&gt;, &lt;backup_number&gt; is passed by operator</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">#recoveryOnce: &lt;backup_number&gt; # if want to restore specific backup configure this field and then Jenkins will be restarted and desired backup will be restored</span></code></pre></div> - - - - - Docs: Custom Backup and Restore Providers - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.4.x/custom-backup-and-restore/ - Mon, 13 Apr 2020 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.4.x/custom-backup-and-restore/ - - - - - -<p>With enough effort one can create a custom backup and restore provider -for the Jenkins Operator.</p> - -<h2 id="requirements">Requirements</h2> - -<p>Two commands (e.g. scripts) are required:</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> - -<p>One of those scripts (or the entry point of the container) needs to be responsible -for backup cleanup or rotation if required, or an external system.</p> - -<h2 id="how-it-works">How it works</h2> - -<p>The mechanism relies on basic Kubernetes and UNIX functionalities.</p> - -<p>The backup (and restore) container runs as a sidecar in the same -Kubernetes pod as the Jenkins master.</p> - -<p>Name of the backup and restore containers can be set as necessary using -<code>spec.backup.containerName</code> and <code>spec.restore.containerName</code>. -In most cases it will be the same container, but we allow for less common use cases.</p> - -<p>The operator will call a backup or restore commands inside a sidecar container when necessary:</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> - -<p>This example shows abbreviated version of a simple AWS S3 backup implementation -using: <code>aws-cli</code>, <code>bash</code> and <code>kube2iam</code>.</p> - -<p>In addition to your normal <code>Jenkins</code> <code>CustomResource</code> some additional settings -for backup and restore are required, e.g.:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.io/v1alpha1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>example<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>namespace<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>master<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>masterAnnotations<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>iam.amazonaws.com/role<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;my-example-backup-role&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># tell kube2iam where the AWS IAM role is</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>containers<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-master<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>...<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># container responsible for backup and restore</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>image<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>quay.io/virtuslab/aws-cli<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.16</span><span style="color:#0000cf;font-weight:bold">.263</span><span style="color:#0000cf;font-weight:bold">-2</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>workingDir<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/home/user/bin/<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>command<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># our container entry point</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>sleep<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>infinity<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>env<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>BACKUP_BUCKET<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>my-example-bucket<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># the S3 bucket name to use</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>BACKUP_PATH<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>my-backup-path<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># the S3 bucket path prefix to use</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>JENKINS_HOME<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/jenkins-home<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># the path to mount jenkins home dir in the backup container</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>volumeMounts<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>mountPath<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/jenkins-home<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># Jenkins home volume</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-home<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>mountPath<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/home/user/bin/backup.sh<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup-scripts<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>subPath<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup.sh<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>readOnly<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">true</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>mountPath<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/home/user/bin/restore.sh<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup-scripts<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>subPath<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>restore.sh<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>readOnly<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">true</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>volumes<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup-scripts<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configMap<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>defaultMode<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">0754</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-backup-s3<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>securityContext<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># make sure both containers use the same UID and GUID</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>runAsUser<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1000</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>fsGroup<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1000</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>...<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>containerName<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># container name responsible for backup</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>interval<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">3600</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># how often make a backup in seconds</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>makeBackupBeforePodDeletion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">true</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># trigger backup just before deleting the pod</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>action<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>command<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># this command is invoked on &#34;backup&#34; container to create a backup,</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># &lt;backup_number&gt; is passed by operator,</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># for example /home/user/bin/backup.sh &lt;backup_number&gt;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>/home/user/bin/backup.sh<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>restore<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>containerName<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># container name is responsible for restore backup</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>action<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>command<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># this command is invoked on &#34;backup&#34; container to restore a backup,</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># &lt;backup_number&gt; is passed by operator</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># for example /home/user/bin/restore.sh &lt;backup_number&gt;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>/home/user/bin/restore.sh<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#8f5902;font-style:italic"># recoveryOnce: &lt;backup_number&gt; # if want to restore specific backup configure this field and then Jenkins will be restarted and desired backup will be restored</span></code></pre></div> -<p>The actual backup and restore scripts will be provided in a <code>ConfigMap</code>:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>ConfigMap<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>v1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-backup-s3<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>namespace<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>labels<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>app<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>data<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup.sh<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>|<span style="color:#8f5902;font-style:italic">- -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">#!/bin/bash -xeu</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">[</span><span style="color:#f8f8f8;text-decoration:underline"> </span>!<span style="color:#f8f8f8;text-decoration:underline"> </span>$<span style="color:#8f5902;font-style:italic"># -eq 1 ]] &amp;&amp; echo &#34;Usage: $0 backup_number&#34; &amp;&amp; exit 1;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">[</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-z<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;${BACKUP_BUCKET}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">]</span><span style="color:#000;font-weight:bold">]</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Required &#39;BACKUP_BUCKET&#39; env not set&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exit<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>;<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">[</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-z<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;${BACKUP_PATH}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">]</span><span style="color:#000;font-weight:bold">]</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Required &#39;BACKUP_PATH&#39; env not set&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exit<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>;<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">[</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-z<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;${JENKINS_HOME}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">]</span><span style="color:#000;font-weight:bold">]</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Required &#39;JENKINS_HOME&#39; env not set&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exit<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>;<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup_number=$<span style="color:#0000cf;font-weight:bold">1</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Running backup #${backup_number}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>BACKUP_TMP_DIR=$(mktemp<span style="color:#f8f8f8;text-decoration:underline"> </span>-d)<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>tar<span style="color:#f8f8f8;text-decoration:underline"> </span>-C<span style="color:#f8f8f8;text-decoration:underline"> </span>${JENKINS_HOME}<span style="color:#f8f8f8;text-decoration:underline"> </span>-czf<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;${BACKUP_TMP_DIR}/${backup_number}.tar.gz&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>--exclude<span style="color:#f8f8f8;text-decoration:underline"> </span>jobs/<span style="color:#8f5902;font-style:italic">*/workspace*</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-c<span style="color:#f8f8f8;text-decoration:underline"> </span>jobs<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>\<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>aws<span style="color:#f8f8f8;text-decoration:underline"> </span>s3<span style="color:#f8f8f8;text-decoration:underline"> </span>cp<span style="color:#f8f8f8;text-decoration:underline"> </span>${BACKUP_TMP_DIR}/${backup_number}.tar.gz<span style="color:#f8f8f8;text-decoration:underline"> </span>s3<span style="color:#000;font-weight:bold">:</span>//${BACKUP_BUCKET}/${BACKUP_PATH}/${backup_number}.tar.gz<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span>Done<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>restore.sh<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>|<span style="color:#8f5902;font-style:italic">- -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">#!/bin/bash -xeu</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">[</span><span style="color:#f8f8f8;text-decoration:underline"> </span>!<span style="color:#f8f8f8;text-decoration:underline"> </span>$<span style="color:#8f5902;font-style:italic"># -eq 1 ]] &amp;&amp; echo &#34;Usage: $0 backup_number&#34; &amp;&amp; exit 1</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">[</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-z<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;${BACKUP_BUCKET}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">]</span><span style="color:#000;font-weight:bold">]</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Required &#39;BACKUP_BUCKET&#39; env not set&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exit<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>;<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">[</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-z<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;${BACKUP_PATH}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">]</span><span style="color:#000;font-weight:bold">]</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Required &#39;BACKUP_PATH&#39; env not set&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exit<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>;<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">[</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-z<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;${JENKINS_HOME}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">]</span><span style="color:#000;font-weight:bold">]</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Required &#39;JENKINS_HOME&#39; env not set&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exit<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>;<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup_number=$<span style="color:#0000cf;font-weight:bold">1</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Running restore #${backup_number}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>BACKUP_TMP_DIR=$(mktemp<span style="color:#f8f8f8;text-decoration:underline"> </span>-d)<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>aws<span style="color:#f8f8f8;text-decoration:underline"> </span>s3<span style="color:#f8f8f8;text-decoration:underline"> </span>cp<span style="color:#f8f8f8;text-decoration:underline"> </span>s3<span style="color:#000;font-weight:bold">:</span>//${BACKUP_BUCKET}/${BACKUP_PATH}/${backup_number}.tar.gz<span style="color:#f8f8f8;text-decoration:underline"> </span>${BACKUP_TMP_DIR}/${backup_number}.tar.gz<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>tar<span style="color:#f8f8f8;text-decoration:underline"> </span>-C<span style="color:#f8f8f8;text-decoration:underline"> </span>${JENKINS_HOME}<span style="color:#f8f8f8;text-decoration:underline"> </span>-zxf<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;${BACKUP_TMP_DIR}/${backup_number}.tar.gz&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span>Done</code></pre></div> -<p>In our example we will use S3 bucket lifecycle policy to keep -the number of backups under control, e.g. Cloud Formation fragment:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#f8f8f8;text-decoration:underline"> </span>Type<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>AWS<span style="color:#000;font-weight:bold">:</span><span style="color:#000;font-weight:bold">:</span>S3<span style="color:#000;font-weight:bold">:</span><span style="color:#000;font-weight:bold">:</span>Bucket<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Properties<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>BucketName<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>my-example-bucket<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>...<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>LifecycleConfiguration<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Rules<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>Id<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>BackupCleanup<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Status<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Enabled<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Prefix<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>my-backup-path<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>ExpirationInDays<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">7</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>NoncurrentVersionExpirationInDays<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">14</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>AbortIncompleteMultipartUpload<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>DaysAfterInitiation<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">3</span></code></pre></div> - - - - - Docs: Notifications - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.4.x/notifications/ - Mon, 13 Apr 2020 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.4.x/notifications/ - - - - - -<h2 id="slack">Slack</h2> - -<p>Please follow <a href="https://api.slack.com/incoming-webhooks">this</a> instructions to get web hook URL.</p> - -<p>Create web hook secret with name <code>jenkins-operator-notification-data</code>. Contains key <code>url</code> with provided web hook URL.</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">$ kubectl create secret generic jenkins-operator-notification-data --from-literal<span style="color:#ce5c00;font-weight:bold">=</span><span style="color:#000">url</span><span style="color:#ce5c00;font-weight:bold">=</span>&lt;webhook_url&gt;</code></pre></div> -<p>Example configuration for Slack:</p> -<pre><code>kind: Jenkins -spec: - master: - notifications: - - level: info - verbose: true - name: <name> - slack: - webHookURLSecretKeySelector: - secret: - name: <secret_name> - key: <key></code></pre> -<h2 id="microsoft-teams">Microsoft Teams</h2> - -<p>Please follow <a href="https://docs.microsoft.com/en-gb/outlook/actionable-messages/send-via-connectors">this</a> instructions to get web hook URL.</p> - -<p>Example configuration for Microsoft Teams:</p> -<pre><code>kind: Jenkins -spec: - master: - notifications: - - level: info - verbose: true - name: <name> - teams: - webHookURLSecretKeySelector: - secret: - name: <secret_name> - key: <key></code></pre> -<h2 id="mailgun">Mailgun</h2> - -<p>Example configuration for Mailgun:</p> -<pre><code>kind: Jenkins -spec: - master: - notifications: - - level: info - verbose: true - name: <name> - mailgun: - domain: <domain> - apiKeySecretKeySelector: - secret: - name: <secret_name> - key: <key> - recipient: <your_email> - from: <mailgun_email></code></pre> -<h2 id="debug-options">Debug options</h2> - -<p>As you see there is two debugging options:</p> - -<ul> -<li><p><code>level</code> (warning/info) - Set level of messages to send.</p></li> - -<li><p><code>verbose</code> - Print stacktrace and additional error messages</p></li> -</ul> - -<h2 id="multiple-providers">Multiple providers</h2> - -<p>You can use multiple providers to send notification to another communication channels at the same time. -For example you will send notifications to Slack and Teams.</p> -<pre><code>kind: Jenkins -spec: - master: - notifications: - - level: info - verbose: true - name: nslack - slack: - webHookURLSecretKeySelector: - secret: - name: <secret_name> - key: <key> - - level: info - verbose: true - name: nteams - teams: - webHookURLSecretKeySelector: - secret: - name: <secret_name> - key: <key></code></pre> - - - - - Docs: Migration from v0.2.x - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.3.x/migration/ - Fri, 03 Jan 2020 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.3.x/migration/ - - - - - -<h3 id="changes">Changes</h3> - -<ul> -<li>new Jenkins Custom Resource Definition version <code>jenkins.io/v1alpha2</code>: - -<ul> -<li><code>spec.master.masterAnnotations</code> was deprecated, use <code>spec.master.annotations</code></li> -<li>added <code>spec.notifications</code></li> -<li>added <code>spec.master.tolerations</code> (in v0.3.1)</li> -<li>added <code>spec.master.disableCSRFProtection</code></li> -</ul></li> -</ul> - -<h3 id="migration">Migration</h3> - -<ul> -<li>adjust the operator image version, e.g. <code>image: virtuslab/jenkins-operator:v0.3.1</code></li> -<li>migrate your Jenkins Custom Resources to <code>apiVersion: jenkins.io/v1alpha2</code>, adjust content if necessary</li> -</ul> - -<p>The v0.3.x should work fine with <code>jenkins.io/v1alpha1</code>, but we recommend using <code>jenkins.io/v1alpha2</code>.</p> - - - - - - Docs: AKS - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.3.x/aks/ - Fri, 20 Dec 2019 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.3.x/aks/ - - - - <p>Azure AKS managed Kubernetes service adds to every pod the following environment variables:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>KUBERNETES_PORT_443_TCP_ADDR<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>KUBERNETES_PORT<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>tcp<span style="color:#000;font-weight:bold">:</span>//<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>KUBERNETES_PORT_443_TCP<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>tcp<span style="color:#000;font-weight:bold">:</span>//<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>KUBERNETES_SERVICE_HOST<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span></code></pre></div> -<p>The operator is aware of it and omits these environment variables when checking if a Jenkins pod environment has been changed. It prevents the -restart of a Jenkins pod over and over again.</p> - - - - - - Docs: Configure backup and restore - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.3.x/configure-backup-and-restore/ - Fri, 20 Dec 2019 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.3.x/configure-backup-and-restore/ - - - - - -<p>Backup and restore is done by a container sidecar.</p> - -<h3 id="pvc">PVC</h3> - -<h4 id="create-pvc">Create PVC</h4> - -<p>Save to the file named pvc.yaml:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>v1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>PersistentVolumeClaim<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>&lt;pvc_name<span style="color:#8f5902;font-style:italic">&gt; -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">namespace: &lt;namespace&gt;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>accessModes<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>ReadWriteOnce<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>requests<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>storage<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>500Gi</code></pre></div> -<p>Run the following command:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">$ kubectl -n &lt;namespace&gt; create -f pvc.yaml</code></pre></div> -<h4 id="configure-jenkins-cr">Configure Jenkins CR</h4> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.io/v1alpha2<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>&lt;cr_name<span style="color:#8f5902;font-style:italic">&gt; -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">namespace: &lt;namespace&gt;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>master<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>securityContext<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>runAsUser<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1000</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>fsGroup<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1000</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>containers<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-master<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>image<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins/jenkins<span style="color:#000;font-weight:bold">:</span>lts<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># container responsible for the backup and restore</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>env<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>BACKUP_DIR<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/backup<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>JENKINS_HOME<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/jenkins-home<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>BACKUP_COUNT<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;3&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># keep only the 2 most recent backups</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>image<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>virtuslab/jenkins-operator-backup-pvc<span style="color:#000;font-weight:bold">:</span>v0<span style="color:#0000cf;font-weight:bold">.0</span><span style="color:#0000cf;font-weight:bold">.8</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># look at backup/pvc directory</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>imagePullPolicy<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>IfNotPresent<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>volumeMounts<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>mountPath<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/jenkins-home<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># Jenkins home volume</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-home<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>mountPath<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># backup volume</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>volumes<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># PVC volume where backups will be stored</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>persistentVolumeClaim<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>claimName<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>&lt;pvc_name<span style="color:#8f5902;font-style:italic">&gt; -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">backup:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>containerName<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># container name is responsible for backup</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>action<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>command<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>/home/user/bin/backup.sh<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># this command is invoked on &#34;backup&#34; container to make backup, for example /home/user/bin/backup.sh &lt;backup_number&gt;, &lt;backup_number&gt; is passed by operator</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>interval<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">30</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># how often make backup in seconds</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>makeBackupBeforePodDeletion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">true</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># make a backup before pod deletion</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>restore<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>containerName<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># container name is responsible for restore backup</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>action<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>command<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>/home/user/bin/restore.sh<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># this command is invoked on &#34;backup&#34; container to make restore backup, for example /home/user/bin/restore.sh &lt;backup_number&gt;, &lt;backup_number&gt; is passed by operator</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">#recoveryOnce: &lt;backup_number&gt; # if want to restore specific backup configure this field and then Jenkins will be restarted and desired backup will be restored</span></code></pre></div> - - - - - Docs: Custom Backup and Restore Providers - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.3.x/custom-backup-and-restore/ - Fri, 20 Dec 2019 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.3.x/custom-backup-and-restore/ - - - - - -<p>With enough effort one can create a custom backup and restore provider -for the Jenkins Operator.</p> - -<h2 id="requirements">Requirements</h2> - -<p>Two commands (e.g. scripts) are required:</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> - -<p>One of those scripts (or the entry point of the container) needs to be responsible -for backup cleanup or rotation if required, or an external system.</p> - -<h2 id="how-it-works">How it works</h2> - -<p>The mechanism relies on basic Kubernetes and UNIX functionalities.</p> - -<p>The backup (and restore) container runs as a sidecar in the same -Kubernetes pod as the Jenkins master.</p> - -<p>Name of the backup and restore containers can be set as necessary using -<code>spec.backup.containerName</code> and <code>spec.restore.containerName</code>. -In most cases it will be the same container, but we allow for less common use cases.</p> - -<p>The operator will call a backup or restore commands inside a sidecar container when necessary:</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> - -<p>This example shows abbreviated version of a simple AWS S3 backup implementation -using: <code>aws-cli</code>, <code>bash</code> and <code>kube2iam</code>.</p> - -<p>In addition to your normal <code>Jenkins</code> <code>CustomResource</code> some additional settings -for backup and restore are required, e.g.:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.io/v1alpha1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>example<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>namespace<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>master<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>masterAnnotations<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>iam.amazonaws.com/role<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;my-example-backup-role&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># tell kube2iam where the AWS IAM role is</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>containers<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-master<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>...<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># container responsible for backup and restore</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>image<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>quay.io/virtuslab/aws-cli<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.16</span><span style="color:#0000cf;font-weight:bold">.263</span><span style="color:#0000cf;font-weight:bold">-2</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>workingDir<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/home/user/bin/<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>command<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># our container entry point</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>sleep<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>infinity<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>env<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>BACKUP_BUCKET<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>my-example-bucket<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># the S3 bucket name to use</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>BACKUP_PATH<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>my-backup-path<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># the S3 bucket path prefix to use</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>JENKINS_HOME<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/jenkins-home<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># the path to mount jenkins home dir in the backup container</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>volumeMounts<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>mountPath<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/jenkins-home<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># Jenkins home volume</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-home<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>mountPath<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/home/user/bin/backup.sh<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup-scripts<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>subPath<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup.sh<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>readOnly<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">true</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>mountPath<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/home/user/bin/restore.sh<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup-scripts<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>subPath<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>restore.sh<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>readOnly<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">true</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>volumes<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup-scripts<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configMap<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>defaultMode<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">0754</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-backup-s3<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>securityContext<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># make sure both containers use the same UID and GUID</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>runAsUser<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1000</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>fsGroup<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1000</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>...<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>containerName<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># container name responsible for backup</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>interval<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">3600</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># how often make a backup in seconds</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>makeBackupBeforePodDeletion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">true</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># trigger backup just before deleting the pod</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>action<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>command<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># this command is invoked on &#34;backup&#34; container to create a backup,</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># &lt;backup_number&gt; is passed by operator,</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># for example /home/user/bin/backup.sh &lt;backup_number&gt;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>/home/user/bin/backup.sh<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>restore<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>containerName<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># container name is responsible for restore backup</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>action<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>command<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># this command is invoked on &#34;backup&#34; container to restore a backup,</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># &lt;backup_number&gt; is passed by operator</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># for example /home/user/bin/restore.sh &lt;backup_number&gt;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>/home/user/bin/restore.sh<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#8f5902;font-style:italic"># recoveryOnce: &lt;backup_number&gt; # if want to restore specific backup configure this field and then Jenkins will be restarted and desired backup will be restored</span></code></pre></div> -<p>The actual backup and restore scripts will be provided in a <code>ConfigMap</code>:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>ConfigMap<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>v1<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-backup-s3<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>namespace<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>labels<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>app<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>data<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup.sh<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>|<span style="color:#8f5902;font-style:italic">- -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">#!/bin/bash -xeu</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">[</span><span style="color:#f8f8f8;text-decoration:underline"> </span>!<span style="color:#f8f8f8;text-decoration:underline"> </span>$<span style="color:#8f5902;font-style:italic"># -eq 1 ]] &amp;&amp; echo &#34;Usage: $0 backup_number&#34; &amp;&amp; exit 1;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">[</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-z<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;${BACKUP_BUCKET}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">]</span><span style="color:#000;font-weight:bold">]</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Required &#39;BACKUP_BUCKET&#39; env not set&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exit<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>;<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">[</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-z<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;${BACKUP_PATH}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">]</span><span style="color:#000;font-weight:bold">]</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Required &#39;BACKUP_PATH&#39; env not set&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exit<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>;<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">[</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-z<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;${JENKINS_HOME}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">]</span><span style="color:#000;font-weight:bold">]</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Required &#39;JENKINS_HOME&#39; env not set&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exit<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>;<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup_number=$<span style="color:#0000cf;font-weight:bold">1</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Running backup #${backup_number}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>BACKUP_TMP_DIR=$(mktemp<span style="color:#f8f8f8;text-decoration:underline"> </span>-d)<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>tar<span style="color:#f8f8f8;text-decoration:underline"> </span>-C<span style="color:#f8f8f8;text-decoration:underline"> </span>${JENKINS_HOME}<span style="color:#f8f8f8;text-decoration:underline"> </span>-czf<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;${BACKUP_TMP_DIR}/${backup_number}.tar.gz&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>--exclude<span style="color:#f8f8f8;text-decoration:underline"> </span>jobs/<span style="color:#8f5902;font-style:italic">*/workspace*</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-c<span style="color:#f8f8f8;text-decoration:underline"> </span>jobs<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>\<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>aws<span style="color:#f8f8f8;text-decoration:underline"> </span>s3<span style="color:#f8f8f8;text-decoration:underline"> </span>cp<span style="color:#f8f8f8;text-decoration:underline"> </span>${BACKUP_TMP_DIR}/${backup_number}.tar.gz<span style="color:#f8f8f8;text-decoration:underline"> </span>s3<span style="color:#000;font-weight:bold">:</span>//${BACKUP_BUCKET}/${BACKUP_PATH}/${backup_number}.tar.gz<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span>Done<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>restore.sh<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>|<span style="color:#8f5902;font-style:italic">- -</span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic"> </span><span style="color:#8f5902;font-style:italic">#!/bin/bash -xeu</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">[</span><span style="color:#f8f8f8;text-decoration:underline"> </span>!<span style="color:#f8f8f8;text-decoration:underline"> </span>$<span style="color:#8f5902;font-style:italic"># -eq 1 ]] &amp;&amp; echo &#34;Usage: $0 backup_number&#34; &amp;&amp; exit 1</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">[</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-z<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;${BACKUP_BUCKET}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">]</span><span style="color:#000;font-weight:bold">]</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Required &#39;BACKUP_BUCKET&#39; env not set&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exit<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>;<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">[</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-z<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;${BACKUP_PATH}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">]</span><span style="color:#000;font-weight:bold">]</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Required &#39;BACKUP_PATH&#39; env not set&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exit<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>;<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#000;font-weight:bold">[</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-z<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;${JENKINS_HOME}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">]</span><span style="color:#000;font-weight:bold">]</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Required &#39;JENKINS_HOME&#39; env not set&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exit<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>;<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup_number=$<span style="color:#0000cf;font-weight:bold">1</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Running restore #${backup_number}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>BACKUP_TMP_DIR=$(mktemp<span style="color:#f8f8f8;text-decoration:underline"> </span>-d)<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>aws<span style="color:#f8f8f8;text-decoration:underline"> </span>s3<span style="color:#f8f8f8;text-decoration:underline"> </span>cp<span style="color:#f8f8f8;text-decoration:underline"> </span>s3<span style="color:#000;font-weight:bold">:</span>//${BACKUP_BUCKET}/${BACKUP_PATH}/${backup_number}.tar.gz<span style="color:#f8f8f8;text-decoration:underline"> </span>${BACKUP_TMP_DIR}/${backup_number}.tar.gz<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>tar<span style="color:#f8f8f8;text-decoration:underline"> </span>-C<span style="color:#f8f8f8;text-decoration:underline"> </span>${JENKINS_HOME}<span style="color:#f8f8f8;text-decoration:underline"> </span>-zxf<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;${BACKUP_TMP_DIR}/${backup_number}.tar.gz&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span>Done</code></pre></div> -<p>In our example we will use S3 bucket lifecycle policy to keep -the number of backups under control, e.g. Cloud Formation fragment:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#f8f8f8;text-decoration:underline"> </span>Type<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>AWS<span style="color:#000;font-weight:bold">:</span><span style="color:#000;font-weight:bold">:</span>S3<span style="color:#000;font-weight:bold">:</span><span style="color:#000;font-weight:bold">:</span>Bucket<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Properties<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>BucketName<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>my-example-bucket<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>...<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>LifecycleConfiguration<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Rules<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>Id<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>BackupCleanup<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Status<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Enabled<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Prefix<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>my-backup-path<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>ExpirationInDays<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">7</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>NoncurrentVersionExpirationInDays<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">14</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>AbortIncompleteMultipartUpload<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>DaysAfterInitiation<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">3</span></code></pre></div> - - - - - Docs: Notifications - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.3.x/notifications/ - Fri, 20 Dec 2019 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.3.x/notifications/ - - - - - -<h2 id="slack">Slack</h2> - -<p>Please follow <a href="https://api.slack.com/incoming-webhooks">this</a> instructions to get web hook URL.</p> - -<p>Create web hook secret with name <code>jenkins-operator-notification-data</code>. Contains key <code>url</code> with provided web hook URL.</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">$ kubectl create secret generic jenkins-operator-notification-data --from-literal<span style="color:#ce5c00;font-weight:bold">=</span><span style="color:#000">url</span><span style="color:#ce5c00;font-weight:bold">=</span>&lt;webhook_url&gt;</code></pre></div> -<p>Example configuration for Slack:</p> -<pre><code>kind: Jenkins -spec: - master: - notifications: - - loggingLevel: info - verbose: true - name: <name> - slack: - webHookURLSecretKeySelector: - secret: - name: <secret_name> - key: <key></code></pre> -<h2 id="microsoft-teams">Microsoft Teams</h2> - -<p>Please follow <a href="https://docs.microsoft.com/en-gb/outlook/actionable-messages/send-via-connectors">this</a> instructions to get web hook URL.</p> - -<p>Example configuration for Microsoft Teams:</p> -<pre><code>kind: Jenkins -spec: - master: - notifications: - - loggingLevel: info - verbose: true - name: <name> - teams: - webHookURLSecretKeySelector: - secret: - name: <secret_name> - key: <key></code></pre> -<h2 id="mailgun">Mailgun</h2> - -<p>Example configuration for Mailgun:</p> -<pre><code>kind: Jenkins -spec: - master: - notifications: - - loggingLevel: info - verbose: true - name: <name> - mailgun: - domain: <domain> - apiKeySecretKeySelector: - secret: - name: <secret_name> - key: <key> - recipient: <your_email> - from: <mailgun_email></code></pre> -<h2 id="debug-options">Debug options</h2> - -<p>As you see there is two debugging options:</p> - -<ul> -<li><p><code>loggingLevel</code> (warning/info) - Set level of messages to send.</p></li> - -<li><p><code>verbose</code> - Print stacktrace and additional error messages</p></li> -</ul> - -<h2 id="multiple-providers">Multiple providers</h2> - -<p>You can use multiple providers to send notification to another communication channels at the same time. -For example you will send notifications to Slack and Teams.</p> -<pre><code>kind: Jenkins -spec: - master: - notifications: - - loggingLevel: info - verbose: true - name: nslack - slack: - webHookURLSecretKeySelector: - secret: - name: <secret_name> - key: <key> - - loggingLevel: info - verbose: true - name: nteams - teams: - webHookURLSecretKeySelector: - secret: - name: <secret_name> - key: <key></code></pre> - - - - - Docs: AKS - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.1.x/aks/ - Mon, 05 Aug 2019 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.1.x/aks/ - - - - <p>Azure AKS managed Kubernetes service adds to every pod the following environment variables:</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>KUBERNETES_PORT_443_TCP_ADDR<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>KUBERNETES_PORT<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>tcp<span style="color:#000;font-weight:bold">:</span>//<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>KUBERNETES_PORT_443_TCP<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>tcp<span style="color:#000;font-weight:bold">:</span>//<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>KUBERNETES_SERVICE_HOST<span style="color:#f8f8f8;text-decoration:underline"> -</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span></code></pre></div> -<p>The operator is aware of it and omits these environment variables when checking if a Jenkins pod environment has been changed. It prevents -the restart of a Jenkins pod over and over again.</p> - - - - - - diff --git a/docs/docs/security/index.html b/docs/docs/security/index.html deleted file mode 100644 index a3db727f9..000000000 --- a/docs/docs/security/index.html +++ /dev/null @@ -1,1203 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - -Security | Jenkins Operator - - - - - - - - - - - - - - - - - - - - Security | Jenkins Operator - - -
- - - -
-
-
-
-
- - - - - -
- - - - -
- - - - -
- -
- - - -
-

Security

-
Jenkins security and hardening out of the box
- - -

By default Jenkins Operator performs an initial security hardening of Jenkins instance -via groovy scripts to prevent any security gaps.

- -

Jenkins Access Control

- -

Currently Jenkins Operator generates a username and random password and stores them in a Kubernetes Secret. -However any other authorization mechanisms are possible and can be done via groovy scripts or configuration as code plugin. -For more information take a look at the section on customizing Jenkins.

- -

Any change to Security Realm or Authorization requires that user called jenkins-operator must have admin rights -because Jenkins Operator calls Jenkins API.

- -

Jenkins Hardening

- -

The list below describes all the default security setting configured by the Jenkins Operator:

- -
    -
  • basic settings - use Mode.EXCLUSIVE - Jobs must specify that they want to run on master node
  • -
  • enable CSRF - Cross Site Request Forgery Protection is enabled
  • -
  • disable usage stats - Jenkins usage stats submitting is disabled
  • -
  • enable master access control - Slave to Master Access Control is enabled
  • -
  • disable old JNLP protocols - JNLP3-connect, JNLP2-connect and JNLP-connect are disabled
  • -
  • disable CLI - CLI access of /cli URL is disabled
  • -
  • configure kubernetes-plugin - secure configuration for Kubernetes plugin
  • -
- -

If you would like to dig a little bit into the code, take a look here.

- -

Jenkins API

- -

The Jenkins Operator generates and configures Basic Authentication token for Jenkins Go client -and stores it in a Kubernetes Secret.

- -

Kubernetes

- -

Kubernetes API permissions are limited by the following roles:

- - - -

Since Jenkins Operator must be able to grant permission for its deployed Jenkins masters -to spawn pods (the Jenkins Master role above), -the operator itself requires permission to create RBAC resources (the jenkins-operator role above).

- -

Deployed this way, any subject which may create a Pod (including a Jenkins job) may -assume the jenkins-operator role by using its’ ServiceAccount, create RBAC rules, and thus escape its granted permissions. -Any namespace to which the jenkins-operator is deployed must be considered to implicitly grant all -possible permissions to any subject which can create a Pod in that namespace.

- -

To mitigate this issue, Jenkins Operator should be deployed in one namespace, and the Jenkins CR should be created in -a separate namespace. For instructions on how to deploy Jenkins Operator and Jenkins in separate namespaces, head over -to the Separate namespaces section of Getting Started -guide.

- -

Report a Security Vulnerability

- -

If you find a vulnerability or any misconfiguration in Jenkins, please report it in the issues.

- -
- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - -
Last modified October 6, 2021 -
-
- -
-
-
- - - - -
- - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/docs/security/index.xml b/docs/docs/security/index.xml deleted file mode 100644 index 10fcf5b55..000000000 --- a/docs/docs/security/index.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - Jenkins Operator – Security - https://jenkinsci.github.io/kubernetes-operator/docs/security/ - Recent Hugo news from gohugo.io - Hugo -- gohugo.io - Wed, 06 Oct 2021 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/img/hugo.png - GoHugo.io - https://jenkinsci.github.io/kubernetes-operator/docs/security/ - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/docs/troubleshooting/index.html b/docs/docs/troubleshooting/index.html deleted file mode 100644 index 857a74efb..000000000 --- a/docs/docs/troubleshooting/index.html +++ /dev/null @@ -1,1177 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - -Troubleshooting | Jenkins Operator - - - - - - - - - - - - - - - - - - - - Troubleshooting | Jenkins Operator - - -
- - - -
-
-
-
-
- - - - - -
- - - - -
- - - - -
- -
- - - -
-

Troubleshooting

-
Troubleshooting Jenkins Operator
- - -

This document helps you to state the reason for an error in the Jenkins Operator, which is the first step in solving it.

- -

Operator logs

- -

Jenkins Operator can provide some useful logs. To get them, run:

-
$ kubectl logs <controller-manager-pod-name> -f 
-

In the logs look for WARNING, ERROR and SEVERE keywords.

- -

Jenkins logs

- -

If the container is in a CrashLoopBackOff, the fault is in the Jenkins itself. -If the Operator is constantly terminating the pod with ‘missing-plugins’ messages that means the plugins lost compatibility -with the Jenkins image and their version need to be updated. -To learn more about the possible error, check the state of the pod:

-
$ kubectl -n <namespace-name> get po <name-of-the-jenkins-pod> -w
-

or

-
$ kubectl -n <namespace-name> describe po <name-of-the-jenkins-pod>
-

and check the logs from the Jenkins container:

-
$ kubectl -n <namespace-name> logs <jenkins-pod> <jenkins-master> -f 
-

Kubernetes Events

- -

Sometimes Events provide a great dose of information, especially in the case some Kubernetes resource doesn’t want to become Ready. -To obtain the events in your Cluster run:

-
$ kubectl -n <namespace> get events --sort-by='{.lastTimestamp}'
-

Quick soft reset

- -

You can always kill the Jenkins pod and wait for it to come up again. All the version-controlled configurations will be downloaded again -and the rest will be discarded. Chances are the buggy part will be gone.

-
$ kubectl delete pod <jenkins-pod>
-

Operator debug mode

- -

If you need to access additional logs from the Operator, you can run it in debug mode. To do that, add "--debug" -argument to jenkins-operator container args in your Operator deployment.

- -
- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - -
Last modified October 6, 2021 -
-
- -
-
-
- - - - -
- - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/docs/troubleshooting/index.xml b/docs/docs/troubleshooting/index.xml deleted file mode 100644 index 50c731d31..000000000 --- a/docs/docs/troubleshooting/index.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - Jenkins Operator – Troubleshooting - https://jenkinsci.github.io/kubernetes-operator/docs/troubleshooting/ - Recent Hugo news from gohugo.io - Hugo -- gohugo.io - Wed, 06 Oct 2021 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/img/hugo.png - GoHugo.io - https://jenkinsci.github.io/kubernetes-operator/docs/troubleshooting/ - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/favicons/android-144x144.png b/docs/favicons/android-144x144.png deleted file mode 100755 index 8851c09a4..000000000 Binary files a/docs/favicons/android-144x144.png and /dev/null differ diff --git a/docs/favicons/android-192x192.png b/docs/favicons/android-192x192.png deleted file mode 100755 index 94b2ad2db..000000000 Binary files a/docs/favicons/android-192x192.png and /dev/null differ diff --git a/docs/favicons/android-36x36.png b/docs/favicons/android-36x36.png deleted file mode 100755 index 7ec5cf650..000000000 Binary files a/docs/favicons/android-36x36.png and /dev/null differ diff --git a/docs/favicons/android-48x48.png b/docs/favicons/android-48x48.png deleted file mode 100755 index 419a445ad..000000000 Binary files a/docs/favicons/android-48x48.png and /dev/null differ diff --git a/docs/favicons/android-72x72.png b/docs/favicons/android-72x72.png deleted file mode 100755 index 230b18fd5..000000000 Binary files a/docs/favicons/android-72x72.png and /dev/null differ diff --git a/docs/favicons/android-96x196.png b/docs/favicons/android-96x196.png deleted file mode 100755 index 8cc698973..000000000 Binary files a/docs/favicons/android-96x196.png and /dev/null differ diff --git a/docs/favicons/apple-touch-icon-180x180.png b/docs/favicons/apple-touch-icon-180x180.png deleted file mode 100644 index a83957734..000000000 Binary files a/docs/favicons/apple-touch-icon-180x180.png and /dev/null differ diff --git a/docs/favicons/favicon-1024.png b/docs/favicons/favicon-1024.png deleted file mode 100644 index 920f10720..000000000 Binary files a/docs/favicons/favicon-1024.png and /dev/null differ diff --git a/docs/favicons/favicon-16x16.png b/docs/favicons/favicon-16x16.png deleted file mode 100644 index 2a5bb22d2..000000000 Binary files a/docs/favicons/favicon-16x16.png and /dev/null differ diff --git a/docs/favicons/favicon-256.png b/docs/favicons/favicon-256.png deleted file mode 100644 index ebd3f8c98..000000000 Binary files a/docs/favicons/favicon-256.png and /dev/null differ diff --git a/docs/favicons/favicon-32x32.png b/docs/favicons/favicon-32x32.png deleted file mode 100644 index a0c0d9746..000000000 Binary files a/docs/favicons/favicon-32x32.png and /dev/null differ diff --git a/docs/favicons/favicon.ico b/docs/favicons/favicon.ico deleted file mode 100644 index e8eb6a0ad..000000000 Binary files a/docs/favicons/favicon.ico and /dev/null differ diff --git a/docs/favicons/pwa-192x192.png b/docs/favicons/pwa-192x192.png deleted file mode 100644 index 90ae5b157..000000000 Binary files a/docs/favicons/pwa-192x192.png and /dev/null differ diff --git a/docs/favicons/pwa-512x512.png b/docs/favicons/pwa-512x512.png deleted file mode 100644 index c3ec43343..000000000 Binary files a/docs/favicons/pwa-512x512.png and /dev/null differ diff --git a/docs/favicons/tile150x150.png b/docs/favicons/tile150x150.png deleted file mode 100644 index bacae43cb..000000000 Binary files a/docs/favicons/tile150x150.png and /dev/null differ diff --git a/docs/favicons/tile310x150.png b/docs/favicons/tile310x150.png deleted file mode 100644 index f61718eae..000000000 Binary files a/docs/favicons/tile310x150.png and /dev/null differ diff --git a/docs/favicons/tile310x310.png b/docs/favicons/tile310x310.png deleted file mode 100644 index 6060918bf..000000000 Binary files a/docs/favicons/tile310x310.png and /dev/null differ diff --git a/docs/favicons/tile70x70.png b/docs/favicons/tile70x70.png deleted file mode 100644 index c4d6581af..000000000 Binary files a/docs/favicons/tile70x70.png and /dev/null differ diff --git a/docs/img/jenkins-credentials.png b/docs/img/jenkins-credentials.png deleted file mode 100644 index b1017bad4..000000000 Binary files a/docs/img/jenkins-credentials.png and /dev/null differ diff --git a/docs/img/jenkins-seed.png b/docs/img/jenkins-seed.png deleted file mode 100644 index 69f4f0c76..000000000 Binary files a/docs/img/jenkins-seed.png and /dev/null differ diff --git a/docs/img/jenkins.png b/docs/img/jenkins.png deleted file mode 100644 index 2c63caacb..000000000 Binary files a/docs/img/jenkins.png and /dev/null differ diff --git a/docs/img/logo.svg b/docs/img/logo.svg deleted file mode 100644 index 950186361..000000000 --- a/docs/img/logo.svg +++ /dev/null @@ -1,6512 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/img/phases.png b/docs/img/phases.png deleted file mode 100644 index 0e12afc01..000000000 Binary files a/docs/img/phases.png and /dev/null differ diff --git a/docs/img/reconcile.png b/docs/img/reconcile.png deleted file mode 100644 index e3e222575..000000000 Binary files a/docs/img/reconcile.png and /dev/null differ diff --git a/docs/index.html b/docs/index.html deleted file mode 100644 index d942f0107..000000000 --- a/docs/index.html +++ /dev/null @@ -1,272 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - -Jenkins Operator - - - - - - - - - - - - - - - - - - - - - -
- - - -
-
-
- - - - - - - -
-
-
- -
- Logo -
-
-

Manage Jenkins in Kubernetes!

-

Deploy Jenkins Operator and configure your Jenkins instances in Kubernetes -

- -
-
-
-
- - - - - - - -
-
- - Jenkins Operator is a Kubernetes native operator which fully manages Jenkins on Kubernetes.
It was built with immutability and declarative configuration as code in mind.
-
-
-
- - - - - - - -
-
-
-
-
- -
-

Better configuration as code

-

Use groovy scripts or JCasC to configure your Jenkins instance

-

- -
- -
-
- -
-

Security and hardening out of the box

-

Enable CSRF, disable usage stats, enable master access control and more by default

-

- -
- -
-
- -
-

Handle graceful shutdown properly

-

Less chance to lose data

-

- -
- -
-
- -
-

Make errors more visible for end users

-

Improve user experience by informing what has been done

-

- -
- -
-
-
- - - - - - - - -
-
-
-
-
- -
-

Contributions welcome!

-

We do a Pull Request contributions workflow on GitHub. New users are always welcome!

-

-

Read more …

-
- -
-
- -
-

Documentation

-

Learning the usage of Jenkins Operator will make your life easier. After that, you can easily contribute to the project.

-

-

Read more …

-
- -
-
- -
-

Jenkins Community Discourse

-

Ask questions, discuss best practices and talk to other users about Jenkins Operator on a dedicated Discourse category.

- -

Visit Discourse

-

- -
- -
-
- -
-

Join our channel on Gitter/Matrix!

-

Chat with other users about Jenkins Operator on dedicated Gitter or if you prefer from any compatible Matrix client.

- -

Gitter

- -

Matrix

-

- -
- -
-
-
- - - - -
- - - - -
- - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/index.xml b/docs/index.xml deleted file mode 100644 index 2a37f78bd..000000000 --- a/docs/index.xml +++ /dev/null @@ -1,839 +0,0 @@ - - - Jenkins Operator – Jenkins Kubernetes Operator - https://jenkinsci.github.io/kubernetes-operator/ - Recent Hugo news from gohugo.io - Hugo -- gohugo.io - Mon, 16 Jan 2023 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/img/hugo.png - GoHugo.io - https://jenkinsci.github.io/kubernetes-operator/ - - - - - - - - - - - Blog: Easy documentation with Docsy - https://jenkinsci.github.io/kubernetes-operator/blog/2018/10/06/easy-documentation-with-docsy/ - Sat, 06 Oct 2018 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/blog/2018/10/06/easy-documentation-with-docsy/ - - - - - ]]> - - - -<p><strong>This is a typical blog post that includes images.</strong></p> - -<p>The front matter specifies the date of the blog post, its title, a short description that will be displayed on the blog landing page, and its author.</p> - -<h2 id="including-images">Including images</h2> - -<p>Here&rsquo;s an image (<code>featured-sunset-get.png</code>) that includes a byline and a caption.</p> - - - - - - - - -<div class="card rounded p-2 td-post-card mb-4 mt-4" style="max-width: 610px"> - <img class="card-img-top" src="https://jenkinsci.github.io/kubernetes-operator/kubernetes-operator/blog/2018/10/06/easy-documentation-with-docsy/featured-sunset-get_hu69849a7cdb847c2393a7b3a7f6061c86_387442_600x300_fill_catmullrom_smart1_2.png" width="600" height="300"> - - <div class="card-body px-0 pt-2 pb-0"> - <p class="card-text"> -Fetch and scale an image in the upcoming Hugo 0.43. -<small class="text-muted"><br/>Photo: Riona MacNamara / CC-BY-CA</small></p> - </div> - -</div> - -<p>The front matter of this post specifies properties to be assigned to all image resources:</p> -<pre><code>resources: -- src: "**.{png,jpg}" - title: "Image #:counter" - params: - byline: "Photo: Riona MacNamara / CC-BY-CA"</code></pre> -<p>To include the image in a page, specify its details like this:</p> -<pre><code> - - - - - - -<div class="card rounded p-2 td-post-card mb-4 mt-4" style="max-width: 610px"> - <img class="card-img-top" src="https://jenkinsci.github.io/kubernetes-operator/kubernetes-operator/blog/2018/10/06/easy-documentation-with-docsy/featured-sunset-get_hu69849a7cdb847c2393a7b3a7f6061c86_387442_600x300_fill_catmullrom_smart1_2.png" width="600" height="300"> - - <div class="card-body px-0 pt-2 pb-0"> - <p class="card-text"> -Fetch and scale an image in the upcoming Hugo 0.43. -<small class="text-muted"><br/>Photo: Riona MacNamara / CC-BY-CA</small></p> - </div> - -</div></code></pre> -<p>The image will be rendered at the size and byline specified in the front matter.</p> - - - - - - Blog: The second blog post - https://jenkinsci.github.io/kubernetes-operator/blog/2018/10/06/the-second-blog-post/ - Sat, 06 Oct 2018 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/blog/2018/10/06/the-second-blog-post/ - - - - - -<p>Text can be <strong>bold</strong>, <em>italic</em>, or <del>strikethrough</del>. <a href="https://github.com">Links</a> should be blue with no underlines (unless hovered over).</p> - -<p>There should be whitespace between paragraphs. There should be whitespace between paragraphs. There should be whitespace between paragraphs. There should be whitespace between paragraphs.</p> - -<p>There should be whitespace between paragraphs. There should be whitespace between paragraphs. There should be whitespace between paragraphs. There should be whitespace between paragraphs.</p> - -<blockquote> -<p>There should be no margin above this first sentence.</p> - -<p>Blockquotes should be a lighter gray with a border along the left side in the secondary color.</p> - -<p>There should be no margin below this final sentence.</p> -</blockquote> - -<h2 id="first-header">First Header</h2> - -<p>This is a normal paragraph following a header. Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong. Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong. Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.</p> - -<p>Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.</p> - -<p>On big screens, paragraphs and headings should not take up the full container width, but we want tables, code blocks and similar to take the full width.</p> - -<p>Lorem markdownum tuta hospes stabat; idem saxum facit quaterque repetito -occumbere, oves novem gestit haerebat frena; qui. Respicit recurvam erat: -pignora hinc reppulit nos <strong>aut</strong>, aptos, ipsa.</p> - -<p>Meae optatos <em>passa est</em> Epiros utiliter <em>Talibus niveis</em>, hoc lata, edidit. -Dixi ad aestum.</p> - -<h2 id="header-2">Header 2</h2> - -<blockquote> -<p>This is a blockquote following a header. Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.</p> -</blockquote> - -<h3 id="header-3">Header 3</h3> -<pre><code>This is a code block following a header.</code></pre> -<h4 id="header-4">Header 4</h4> - -<ul> -<li>This is an unordered list following a header.</li> -<li>This is an unordered list following a header.</li> -<li>This is an unordered list following a header.</li> -</ul> - -<h5 id="header-5">Header 5</h5> - -<ol> -<li>This is an ordered list following a header.</li> -<li>This is an ordered list following a header.</li> -<li>This is an ordered list following a header.</li> -</ol> - -<h6 id="header-6">Header 6</h6> - -<table> -<thead> -<tr> -<th>What</th> -<th>Follows</th> -</tr> -</thead> - -<tbody> -<tr> -<td>A table</td> -<td>A header</td> -</tr> - -<tr> -<td>A table</td> -<td>A header</td> -</tr> - -<tr> -<td>A table</td> -<td>A header</td> -</tr> -</tbody> -</table> - -<hr /> - -<p>There&rsquo;s a horizontal rule above and below this.</p> - -<hr /> - -<p>Here is an unordered list:</p> - -<ul> -<li>Salt-n-Pepa</li> -<li>Bel Biv DeVoe</li> -<li>Kid &lsquo;N Play</li> -</ul> - -<p>And an ordered list:</p> - -<ol> -<li>Michael Jackson</li> -<li>Michael Bolton</li> -<li>Michael Bublé</li> -</ol> - -<p>And an unordered task list:</p> - -<ul class="task-list"> -<li><label><input type="checkbox" checked disabled class="task-list-item"> Create a sample markdown document</label></li> -<li><label><input type="checkbox" checked disabled class="task-list-item"> Add task lists to it</label></li> -<li><label><input type="checkbox" disabled class="task-list-item"> Take a vacation</label></li> -</ul> - -<p>And a &ldquo;mixed&rdquo; task list:</p> - -<ul class="task-list"> -<li><label><input type="checkbox" disabled class="task-list-item"> Steal underpants</label></li> -<li>?</li> -<li><label><input type="checkbox" disabled class="task-list-item"> Profit!</label></li> -</ul> - -<p>And a nested list:</p> - -<ul> -<li>Jackson 5 - -<ul> -<li>Michael</li> -<li>Tito</li> -<li>Jackie</li> -<li>Marlon</li> -<li>Jermaine</li> -</ul></li> -<li>TMNT - -<ul> -<li>Leonardo</li> -<li>Michelangelo</li> -<li>Donatello</li> -<li>Raphael</li> -</ul></li> -</ul> - -<p>Definition lists can be used with Markdown syntax. Definition terms are bold.</p> - -<dl> -<dt>Name</dt> -<dd>Godzilla</dd> -<dt>Born</dt> -<dd>1952</dd> -<dt>Birthplace</dt> -<dd>Japan</dd> -<dt>Color</dt> -<dd>Green</dd> -</dl> - -<hr /> - -<p>Tables should have bold headings and alternating shaded rows.</p> - -<table> -<thead> -<tr> -<th>Artist</th> -<th>Album</th> -<th>Year</th> -</tr> -</thead> - -<tbody> -<tr> -<td>Michael Jackson</td> -<td>Thriller</td> -<td>1982</td> -</tr> - -<tr> -<td>Prince</td> -<td>Purple Rain</td> -<td>1984</td> -</tr> - -<tr> -<td>Beastie Boys</td> -<td>License to Ill</td> -<td>1986</td> -</tr> -</tbody> -</table> - -<p>If a table is too wide, it should scroll horizontally.</p> - -<table> -<thead> -<tr> -<th>Artist</th> -<th>Album</th> -<th>Year</th> -<th>Label</th> -<th>Awards</th> -<th>Songs</th> -</tr> -</thead> - -<tbody> -<tr> -<td>Michael Jackson</td> -<td>Thriller</td> -<td>1982</td> -<td>Epic Records</td> -<td>Grammy Award for Album of the Year, American Music Award for Favorite Pop/Rock Album, American Music Award for Favorite Soul/R&amp;B Album, Brit Award for Best Selling Album, Grammy Award for Best Engineered Album, Non-Classical</td> -<td>Wanna Be Startin&rsquo; Somethin&rsquo;, Baby Be Mine, The Girl Is Mine, Thriller, Beat It, Billie Jean, Human Nature, P.Y.T. (Pretty Young Thing), The Lady in My Life</td> -</tr> - -<tr> -<td>Prince</td> -<td>Purple Rain</td> -<td>1984</td> -<td>Warner Brothers Records</td> -<td>Grammy Award for Best Score Soundtrack for Visual Media, American Music Award for Favorite Pop/Rock Album, American Music Award for Favorite Soul/R&amp;B Album, Brit Award for Best Soundtrack/Cast Recording, Grammy Award for Best Rock Performance by a Duo or Group with Vocal</td> -<td>Let&rsquo;s Go Crazy, Take Me With U, The Beautiful Ones, Computer Blue, Darling Nikki, When Doves Cry, I Would Die 4 U, Baby I&rsquo;m a Star, Purple Rain</td> -</tr> - -<tr> -<td>Beastie Boys</td> -<td>License to Ill</td> -<td>1986</td> -<td>Mercury Records</td> -<td>noawardsbutthistablecelliswide</td> -<td>Rhymin &amp; Stealin, The New Style, She&rsquo;s Crafty, Posse in Effect, Slow Ride, Girls, (You Gotta) Fight for Your Right, No Sleep Till Brooklyn, Paul Revere, Hold It Now, Hit It, Brass Monkey, Slow and Low, Time to Get Ill</td> -</tr> -</tbody> -</table> - -<hr /> - -<p>Code snippets like <code>var foo = &quot;bar&quot;;</code> can be shown inline.</p> - -<p>Also, <code>this should vertically align</code> <del><code>with this</code></del> <del>and this</del>.</p> - -<p>Code can also be shown in a block element.</p> -<pre><code>foo := "bar"; -bar := "foo";</code></pre> -<p>Code can also use syntax highlighting.</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-go" data-lang="go"><span style="color:#204a87;font-weight:bold">func</span> <span style="color:#000">main</span><span style="color:#000;font-weight:bold">(</span><span style="color:#000;font-weight:bold">)</span> <span style="color:#000;font-weight:bold">{</span> - <span style="color:#000">input</span> <span style="color:#ce5c00;font-weight:bold">:=</span> <span style="color:#4e9a06">`</span><span style="color:#4e9a06">var foo = &#34;bar&#34;;</span><span style="color:#4e9a06">`</span> - - <span style="color:#000">lexer</span> <span style="color:#ce5c00;font-weight:bold">:=</span> <span style="color:#000">lexers</span><span style="color:#000;font-weight:bold">.</span><span style="color:#000">Get</span><span style="color:#000;font-weight:bold">(</span><span style="color:#4e9a06">&#34;javascript&#34;</span><span style="color:#000;font-weight:bold">)</span> - <span style="color:#000">iterator</span><span style="color:#000;font-weight:bold">,</span> <span style="color:#000">_</span> <span style="color:#ce5c00;font-weight:bold">:=</span> <span style="color:#000">lexer</span><span style="color:#000;font-weight:bold">.</span><span style="color:#000">Tokenise</span><span style="color:#000;font-weight:bold">(</span><span style="color:#204a87;font-weight:bold">nil</span><span style="color:#000;font-weight:bold">,</span> <span style="color:#000">input</span><span style="color:#000;font-weight:bold">)</span> - <span style="color:#000">style</span> <span style="color:#ce5c00;font-weight:bold">:=</span> <span style="color:#000">styles</span><span style="color:#000;font-weight:bold">.</span><span style="color:#000">Get</span><span style="color:#000;font-weight:bold">(</span><span style="color:#4e9a06">&#34;github&#34;</span><span style="color:#000;font-weight:bold">)</span> - <span style="color:#000">formatter</span> <span style="color:#ce5c00;font-weight:bold">:=</span> <span style="color:#000">html</span><span style="color:#000;font-weight:bold">.</span><span style="color:#000">New</span><span style="color:#000;font-weight:bold">(</span><span style="color:#000">html</span><span style="color:#000;font-weight:bold">.</span><span style="color:#000">WithLineNumbers</span><span style="color:#000;font-weight:bold">(</span><span style="color:#000;font-weight:bold">)</span><span style="color:#000;font-weight:bold">)</span> - - <span style="color:#204a87;font-weight:bold">var</span> <span style="color:#000">buff</span> <span style="color:#000">bytes</span><span style="color:#000;font-weight:bold">.</span><span style="color:#000">Buffer</span> - <span style="color:#000">formatter</span><span style="color:#000;font-weight:bold">.</span><span style="color:#000">Format</span><span style="color:#000;font-weight:bold">(</span><span style="color:#ce5c00;font-weight:bold">&amp;</span><span style="color:#000">buff</span><span style="color:#000;font-weight:bold">,</span> <span style="color:#000">style</span><span style="color:#000;font-weight:bold">,</span> <span style="color:#000">iterator</span><span style="color:#000;font-weight:bold">)</span> - - <span style="color:#000">fmt</span><span style="color:#000;font-weight:bold">.</span><span style="color:#000">Println</span><span style="color:#000;font-weight:bold">(</span><span style="color:#000">buff</span><span style="color:#000;font-weight:bold">.</span><span style="color:#000">String</span><span style="color:#000;font-weight:bold">(</span><span style="color:#000;font-weight:bold">)</span><span style="color:#000;font-weight:bold">)</span> -<span style="color:#000;font-weight:bold">}</span></code></pre></div><pre><code>Long, single-line code blocks should not wrap. They should horizontally scroll if they are too long. This line should be long enough to demonstrate this.</code></pre> -<p>Inline code inside table cells should still be distinguishable.</p> - -<table> -<thead> -<tr> -<th>Language</th> -<th>Code</th> -</tr> -</thead> - -<tbody> -<tr> -<td>Javascript</td> -<td><code>var foo = &quot;bar&quot;;</code></td> -</tr> - -<tr> -<td>Ruby</td> -<td><code>foo = &quot;bar&quot;{</code></td> -</tr> -</tbody> -</table> - -<hr /> - -<p>Small images should be shown at their actual size.</p> - -<p><img src="http://placekitten.com/g/300/200/" alt="" /></p> - -<p>Large images should always scale down and fit in the content container.</p> - -<p><img src="http://placekitten.com/g/1200/800/" alt="" /></p> - -<h2 id="components">Components</h2> - -<h3 id="alerts">Alerts</h3> - -<p> - -<div class="alert alert-primary" role="alert"> - -This is an alert. -</div> - - - -<div class="alert alert-primary" role="alert"> -<h4 class="alert-heading">Note:</h4> -This is an alert with a title. -</div> - - - -<div class="alert alert-primary" role="alert"> - -This is a successful alert. -</div> - - - -<div class="alert alert-primary" role="alert"> - -This is a warning! -</div> - - - -<div class="alert alert-primary" role="alert"> -<h4 class="alert-heading">Warning!</h4> -This is a warning with a title! -</div> -</p> - -<h2 id="sizing">Sizing</h2> - -<p>Add some sections here to see how the ToC looks like. Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.</p> - -<h3 id="parameters-available">Parameters available</h3> - -<p>Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.</p> - -<h3 id="using-pixels">Using pixels</h3> - -<p>Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.</p> - -<h3 id="using-rem">Using rem</h3> - -<p>Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.</p> - -<h2 id="memory">Memory</h2> - -<p>Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.</p> - -<h3 id="ram-to-use">RAM to use</h3> - -<p>Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.</p> - -<h3 id="more-is-better">More is better</h3> - -<p>Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.</p> - -<h3 id="used-ram">Used RAM</h3> - -<p>Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.</p> -<pre><code>This is the final element on the page and there should be no margin below this.</code></pre> - - - - - Blog: Another Great Release - https://jenkinsci.github.io/kubernetes-operator/blog/2018/01/04/another-great-release/ - Thu, 04 Jan 2018 00:00:00 +0000 - - https://jenkinsci.github.io/kubernetes-operator/blog/2018/01/04/another-great-release/ - - - - - -<p>Text can be <strong>bold</strong>, <em>italic</em>, or <del>strikethrough</del>. <a href="https://github.com">Links</a> should be blue with no underlines (unless hovered over).</p> - -<p>There should be whitespace between paragraphs. There should be whitespace between paragraphs. There should be whitespace between paragraphs. There should be whitespace between paragraphs.</p> - -<p>There should be whitespace between paragraphs. There should be whitespace between paragraphs. There should be whitespace between paragraphs. There should be whitespace between paragraphs.</p> - -<blockquote> -<p>There should be no margin above this first sentence.</p> - -<p>Blockquotes should be a lighter gray with a border along the left side in the secondary color.</p> - -<p>There should be no margin below this final sentence.</p> -</blockquote> - -<h2 id="first-header">First Header</h2> - -<p>This is a normal paragraph following a header. Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong. Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong. Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.</p> - -<p>Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.</p> - -<p>On big screens, paragraphs and headings should not take up the full container width, but we want tables, code blocks and similar to take the full width.</p> - -<p>Lorem markdownum tuta hospes stabat; idem saxum facit quaterque repetito -occumbere, oves novem gestit haerebat frena; qui. Respicit recurvam erat: -pignora hinc reppulit nos <strong>aut</strong>, aptos, ipsa.</p> - -<p>Meae optatos <em>passa est</em> Epiros utiliter <em>Talibus niveis</em>, hoc lata, edidit. -Dixi ad aestum.</p> - -<h2 id="header-2">Header 2</h2> - -<blockquote> -<p>This is a blockquote following a header. Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.</p> -</blockquote> - -<h3 id="header-3">Header 3</h3> -<pre><code>This is a code block following a header.</code></pre> -<h4 id="header-4">Header 4</h4> - -<ul> -<li>This is an unordered list following a header.</li> -<li>This is an unordered list following a header.</li> -<li>This is an unordered list following a header.</li> -</ul> - -<h5 id="header-5">Header 5</h5> - -<ol> -<li>This is an ordered list following a header.</li> -<li>This is an ordered list following a header.</li> -<li>This is an ordered list following a header.</li> -</ol> - -<h6 id="header-6">Header 6</h6> - -<table> -<thead> -<tr> -<th>What</th> -<th>Follows</th> -</tr> -</thead> - -<tbody> -<tr> -<td>A table</td> -<td>A header</td> -</tr> - -<tr> -<td>A table</td> -<td>A header</td> -</tr> - -<tr> -<td>A table</td> -<td>A header</td> -</tr> -</tbody> -</table> - -<hr /> - -<p>There&rsquo;s a horizontal rule above and below this.</p> - -<hr /> - -<p>Here is an unordered list:</p> - -<ul> -<li>Salt-n-Pepa</li> -<li>Bel Biv DeVoe</li> -<li>Kid &lsquo;N Play</li> -</ul> - -<p>And an ordered list:</p> - -<ol> -<li>Michael Jackson</li> -<li>Michael Bolton</li> -<li>Michael Bublé</li> -</ol> - -<p>And an unordered task list:</p> - -<ul class="task-list"> -<li><label><input type="checkbox" checked disabled class="task-list-item"> Create a sample markdown document</label></li> -<li><label><input type="checkbox" checked disabled class="task-list-item"> Add task lists to it</label></li> -<li><label><input type="checkbox" disabled class="task-list-item"> Take a vacation</label></li> -</ul> - -<p>And a &ldquo;mixed&rdquo; task list:</p> - -<ul class="task-list"> -<li><label><input type="checkbox" disabled class="task-list-item"> Steal underpants</label></li> -<li>?</li> -<li><label><input type="checkbox" disabled class="task-list-item"> Profit!</label></li> -</ul> - -<p>And a nested list:</p> - -<ul> -<li>Jackson 5 - -<ul> -<li>Michael</li> -<li>Tito</li> -<li>Jackie</li> -<li>Marlon</li> -<li>Jermaine</li> -</ul></li> -<li>TMNT - -<ul> -<li>Leonardo</li> -<li>Michelangelo</li> -<li>Donatello</li> -<li>Raphael</li> -</ul></li> -</ul> - -<p>Definition lists can be used with Markdown syntax. Definition terms are bold.</p> - -<dl> -<dt>Name</dt> -<dd>Godzilla</dd> -<dt>Born</dt> -<dd>1952</dd> -<dt>Birthplace</dt> -<dd>Japan</dd> -<dt>Color</dt> -<dd>Green</dd> -</dl> - -<hr /> - -<p>Tables should have bold headings and alternating shaded rows.</p> - -<table> -<thead> -<tr> -<th>Artist</th> -<th>Album</th> -<th>Year</th> -</tr> -</thead> - -<tbody> -<tr> -<td>Michael Jackson</td> -<td>Thriller</td> -<td>1982</td> -</tr> - -<tr> -<td>Prince</td> -<td>Purple Rain</td> -<td>1984</td> -</tr> - -<tr> -<td>Beastie Boys</td> -<td>License to Ill</td> -<td>1986</td> -</tr> -</tbody> -</table> - -<p>If a table is too wide, it should scroll horizontally.</p> - -<table> -<thead> -<tr> -<th>Artist</th> -<th>Album</th> -<th>Year</th> -<th>Label</th> -<th>Awards</th> -<th>Songs</th> -</tr> -</thead> - -<tbody> -<tr> -<td>Michael Jackson</td> -<td>Thriller</td> -<td>1982</td> -<td>Epic Records</td> -<td>Grammy Award for Album of the Year, American Music Award for Favorite Pop/Rock Album, American Music Award for Favorite Soul/R&amp;B Album, Brit Award for Best Selling Album, Grammy Award for Best Engineered Album, Non-Classical</td> -<td>Wanna Be Startin&rsquo; Somethin&rsquo;, Baby Be Mine, The Girl Is Mine, Thriller, Beat It, Billie Jean, Human Nature, P.Y.T. (Pretty Young Thing), The Lady in My Life</td> -</tr> - -<tr> -<td>Prince</td> -<td>Purple Rain</td> -<td>1984</td> -<td>Warner Brothers Records</td> -<td>Grammy Award for Best Score Soundtrack for Visual Media, American Music Award for Favorite Pop/Rock Album, American Music Award for Favorite Soul/R&amp;B Album, Brit Award for Best Soundtrack/Cast Recording, Grammy Award for Best Rock Performance by a Duo or Group with Vocal</td> -<td>Let&rsquo;s Go Crazy, Take Me With U, The Beautiful Ones, Computer Blue, Darling Nikki, When Doves Cry, I Would Die 4 U, Baby I&rsquo;m a Star, Purple Rain</td> -</tr> - -<tr> -<td>Beastie Boys</td> -<td>License to Ill</td> -<td>1986</td> -<td>Mercury Records</td> -<td>noawardsbutthistablecelliswide</td> -<td>Rhymin &amp; Stealin, The New Style, She&rsquo;s Crafty, Posse in Effect, Slow Ride, Girls, (You Gotta) Fight for Your Right, No Sleep Till Brooklyn, Paul Revere, Hold It Now, Hit It, Brass Monkey, Slow and Low, Time to Get Ill</td> -</tr> -</tbody> -</table> - -<hr /> - -<p>Code snippets like <code>var foo = &quot;bar&quot;;</code> can be shown inline.</p> - -<p>Also, <code>this should vertically align</code> <del><code>with this</code></del> <del>and this</del>.</p> - -<p>Code can also be shown in a block element.</p> -<pre><code>foo := "bar"; -bar := "foo";</code></pre> -<p>Code can also use syntax highlighting.</p> -<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-go" data-lang="go"><span style="color:#204a87;font-weight:bold">func</span> <span style="color:#000">main</span><span style="color:#000;font-weight:bold">(</span><span style="color:#000;font-weight:bold">)</span> <span style="color:#000;font-weight:bold">{</span> - <span style="color:#000">input</span> <span style="color:#ce5c00;font-weight:bold">:=</span> <span style="color:#4e9a06">`</span><span style="color:#4e9a06">var foo = &#34;bar&#34;;</span><span style="color:#4e9a06">`</span> - - <span style="color:#000">lexer</span> <span style="color:#ce5c00;font-weight:bold">:=</span> <span style="color:#000">lexers</span><span style="color:#000;font-weight:bold">.</span><span style="color:#000">Get</span><span style="color:#000;font-weight:bold">(</span><span style="color:#4e9a06">&#34;javascript&#34;</span><span style="color:#000;font-weight:bold">)</span> - <span style="color:#000">iterator</span><span style="color:#000;font-weight:bold">,</span> <span style="color:#000">_</span> <span style="color:#ce5c00;font-weight:bold">:=</span> <span style="color:#000">lexer</span><span style="color:#000;font-weight:bold">.</span><span style="color:#000">Tokenise</span><span style="color:#000;font-weight:bold">(</span><span style="color:#204a87;font-weight:bold">nil</span><span style="color:#000;font-weight:bold">,</span> <span style="color:#000">input</span><span style="color:#000;font-weight:bold">)</span> - <span style="color:#000">style</span> <span style="color:#ce5c00;font-weight:bold">:=</span> <span style="color:#000">styles</span><span style="color:#000;font-weight:bold">.</span><span style="color:#000">Get</span><span style="color:#000;font-weight:bold">(</span><span style="color:#4e9a06">&#34;github&#34;</span><span style="color:#000;font-weight:bold">)</span> - <span style="color:#000">formatter</span> <span style="color:#ce5c00;font-weight:bold">:=</span> <span style="color:#000">html</span><span style="color:#000;font-weight:bold">.</span><span style="color:#000">New</span><span style="color:#000;font-weight:bold">(</span><span style="color:#000">html</span><span style="color:#000;font-weight:bold">.</span><span style="color:#000">WithLineNumbers</span><span style="color:#000;font-weight:bold">(</span><span style="color:#000;font-weight:bold">)</span><span style="color:#000;font-weight:bold">)</span> - - <span style="color:#204a87;font-weight:bold">var</span> <span style="color:#000">buff</span> <span style="color:#000">bytes</span><span style="color:#000;font-weight:bold">.</span><span style="color:#000">Buffer</span> - <span style="color:#000">formatter</span><span style="color:#000;font-weight:bold">.</span><span style="color:#000">Format</span><span style="color:#000;font-weight:bold">(</span><span style="color:#ce5c00;font-weight:bold">&amp;</span><span style="color:#000">buff</span><span style="color:#000;font-weight:bold">,</span> <span style="color:#000">style</span><span style="color:#000;font-weight:bold">,</span> <span style="color:#000">iterator</span><span style="color:#000;font-weight:bold">)</span> - - <span style="color:#000">fmt</span><span style="color:#000;font-weight:bold">.</span><span style="color:#000">Println</span><span style="color:#000;font-weight:bold">(</span><span style="color:#000">buff</span><span style="color:#000;font-weight:bold">.</span><span style="color:#000">String</span><span style="color:#000;font-weight:bold">(</span><span style="color:#000;font-weight:bold">)</span><span style="color:#000;font-weight:bold">)</span> -<span style="color:#000;font-weight:bold">}</span></code></pre></div><pre><code>Long, single-line code blocks should not wrap. They should horizontally scroll if they are too long. This line should be long enough to demonstrate this.</code></pre> -<p>Inline code inside table cells should still be distinguishable.</p> - -<table> -<thead> -<tr> -<th>Language</th> -<th>Code</th> -</tr> -</thead> - -<tbody> -<tr> -<td>Javascript</td> -<td><code>var foo = &quot;bar&quot;;</code></td> -</tr> - -<tr> -<td>Ruby</td> -<td><code>foo = &quot;bar&quot;{</code></td> -</tr> -</tbody> -</table> - -<hr /> - -<p>Small images should be shown at their actual size.</p> - -<p><img src="http://placekitten.com/g/300/200/" alt="" /></p> - -<p>Large images should always scale down and fit in the content container.</p> - -<p><img src="http://placekitten.com/g/1200/800/" alt="" /></p> - -<h2 id="components">Components</h2> - -<h3 id="alerts">Alerts</h3> - -<p> - -<div class="alert alert-primary" role="alert"> - -This is an alert. -</div> - - - -<div class="alert alert-primary" role="alert"> -<h4 class="alert-heading">Note:</h4> -This is an alert with a title. -</div> - - - -<div class="alert alert-primary" role="alert"> - -This is a successful alert. -</div> - - - -<div class="alert alert-primary" role="alert"> - -This is a warning! -</div> - - - -<div class="alert alert-primary" role="alert"> -<h4 class="alert-heading">Warning!</h4> -This is a warning with a title! -</div> -</p> - -<h2 id="sizing">Sizing</h2> - -<p>Add some sections here to see how the ToC looks like. Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.</p> - -<h3 id="parameters-available">Parameters available</h3> - -<p>Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.</p> - -<h3 id="using-pixels">Using pixels</h3> - -<p>Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.</p> - -<h3 id="using-rem">Using rem</h3> - -<p>Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.</p> - -<h2 id="memory">Memory</h2> - -<p>Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.</p> - -<h3 id="ram-to-use">RAM to use</h3> - -<p>Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.</p> - -<h3 id="more-is-better">More is better</h3> - -<p>Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.</p> - -<h3 id="used-ram">Used RAM</h3> - -<p>Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong.</p> -<pre><code>This is the final element on the page and there should be no margin below this.</code></pre> - - - - - \ No newline at end of file diff --git a/docs/js/main.min.b0e99aac17991fa76812dd47914049168ac469a1faa0939560f0b370565becab.js b/docs/js/main.min.b0e99aac17991fa76812dd47914049168ac469a1faa0939560f0b370565becab.js deleted file mode 100644 index 908aef623..000000000 --- a/docs/js/main.min.b0e99aac17991fa76812dd47914049168ac469a1faa0939560f0b370565becab.js +++ /dev/null @@ -1,5 +0,0 @@ -(function($){'use strict';$(function(){$('[data-toggle="tooltip"]').tooltip();$('[data-toggle="popover"]').popover();$('.popover-dismiss').popover({trigger:'focus'})});function bottomPos(element){return element.offset().top+element.outerHeight();} -$(function(){var promo=$(".js-td-cover");if(!promo.length){return} -var promoOffset=bottomPos(promo);var navbarOffset=$('.js-navbar-scroll').offset().top;var threshold=Math.ceil($('.js-navbar-scroll').outerHeight());if((promoOffset-navbarOffset)code{color:inherit}kbd{padding:.2rem .4rem;font-size:87.5%;color:#fff;background-color:#222}kbd kbd{padding:0;font-size:100%;font-weight:700}pre{display:block;font-size:87.5%;color:#222}pre code{font-size:inherit;color:inherit;word-break:normal}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{width:100%;padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media(min-width:576px){.container{max-width:540px}}@media(min-width:768px){.container{max-width:720px}}@media(min-width:992px){.container{max-width:960px}}@media(min-width:1200px){.container{max-width:1140px}}.container-fluid{width:100%;padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}.row{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-right:-15px;margin-left:-15px}.no-gutters{margin-right:0;margin-left:0}.no-gutters>.col,.no-gutters>[class*=col-]{padding-right:0;padding-left:0}.col-1,.col-2,.col-3,.col-4,.col-5,.col-6,.col-7,.col-8,.col-9,.col-10,.col-11,.col-12,.col,.col-auto,.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm,.col-sm-auto,.col-md-1,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-10,.col-md-11,.col-md-12,.col-md,.col-md-auto,.col-lg-1,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg,.col-lg-auto,.col-xl-1,.col-xl-2,.col-xl-3,.col-xl-4,.col-xl-5,.col-xl-6,.col-xl-7,.col-xl-8,.col-xl-9,.col-xl-10,.col-xl-11,.col-xl-12,.col-xl,.col-xl-auto{position:relative;width:100%;min-height:1px;padding-right:15px;padding-left:15px}.col{-webkit-flex-basis:0;-ms-flex-preferred-size:0;flex-basis:0;-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;max-width:100%}.col-auto{-webkit-box-flex:0;-webkit-flex:0 0 auto;-ms-flex:0 0 auto;flex:0 0 auto;width:auto;max-width:none}.col-1{-webkit-box-flex:0;-webkit-flex:0 0 8.33333333%;-ms-flex:0 0 8.33333333%;flex:0 0 8.33333333%;max-width:8.33333333%}.col-2{-webkit-box-flex:0;-webkit-flex:0 0 16.66666667%;-ms-flex:0 0 16.66666667%;flex:0 0 16.66666667%;max-width:16.66666667%}.col-3{-webkit-box-flex:0;-webkit-flex:0 0 25%;-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.col-4{-webkit-box-flex:0;-webkit-flex:0 0 33.33333333%;-ms-flex:0 0 33.33333333%;flex:0 0 33.33333333%;max-width:33.33333333%}.col-5{-webkit-box-flex:0;-webkit-flex:0 0 41.66666667%;-ms-flex:0 0 41.66666667%;flex:0 0 41.66666667%;max-width:41.66666667%}.col-6{-webkit-box-flex:0;-webkit-flex:0 0 50%;-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.col-7{-webkit-box-flex:0;-webkit-flex:0 0 58.33333333%;-ms-flex:0 0 58.33333333%;flex:0 0 58.33333333%;max-width:58.33333333%}.col-8{-webkit-box-flex:0;-webkit-flex:0 0 66.66666667%;-ms-flex:0 0 66.66666667%;flex:0 0 66.66666667%;max-width:66.66666667%}.col-9{-webkit-box-flex:0;-webkit-flex:0 0 75%;-ms-flex:0 0 75%;flex:0 0 75%;max-width:75%}.col-10{-webkit-box-flex:0;-webkit-flex:0 0 83.33333333%;-ms-flex:0 0 83.33333333%;flex:0 0 83.33333333%;max-width:83.33333333%}.col-11{-webkit-box-flex:0;-webkit-flex:0 0 91.66666667%;-ms-flex:0 0 91.66666667%;flex:0 0 91.66666667%;max-width:91.66666667%}.col-12{-webkit-box-flex:0;-webkit-flex:0 0 100%;-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.order-first{-webkit-box-ordinal-group:0;-webkit-order:-1;-ms-flex-order:-1;order:-1}.order-last{-webkit-box-ordinal-group:14;-webkit-order:13;-ms-flex-order:13;order:13}.order-0{-webkit-box-ordinal-group:1;-webkit-order:0;-ms-flex-order:0;order:0}.order-1{-webkit-box-ordinal-group:2;-webkit-order:1;-ms-flex-order:1;order:1}.order-2{-webkit-box-ordinal-group:3;-webkit-order:2;-ms-flex-order:2;order:2}.order-3{-webkit-box-ordinal-group:4;-webkit-order:3;-ms-flex-order:3;order:3}.order-4{-webkit-box-ordinal-group:5;-webkit-order:4;-ms-flex-order:4;order:4}.order-5{-webkit-box-ordinal-group:6;-webkit-order:5;-ms-flex-order:5;order:5}.order-6{-webkit-box-ordinal-group:7;-webkit-order:6;-ms-flex-order:6;order:6}.order-7{-webkit-box-ordinal-group:8;-webkit-order:7;-ms-flex-order:7;order:7}.order-8{-webkit-box-ordinal-group:9;-webkit-order:8;-ms-flex-order:8;order:8}.order-9{-webkit-box-ordinal-group:10;-webkit-order:9;-ms-flex-order:9;order:9}.order-10{-webkit-box-ordinal-group:11;-webkit-order:10;-ms-flex-order:10;order:10}.order-11{-webkit-box-ordinal-group:12;-webkit-order:11;-ms-flex-order:11;order:11}.order-12{-webkit-box-ordinal-group:13;-webkit-order:12;-ms-flex-order:12;order:12}.offset-1{margin-left:8.33333333%}.offset-2{margin-left:16.66666667%}.offset-3{margin-left:25%}.offset-4{margin-left:33.33333333%}.offset-5{margin-left:41.66666667%}.offset-6{margin-left:50%}.offset-7{margin-left:58.33333333%}.offset-8{margin-left:66.66666667%}.offset-9{margin-left:75%}.offset-10{margin-left:83.33333333%}.offset-11{margin-left:91.66666667%}@media(min-width:576px){.col-sm{-webkit-flex-basis:0;-ms-flex-preferred-size:0;flex-basis:0;-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;max-width:100%}.col-sm-auto{-webkit-box-flex:0;-webkit-flex:0 0 auto;-ms-flex:0 0 auto;flex:0 0 auto;width:auto;max-width:none}.col-sm-1{-webkit-box-flex:0;-webkit-flex:0 0 8.33333333%;-ms-flex:0 0 8.33333333%;flex:0 0 8.33333333%;max-width:8.33333333%}.col-sm-2{-webkit-box-flex:0;-webkit-flex:0 0 16.66666667%;-ms-flex:0 0 16.66666667%;flex:0 0 16.66666667%;max-width:16.66666667%}.col-sm-3{-webkit-box-flex:0;-webkit-flex:0 0 25%;-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.col-sm-4{-webkit-box-flex:0;-webkit-flex:0 0 33.33333333%;-ms-flex:0 0 33.33333333%;flex:0 0 33.33333333%;max-width:33.33333333%}.col-sm-5{-webkit-box-flex:0;-webkit-flex:0 0 41.66666667%;-ms-flex:0 0 41.66666667%;flex:0 0 41.66666667%;max-width:41.66666667%}.col-sm-6{-webkit-box-flex:0;-webkit-flex:0 0 50%;-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.col-sm-7{-webkit-box-flex:0;-webkit-flex:0 0 58.33333333%;-ms-flex:0 0 58.33333333%;flex:0 0 58.33333333%;max-width:58.33333333%}.col-sm-8{-webkit-box-flex:0;-webkit-flex:0 0 66.66666667%;-ms-flex:0 0 66.66666667%;flex:0 0 66.66666667%;max-width:66.66666667%}.col-sm-9{-webkit-box-flex:0;-webkit-flex:0 0 75%;-ms-flex:0 0 75%;flex:0 0 75%;max-width:75%}.col-sm-10{-webkit-box-flex:0;-webkit-flex:0 0 83.33333333%;-ms-flex:0 0 83.33333333%;flex:0 0 83.33333333%;max-width:83.33333333%}.col-sm-11{-webkit-box-flex:0;-webkit-flex:0 0 91.66666667%;-ms-flex:0 0 91.66666667%;flex:0 0 91.66666667%;max-width:91.66666667%}.col-sm-12{-webkit-box-flex:0;-webkit-flex:0 0 100%;-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.order-sm-first{-webkit-box-ordinal-group:0;-webkit-order:-1;-ms-flex-order:-1;order:-1}.order-sm-last{-webkit-box-ordinal-group:14;-webkit-order:13;-ms-flex-order:13;order:13}.order-sm-0{-webkit-box-ordinal-group:1;-webkit-order:0;-ms-flex-order:0;order:0}.order-sm-1{-webkit-box-ordinal-group:2;-webkit-order:1;-ms-flex-order:1;order:1}.order-sm-2{-webkit-box-ordinal-group:3;-webkit-order:2;-ms-flex-order:2;order:2}.order-sm-3{-webkit-box-ordinal-group:4;-webkit-order:3;-ms-flex-order:3;order:3}.order-sm-4{-webkit-box-ordinal-group:5;-webkit-order:4;-ms-flex-order:4;order:4}.order-sm-5{-webkit-box-ordinal-group:6;-webkit-order:5;-ms-flex-order:5;order:5}.order-sm-6{-webkit-box-ordinal-group:7;-webkit-order:6;-ms-flex-order:6;order:6}.order-sm-7{-webkit-box-ordinal-group:8;-webkit-order:7;-ms-flex-order:7;order:7}.order-sm-8{-webkit-box-ordinal-group:9;-webkit-order:8;-ms-flex-order:8;order:8}.order-sm-9{-webkit-box-ordinal-group:10;-webkit-order:9;-ms-flex-order:9;order:9}.order-sm-10{-webkit-box-ordinal-group:11;-webkit-order:10;-ms-flex-order:10;order:10}.order-sm-11{-webkit-box-ordinal-group:12;-webkit-order:11;-ms-flex-order:11;order:11}.order-sm-12{-webkit-box-ordinal-group:13;-webkit-order:12;-ms-flex-order:12;order:12}.offset-sm-0{margin-left:0}.offset-sm-1{margin-left:8.33333333%}.offset-sm-2{margin-left:16.66666667%}.offset-sm-3{margin-left:25%}.offset-sm-4{margin-left:33.33333333%}.offset-sm-5{margin-left:41.66666667%}.offset-sm-6{margin-left:50%}.offset-sm-7{margin-left:58.33333333%}.offset-sm-8{margin-left:66.66666667%}.offset-sm-9{margin-left:75%}.offset-sm-10{margin-left:83.33333333%}.offset-sm-11{margin-left:91.66666667%}}@media(min-width:768px){.col-md{-webkit-flex-basis:0;-ms-flex-preferred-size:0;flex-basis:0;-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;max-width:100%}.col-md-auto{-webkit-box-flex:0;-webkit-flex:0 0 auto;-ms-flex:0 0 auto;flex:0 0 auto;width:auto;max-width:none}.col-md-1{-webkit-box-flex:0;-webkit-flex:0 0 8.33333333%;-ms-flex:0 0 8.33333333%;flex:0 0 8.33333333%;max-width:8.33333333%}.col-md-2{-webkit-box-flex:0;-webkit-flex:0 0 16.66666667%;-ms-flex:0 0 16.66666667%;flex:0 0 16.66666667%;max-width:16.66666667%}.col-md-3{-webkit-box-flex:0;-webkit-flex:0 0 25%;-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.col-md-4{-webkit-box-flex:0;-webkit-flex:0 0 33.33333333%;-ms-flex:0 0 33.33333333%;flex:0 0 33.33333333%;max-width:33.33333333%}.col-md-5{-webkit-box-flex:0;-webkit-flex:0 0 41.66666667%;-ms-flex:0 0 41.66666667%;flex:0 0 41.66666667%;max-width:41.66666667%}.col-md-6{-webkit-box-flex:0;-webkit-flex:0 0 50%;-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.col-md-7{-webkit-box-flex:0;-webkit-flex:0 0 58.33333333%;-ms-flex:0 0 58.33333333%;flex:0 0 58.33333333%;max-width:58.33333333%}.col-md-8{-webkit-box-flex:0;-webkit-flex:0 0 66.66666667%;-ms-flex:0 0 66.66666667%;flex:0 0 66.66666667%;max-width:66.66666667%}.col-md-9{-webkit-box-flex:0;-webkit-flex:0 0 75%;-ms-flex:0 0 75%;flex:0 0 75%;max-width:75%}.col-md-10{-webkit-box-flex:0;-webkit-flex:0 0 83.33333333%;-ms-flex:0 0 83.33333333%;flex:0 0 83.33333333%;max-width:83.33333333%}.col-md-11{-webkit-box-flex:0;-webkit-flex:0 0 91.66666667%;-ms-flex:0 0 91.66666667%;flex:0 0 91.66666667%;max-width:91.66666667%}.col-md-12{-webkit-box-flex:0;-webkit-flex:0 0 100%;-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.order-md-first{-webkit-box-ordinal-group:0;-webkit-order:-1;-ms-flex-order:-1;order:-1}.order-md-last{-webkit-box-ordinal-group:14;-webkit-order:13;-ms-flex-order:13;order:13}.order-md-0{-webkit-box-ordinal-group:1;-webkit-order:0;-ms-flex-order:0;order:0}.order-md-1{-webkit-box-ordinal-group:2;-webkit-order:1;-ms-flex-order:1;order:1}.order-md-2{-webkit-box-ordinal-group:3;-webkit-order:2;-ms-flex-order:2;order:2}.order-md-3{-webkit-box-ordinal-group:4;-webkit-order:3;-ms-flex-order:3;order:3}.order-md-4{-webkit-box-ordinal-group:5;-webkit-order:4;-ms-flex-order:4;order:4}.order-md-5{-webkit-box-ordinal-group:6;-webkit-order:5;-ms-flex-order:5;order:5}.order-md-6{-webkit-box-ordinal-group:7;-webkit-order:6;-ms-flex-order:6;order:6}.order-md-7{-webkit-box-ordinal-group:8;-webkit-order:7;-ms-flex-order:7;order:7}.order-md-8{-webkit-box-ordinal-group:9;-webkit-order:8;-ms-flex-order:8;order:8}.order-md-9{-webkit-box-ordinal-group:10;-webkit-order:9;-ms-flex-order:9;order:9}.order-md-10{-webkit-box-ordinal-group:11;-webkit-order:10;-ms-flex-order:10;order:10}.order-md-11{-webkit-box-ordinal-group:12;-webkit-order:11;-ms-flex-order:11;order:11}.order-md-12{-webkit-box-ordinal-group:13;-webkit-order:12;-ms-flex-order:12;order:12}.offset-md-0{margin-left:0}.offset-md-1{margin-left:8.33333333%}.offset-md-2{margin-left:16.66666667%}.offset-md-3{margin-left:25%}.offset-md-4{margin-left:33.33333333%}.offset-md-5{margin-left:41.66666667%}.offset-md-6{margin-left:50%}.offset-md-7{margin-left:58.33333333%}.offset-md-8{margin-left:66.66666667%}.offset-md-9{margin-left:75%}.offset-md-10{margin-left:83.33333333%}.offset-md-11{margin-left:91.66666667%}}@media(min-width:992px){.col-lg{-webkit-flex-basis:0;-ms-flex-preferred-size:0;flex-basis:0;-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;max-width:100%}.col-lg-auto{-webkit-box-flex:0;-webkit-flex:0 0 auto;-ms-flex:0 0 auto;flex:0 0 auto;width:auto;max-width:none}.col-lg-1{-webkit-box-flex:0;-webkit-flex:0 0 8.33333333%;-ms-flex:0 0 8.33333333%;flex:0 0 8.33333333%;max-width:8.33333333%}.col-lg-2{-webkit-box-flex:0;-webkit-flex:0 0 16.66666667%;-ms-flex:0 0 16.66666667%;flex:0 0 16.66666667%;max-width:16.66666667%}.col-lg-3{-webkit-box-flex:0;-webkit-flex:0 0 25%;-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.col-lg-4{-webkit-box-flex:0;-webkit-flex:0 0 33.33333333%;-ms-flex:0 0 33.33333333%;flex:0 0 33.33333333%;max-width:33.33333333%}.col-lg-5{-webkit-box-flex:0;-webkit-flex:0 0 41.66666667%;-ms-flex:0 0 41.66666667%;flex:0 0 41.66666667%;max-width:41.66666667%}.col-lg-6{-webkit-box-flex:0;-webkit-flex:0 0 50%;-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.col-lg-7{-webkit-box-flex:0;-webkit-flex:0 0 58.33333333%;-ms-flex:0 0 58.33333333%;flex:0 0 58.33333333%;max-width:58.33333333%}.col-lg-8{-webkit-box-flex:0;-webkit-flex:0 0 66.66666667%;-ms-flex:0 0 66.66666667%;flex:0 0 66.66666667%;max-width:66.66666667%}.col-lg-9{-webkit-box-flex:0;-webkit-flex:0 0 75%;-ms-flex:0 0 75%;flex:0 0 75%;max-width:75%}.col-lg-10{-webkit-box-flex:0;-webkit-flex:0 0 83.33333333%;-ms-flex:0 0 83.33333333%;flex:0 0 83.33333333%;max-width:83.33333333%}.col-lg-11{-webkit-box-flex:0;-webkit-flex:0 0 91.66666667%;-ms-flex:0 0 91.66666667%;flex:0 0 91.66666667%;max-width:91.66666667%}.col-lg-12{-webkit-box-flex:0;-webkit-flex:0 0 100%;-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.order-lg-first{-webkit-box-ordinal-group:0;-webkit-order:-1;-ms-flex-order:-1;order:-1}.order-lg-last{-webkit-box-ordinal-group:14;-webkit-order:13;-ms-flex-order:13;order:13}.order-lg-0{-webkit-box-ordinal-group:1;-webkit-order:0;-ms-flex-order:0;order:0}.order-lg-1{-webkit-box-ordinal-group:2;-webkit-order:1;-ms-flex-order:1;order:1}.order-lg-2{-webkit-box-ordinal-group:3;-webkit-order:2;-ms-flex-order:2;order:2}.order-lg-3{-webkit-box-ordinal-group:4;-webkit-order:3;-ms-flex-order:3;order:3}.order-lg-4{-webkit-box-ordinal-group:5;-webkit-order:4;-ms-flex-order:4;order:4}.order-lg-5{-webkit-box-ordinal-group:6;-webkit-order:5;-ms-flex-order:5;order:5}.order-lg-6{-webkit-box-ordinal-group:7;-webkit-order:6;-ms-flex-order:6;order:6}.order-lg-7{-webkit-box-ordinal-group:8;-webkit-order:7;-ms-flex-order:7;order:7}.order-lg-8{-webkit-box-ordinal-group:9;-webkit-order:8;-ms-flex-order:8;order:8}.order-lg-9{-webkit-box-ordinal-group:10;-webkit-order:9;-ms-flex-order:9;order:9}.order-lg-10{-webkit-box-ordinal-group:11;-webkit-order:10;-ms-flex-order:10;order:10}.order-lg-11{-webkit-box-ordinal-group:12;-webkit-order:11;-ms-flex-order:11;order:11}.order-lg-12{-webkit-box-ordinal-group:13;-webkit-order:12;-ms-flex-order:12;order:12}.offset-lg-0{margin-left:0}.offset-lg-1{margin-left:8.33333333%}.offset-lg-2{margin-left:16.66666667%}.offset-lg-3{margin-left:25%}.offset-lg-4{margin-left:33.33333333%}.offset-lg-5{margin-left:41.66666667%}.offset-lg-6{margin-left:50%}.offset-lg-7{margin-left:58.33333333%}.offset-lg-8{margin-left:66.66666667%}.offset-lg-9{margin-left:75%}.offset-lg-10{margin-left:83.33333333%}.offset-lg-11{margin-left:91.66666667%}}@media(min-width:1200px){.col-xl{-webkit-flex-basis:0;-ms-flex-preferred-size:0;flex-basis:0;-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;max-width:100%}.col-xl-auto{-webkit-box-flex:0;-webkit-flex:0 0 auto;-ms-flex:0 0 auto;flex:0 0 auto;width:auto;max-width:none}.col-xl-1{-webkit-box-flex:0;-webkit-flex:0 0 8.33333333%;-ms-flex:0 0 8.33333333%;flex:0 0 8.33333333%;max-width:8.33333333%}.col-xl-2{-webkit-box-flex:0;-webkit-flex:0 0 16.66666667%;-ms-flex:0 0 16.66666667%;flex:0 0 16.66666667%;max-width:16.66666667%}.col-xl-3{-webkit-box-flex:0;-webkit-flex:0 0 25%;-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.col-xl-4{-webkit-box-flex:0;-webkit-flex:0 0 33.33333333%;-ms-flex:0 0 33.33333333%;flex:0 0 33.33333333%;max-width:33.33333333%}.col-xl-5{-webkit-box-flex:0;-webkit-flex:0 0 41.66666667%;-ms-flex:0 0 41.66666667%;flex:0 0 41.66666667%;max-width:41.66666667%}.col-xl-6{-webkit-box-flex:0;-webkit-flex:0 0 50%;-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.col-xl-7{-webkit-box-flex:0;-webkit-flex:0 0 58.33333333%;-ms-flex:0 0 58.33333333%;flex:0 0 58.33333333%;max-width:58.33333333%}.col-xl-8{-webkit-box-flex:0;-webkit-flex:0 0 66.66666667%;-ms-flex:0 0 66.66666667%;flex:0 0 66.66666667%;max-width:66.66666667%}.col-xl-9{-webkit-box-flex:0;-webkit-flex:0 0 75%;-ms-flex:0 0 75%;flex:0 0 75%;max-width:75%}.col-xl-10{-webkit-box-flex:0;-webkit-flex:0 0 83.33333333%;-ms-flex:0 0 83.33333333%;flex:0 0 83.33333333%;max-width:83.33333333%}.col-xl-11{-webkit-box-flex:0;-webkit-flex:0 0 91.66666667%;-ms-flex:0 0 91.66666667%;flex:0 0 91.66666667%;max-width:91.66666667%}.col-xl-12{-webkit-box-flex:0;-webkit-flex:0 0 100%;-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.order-xl-first{-webkit-box-ordinal-group:0;-webkit-order:-1;-ms-flex-order:-1;order:-1}.order-xl-last{-webkit-box-ordinal-group:14;-webkit-order:13;-ms-flex-order:13;order:13}.order-xl-0{-webkit-box-ordinal-group:1;-webkit-order:0;-ms-flex-order:0;order:0}.order-xl-1{-webkit-box-ordinal-group:2;-webkit-order:1;-ms-flex-order:1;order:1}.order-xl-2{-webkit-box-ordinal-group:3;-webkit-order:2;-ms-flex-order:2;order:2}.order-xl-3{-webkit-box-ordinal-group:4;-webkit-order:3;-ms-flex-order:3;order:3}.order-xl-4{-webkit-box-ordinal-group:5;-webkit-order:4;-ms-flex-order:4;order:4}.order-xl-5{-webkit-box-ordinal-group:6;-webkit-order:5;-ms-flex-order:5;order:5}.order-xl-6{-webkit-box-ordinal-group:7;-webkit-order:6;-ms-flex-order:6;order:6}.order-xl-7{-webkit-box-ordinal-group:8;-webkit-order:7;-ms-flex-order:7;order:7}.order-xl-8{-webkit-box-ordinal-group:9;-webkit-order:8;-ms-flex-order:8;order:8}.order-xl-9{-webkit-box-ordinal-group:10;-webkit-order:9;-ms-flex-order:9;order:9}.order-xl-10{-webkit-box-ordinal-group:11;-webkit-order:10;-ms-flex-order:10;order:10}.order-xl-11{-webkit-box-ordinal-group:12;-webkit-order:11;-ms-flex-order:11;order:11}.order-xl-12{-webkit-box-ordinal-group:13;-webkit-order:12;-ms-flex-order:12;order:12}.offset-xl-0{margin-left:0}.offset-xl-1{margin-left:8.33333333%}.offset-xl-2{margin-left:16.66666667%}.offset-xl-3{margin-left:25%}.offset-xl-4{margin-left:33.33333333%}.offset-xl-5{margin-left:41.66666667%}.offset-xl-6{margin-left:50%}.offset-xl-7{margin-left:58.33333333%}.offset-xl-8{margin-left:66.66666667%}.offset-xl-9{margin-left:75%}.offset-xl-10{margin-left:83.33333333%}.offset-xl-11{margin-left:91.66666667%}}.table,.td-box .row.section>table,.td-content>table{width:100%;margin-bottom:1rem;background-color:transparent}.table th,.td-box .row.section>table th,.td-content>table th,.table td,.td-box .row.section>table td,.td-content>table td{padding:.75rem;vertical-align:top;border-top:1px solid #dee2e6}.table thead th,.td-box .row.section>table thead th,.td-content>table thead th{vertical-align:bottom;border-bottom:2px solid #dee2e6}.table tbody+tbody,.td-box .row.section>table tbody+tbody,.td-content>table tbody+tbody{border-top:2px solid #dee2e6}.table .table,.td-box .row.section>table .table,.td-content>table .table,.table .td-box .row.section>table,.td-box .table .row.section>table,.td-box .row.section>table .row.section>table,.td-content>table .td-box .row.section>table,.td-box .td-content>table .row.section>table,.table .td-content>table,.td-box .row.section>table .td-content>table,.td-content>table .td-content>table{background-color:#fff}.table-sm th,.table-sm td{padding:.3rem}.table-bordered{border:1px solid #dee2e6}.table-bordered th,.table-bordered td{border:1px solid #dee2e6}.table-bordered thead th,.table-bordered thead td{border-bottom-width:2px}.table-borderless th,.table-borderless td,.table-borderless thead th,.table-borderless tbody+tbody{border:0}.table-striped tbody tr:nth-of-type(odd),.td-box .row.section>table tbody tr:nth-of-type(odd),.td-content>table tbody tr:nth-of-type(odd){background-color:rgba(0,0,0,.05)}.table-hover tbody tr:hover{background-color:rgba(0,0,0,.075)}.table-primary,.table-primary>th,.table-primary>td{background-color:#c0e5cc}.table-hover .table-primary:hover{background-color:#aedebd}.table-hover .table-primary:hover>td,.table-hover .table-primary:hover>th{background-color:#aedebd}.table-secondary,.table-secondary>th,.table-secondary>td{background-color:#ffe6c5}.table-hover .table-secondary:hover{background-color:#ffdbac}.table-hover .table-secondary:hover>td,.table-hover .table-secondary:hover>th{background-color:#ffdbac}.table-success,.table-success>th,.table-success>td{background-color:#c7d8ff}.table-hover .table-success:hover{background-color:#aec6ff}.table-hover .table-success:hover>td,.table-hover .table-success:hover>th{background-color:#aec6ff}.table-info,.table-info>th,.table-info>td{background-color:#edf6f6}.table-hover .table-info:hover{background-color:#dceeee}.table-hover .table-info:hover>td,.table-hover .table-info:hover>th{background-color:#dceeee}.table-warning,.table-warning>th,.table-warning>td{background-color:#fad5d1}.table-hover .table-warning:hover{background-color:#f8c0ba}.table-hover .table-warning:hover>td,.table-hover .table-warning:hover>th{background-color:#f8c0ba}.table-danger,.table-danger>th,.table-danger>td{background-color:#fad5d1}.table-hover .table-danger:hover{background-color:#f8c0ba}.table-hover .table-danger:hover>td,.table-hover .table-danger:hover>th{background-color:#f8c0ba}.table-light,.table-light>th,.table-light>td{background-color:#f3fcfa}.table-hover .table-light:hover{background-color:#dff7f2}.table-hover .table-light:hover>td,.table-hover .table-light:hover>th{background-color:#dff7f2}.table-dark,.table-dark>th,.table-dark>td{background-color:#cac9cd}.table-hover .table-dark:hover{background-color:#bdbcc1}.table-hover .table-dark:hover>td,.table-hover .table-dark:hover>th{background-color:#bdbcc1}.table-active,.table-active>th,.table-active>td{background-color:rgba(0,0,0,.075)}.table-hover .table-active:hover{background-color:rgba(0,0,0,.075)}.table-hover .table-active:hover>td,.table-hover .table-active:hover>th{background-color:rgba(0,0,0,.075)}.table .thead-dark th,.td-box .row.section>table .thead-dark th,.td-content>table .thead-dark th{color:#fff;background-color:#222;border-color:#353535}.table .thead-light th,.td-box .row.section>table .thead-light th,.td-content>table .thead-light th{color:#495057;background-color:#eee;border-color:#dee2e6}.table-dark{color:#fff;background-color:#222}.table-dark th,.table-dark td,.table-dark thead th{border-color:#353535}.table-dark.table-bordered{border:0}.table-dark.table-striped tbody tr:nth-of-type(odd),.td-box .row.section>table.table-dark tbody tr:nth-of-type(odd),.td-content>table.table-dark tbody tr:nth-of-type(odd){background-color:rgba(255,255,255,.05)}.table-dark.table-hover tbody tr:hover{background-color:rgba(255,255,255,.075)}@media(max-width:575.98px){.table-responsive-sm{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;-ms-overflow-style:-ms-autohiding-scrollbar}.table-responsive-sm>.table-bordered{border:0}}@media(max-width:767.98px){.table-responsive-md{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;-ms-overflow-style:-ms-autohiding-scrollbar}.table-responsive-md>.table-bordered{border:0}}@media(max-width:991.98px){.table-responsive-lg{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;-ms-overflow-style:-ms-autohiding-scrollbar}.table-responsive-lg>.table-bordered{border:0}}@media(max-width:1199.98px){.table-responsive-xl{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;-ms-overflow-style:-ms-autohiding-scrollbar}.table-responsive-xl>.table-bordered{border:0}}.table-responsive,.td-box .row.section>table,.td-content>table{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;-ms-overflow-style:-ms-autohiding-scrollbar}.table-responsive>.table-bordered,.td-box .row.section>table>.table-bordered,.td-content>table>.table-bordered{border:0}.form-control{display:block;width:100%;height:-webkit-calc(2.25rem + 2px);height:calc(2.25rem + 2px);padding:.375rem .75rem;font-size:1rem;line-height:1.5;color:#495057;background-color:#fff;background-clip:padding-box;border:1px solid #ccc;border-radius:0;-webkit-transition:border-color .15s ease-in-out,-webkit-box-shadow .15s ease-in-out;transition:border-color .15s ease-in-out,-webkit-box-shadow .15s ease-in-out;-o-transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out,-webkit-box-shadow .15s ease-in-out}@media screen and (prefers-reduced-motion:reduce){.form-control{-webkit-transition:none;-o-transition:none;transition:none}}.form-control::-ms-expand{background-color:transparent;border:0}.form-control:focus{color:#495057;background-color:#fff;border-color:#5ee189;outline:0;-webkit-box-shadow:0 0 0 .2rem rgba(30,161,73,.25);box-shadow:0 0 0 .2rem rgba(30,161,73,.25)}.form-control::-webkit-input-placeholder{color:#888;opacity:1}.form-control::-moz-placeholder{color:#888;opacity:1}.form-control:-ms-input-placeholder{color:#888;opacity:1}.form-control::placeholder{color:#888;opacity:1}.form-control:disabled,.form-control[readonly]{background-color:#eee;opacity:1}select.form-control:focus::-ms-value{color:#495057;background-color:#fff}.form-control-file,.form-control-range{display:block;width:100%}.col-form-label{padding-top:-webkit-calc(0.375rem + 1px);padding-top:calc(0.375rem + 1px);padding-bottom:-webkit-calc(0.375rem + 1px);padding-bottom:calc(0.375rem + 1px);margin-bottom:0;font-size:inherit;line-height:1.5}.col-form-label-lg{padding-top:-webkit-calc(0.5rem + 1px);padding-top:calc(0.5rem + 1px);padding-bottom:-webkit-calc(0.5rem + 1px);padding-bottom:calc(0.5rem + 1px);font-size:1.25rem;line-height:1.5}.col-form-label-sm{padding-top:-webkit-calc(0.25rem + 1px);padding-top:calc(0.25rem + 1px);padding-bottom:-webkit-calc(0.25rem + 1px);padding-bottom:calc(0.25rem + 1px);font-size:.875rem;line-height:1.5}.form-control-plaintext{display:block;width:100%;padding-top:.375rem;padding-bottom:.375rem;margin-bottom:0;line-height:1.5;color:#222;background-color:transparent;border:solid transparent;border-width:1px 0}.form-control-plaintext.form-control-sm,.form-control-plaintext.form-control-lg{padding-right:0;padding-left:0}.form-control-sm{height:-webkit-calc(1.8125rem + 2px);height:calc(1.8125rem + 2px);padding:.25rem .5rem;font-size:.875rem;line-height:1.5}.form-control-lg{height:-webkit-calc(2.875rem + 2px);height:calc(2.875rem + 2px);padding:.5rem 1rem;font-size:1.25rem;line-height:1.5}select.form-control[size],select.form-control[multiple]{height:auto}textarea.form-control{height:auto}.form-group{margin-bottom:1rem}.form-text{display:block;margin-top:.25rem}.form-row{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-right:-5px;margin-left:-5px}.form-row>.col,.form-row>[class*=col-]{padding-right:5px;padding-left:5px}.form-check{position:relative;display:block;padding-left:1.25rem}.form-check-input{position:absolute;margin-top:.3rem;margin-left:-1.25rem}.form-check-input:disabled~.form-check-label{color:#888}.form-check-label{margin-bottom:0}.form-check-inline{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;padding-left:0;margin-right:.75rem}.form-check-inline .form-check-input{position:static;margin-top:0;margin-right:.3125rem;margin-left:0}.valid-feedback{display:none;width:100%;margin-top:.25rem;font-size:80%;color:#3772ff}.valid-tooltip{position:absolute;top:100%;z-index:5;display:none;max-width:100%;padding:.25rem .5rem;margin-top:.1rem;font-size:.875rem;line-height:1.5;color:#fff;background-color:rgba(55,114,255,.9)}.was-validated .form-control:valid,.form-control.is-valid,.was-validated .custom-select:valid,.custom-select.is-valid{border-color:#3772ff}.was-validated .form-control:valid:focus,.form-control.is-valid:focus,.was-validated .custom-select:valid:focus,.custom-select.is-valid:focus{border-color:#3772ff;-webkit-box-shadow:0 0 0 .2rem rgba(55,114,255,.25);box-shadow:0 0 0 .2rem rgba(55,114,255,.25)}.was-validated .form-control:valid~.valid-feedback,.was-validated .form-control:valid~.valid-tooltip,.form-control.is-valid~.valid-feedback,.form-control.is-valid~.valid-tooltip,.was-validated .custom-select:valid~.valid-feedback,.was-validated .custom-select:valid~.valid-tooltip,.custom-select.is-valid~.valid-feedback,.custom-select.is-valid~.valid-tooltip{display:block}.was-validated .form-control-file:valid~.valid-feedback,.was-validated .form-control-file:valid~.valid-tooltip,.form-control-file.is-valid~.valid-feedback,.form-control-file.is-valid~.valid-tooltip{display:block}.was-validated .form-check-input:valid~.form-check-label,.form-check-input.is-valid~.form-check-label{color:#3772ff}.was-validated .form-check-input:valid~.valid-feedback,.was-validated .form-check-input:valid~.valid-tooltip,.form-check-input.is-valid~.valid-feedback,.form-check-input.is-valid~.valid-tooltip{display:block}.was-validated .custom-control-input:valid~.custom-control-label,.custom-control-input.is-valid~.custom-control-label{color:#3772ff}.was-validated .custom-control-input:valid~.custom-control-label::before,.custom-control-input.is-valid~.custom-control-label::before{background-color:#b7ccff}.was-validated .custom-control-input:valid~.valid-feedback,.was-validated .custom-control-input:valid~.valid-tooltip,.custom-control-input.is-valid~.valid-feedback,.custom-control-input.is-valid~.valid-tooltip{display:block}.was-validated .custom-control-input:valid:checked~.custom-control-label::before,.custom-control-input.is-valid:checked~.custom-control-label::before{background-color:#6a96ff}.was-validated .custom-control-input:valid:focus~.custom-control-label::before,.custom-control-input.is-valid:focus~.custom-control-label::before{-webkit-box-shadow:0 0 0 1px #fff,0 0 0 .2rem rgba(55,114,255,.25);box-shadow:0 0 0 1px #fff,0 0 0 .2rem rgba(55,114,255,.25)}.was-validated .custom-file-input:valid~.custom-file-label,.custom-file-input.is-valid~.custom-file-label{border-color:#3772ff}.was-validated .custom-file-input:valid~.custom-file-label::after,.custom-file-input.is-valid~.custom-file-label::after{border-color:inherit}.was-validated .custom-file-input:valid~.valid-feedback,.was-validated .custom-file-input:valid~.valid-tooltip,.custom-file-input.is-valid~.valid-feedback,.custom-file-input.is-valid~.valid-tooltip{display:block}.was-validated .custom-file-input:valid:focus~.custom-file-label,.custom-file-input.is-valid:focus~.custom-file-label{-webkit-box-shadow:0 0 0 .2rem rgba(55,114,255,.25);box-shadow:0 0 0 .2rem rgba(55,114,255,.25)}.invalid-feedback{display:none;width:100%;margin-top:.25rem;font-size:80%;color:#ed6a5a}.invalid-tooltip{position:absolute;top:100%;z-index:5;display:none;max-width:100%;padding:.25rem .5rem;margin-top:.1rem;font-size:.875rem;line-height:1.5;color:#fff;background-color:rgba(237,106,90,.9)}.was-validated .form-control:invalid,.form-control.is-invalid,.was-validated .custom-select:invalid,.custom-select.is-invalid{border-color:#ed6a5a}.was-validated .form-control:invalid:focus,.form-control.is-invalid:focus,.was-validated .custom-select:invalid:focus,.custom-select.is-invalid:focus{border-color:#ed6a5a;-webkit-box-shadow:0 0 0 .2rem rgba(237,106,90,.25);box-shadow:0 0 0 .2rem rgba(237,106,90,.25)}.was-validated .form-control:invalid~.invalid-feedback,.was-validated .form-control:invalid~.invalid-tooltip,.form-control.is-invalid~.invalid-feedback,.form-control.is-invalid~.invalid-tooltip,.was-validated .custom-select:invalid~.invalid-feedback,.was-validated .custom-select:invalid~.invalid-tooltip,.custom-select.is-invalid~.invalid-feedback,.custom-select.is-invalid~.invalid-tooltip{display:block}.was-validated .form-control-file:invalid~.invalid-feedback,.was-validated .form-control-file:invalid~.invalid-tooltip,.form-control-file.is-invalid~.invalid-feedback,.form-control-file.is-invalid~.invalid-tooltip{display:block}.was-validated .form-check-input:invalid~.form-check-label,.form-check-input.is-invalid~.form-check-label{color:#ed6a5a}.was-validated .form-check-input:invalid~.invalid-feedback,.was-validated .form-check-input:invalid~.invalid-tooltip,.form-check-input.is-invalid~.invalid-feedback,.form-check-input.is-invalid~.invalid-tooltip{display:block}.was-validated .custom-control-input:invalid~.custom-control-label,.custom-control-input.is-invalid~.custom-control-label{color:#ed6a5a}.was-validated .custom-control-input:invalid~.custom-control-label::before,.custom-control-input.is-invalid~.custom-control-label::before{background-color:#fad2cd}.was-validated .custom-control-input:invalid~.invalid-feedback,.was-validated .custom-control-input:invalid~.invalid-tooltip,.custom-control-input.is-invalid~.invalid-feedback,.custom-control-input.is-invalid~.invalid-tooltip{display:block}.was-validated .custom-control-input:invalid:checked~.custom-control-label::before,.custom-control-input.is-invalid:checked~.custom-control-label::before{background-color:#f29488}.was-validated .custom-control-input:invalid:focus~.custom-control-label::before,.custom-control-input.is-invalid:focus~.custom-control-label::before{-webkit-box-shadow:0 0 0 1px #fff,0 0 0 .2rem rgba(237,106,90,.25);box-shadow:0 0 0 1px #fff,0 0 0 .2rem rgba(237,106,90,.25)}.was-validated .custom-file-input:invalid~.custom-file-label,.custom-file-input.is-invalid~.custom-file-label{border-color:#ed6a5a}.was-validated .custom-file-input:invalid~.custom-file-label::after,.custom-file-input.is-invalid~.custom-file-label::after{border-color:inherit}.was-validated .custom-file-input:invalid~.invalid-feedback,.was-validated .custom-file-input:invalid~.invalid-tooltip,.custom-file-input.is-invalid~.invalid-feedback,.custom-file-input.is-invalid~.invalid-tooltip{display:block}.was-validated .custom-file-input:invalid:focus~.custom-file-label,.custom-file-input.is-invalid:focus~.custom-file-label{-webkit-box-shadow:0 0 0 .2rem rgba(237,106,90,.25);box-shadow:0 0 0 .2rem rgba(237,106,90,.25)}.form-inline{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-flow:row wrap;-ms-flex-flow:row wrap;flex-flow:row wrap;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center}.form-inline .form-check{width:100%}@media(min-width:576px){.form-inline label{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;margin-bottom:0}.form-inline .form-group{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-flex:0;-webkit-flex:0 0 auto;-ms-flex:0 0 auto;flex:0 0 auto;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-flow:row wrap;-ms-flex-flow:row wrap;flex-flow:row wrap;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;margin-bottom:0}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .form-control-plaintext{display:inline-block}.form-inline .input-group,.form-inline .custom-select{width:auto}.form-inline .form-check{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;width:auto;padding-left:0}.form-inline .form-check-input{position:relative;margin-top:0;margin-right:.25rem;margin-left:0}.form-inline .custom-control{-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}.form-inline .custom-control-label{margin-bottom:0}}.btn{display:inline-block;font-weight:400;text-align:center;white-space:nowrap;vertical-align:middle;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border:1px solid transparent;padding:.375rem .75rem;font-size:1rem;line-height:1.5;border-radius:0;-webkit-transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,-webkit-box-shadow .15s ease-in-out;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,-webkit-box-shadow .15s ease-in-out;-o-transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out,-webkit-box-shadow .15s ease-in-out}@media screen and (prefers-reduced-motion:reduce){.btn{-webkit-transition:none;-o-transition:none;transition:none}}.btn:hover,.btn:focus{text-decoration:none}.btn:focus,.btn.focus{outline:0;-webkit-box-shadow:0 0 0 .2rem rgba(30,161,73,.25);box-shadow:0 0 0 .2rem rgba(30,161,73,.25)}.btn.disabled,.btn:disabled{opacity:.65}.btn:not(:disabled):not(.disabled){cursor:pointer}a.btn.disabled,fieldset:disabled a.btn{pointer-events:none}.btn-primary{color:#fff;background-color:#1ea149;border-color:#1ea149}.btn-primary:hover{color:#fff;background-color:#18813a;border-color:#167636}.btn-primary:focus,.btn-primary.focus{-webkit-box-shadow:0 0 0 .2rem rgba(30,161,73,.5);box-shadow:0 0 0 .2rem rgba(30,161,73,.5)}.btn-primary.disabled,.btn-primary:disabled{color:#fff;background-color:#1ea149;border-color:#1ea149}.btn-primary:not(:disabled):not(.disabled):active,.btn-primary:not(:disabled):not(.disabled).active,.show>.btn-primary.dropdown-toggle{color:#fff;background-color:#167636;border-color:#146b31}.btn-primary:not(:disabled):not(.disabled):active:focus,.btn-primary:not(:disabled):not(.disabled).active:focus,.show>.btn-primary.dropdown-toggle:focus{-webkit-box-shadow:0 0 0 .2rem rgba(30,161,73,.5);box-shadow:0 0 0 .2rem rgba(30,161,73,.5)}.btn-secondary{color:#fff;background-color:#ffa630;border-color:#ffa630}.btn-secondary:hover{color:#fff;background-color:#ff960a;border-color:#fc9000}.btn-secondary:focus,.btn-secondary.focus{-webkit-box-shadow:0 0 0 .2rem rgba(255,166,48,.5);box-shadow:0 0 0 .2rem rgba(255,166,48,.5)}.btn-secondary.disabled,.btn-secondary:disabled{color:#fff;background-color:#ffa630;border-color:#ffa630}.btn-secondary:not(:disabled):not(.disabled):active,.btn-secondary:not(:disabled):not(.disabled).active,.show>.btn-secondary.dropdown-toggle{color:#fff;background-color:#fc9000;border-color:#ef8800}.btn-secondary:not(:disabled):not(.disabled):active:focus,.btn-secondary:not(:disabled):not(.disabled).active:focus,.show>.btn-secondary.dropdown-toggle:focus{-webkit-box-shadow:0 0 0 .2rem rgba(255,166,48,.5);box-shadow:0 0 0 .2rem rgba(255,166,48,.5)}.btn-success{color:#fff;background-color:#3772ff;border-color:#3772ff}.btn-success:hover{color:#fff;background-color:#1157ff;border-color:#044eff}.btn-success:focus,.btn-success.focus{-webkit-box-shadow:0 0 0 .2rem rgba(55,114,255,.5);box-shadow:0 0 0 .2rem rgba(55,114,255,.5)}.btn-success.disabled,.btn-success:disabled{color:#fff;background-color:#3772ff;border-color:#3772ff}.btn-success:not(:disabled):not(.disabled):active,.btn-success:not(:disabled):not(.disabled).active,.show>.btn-success.dropdown-toggle{color:#fff;background-color:#044eff;border-color:#0049f6}.btn-success:not(:disabled):not(.disabled):active:focus,.btn-success:not(:disabled):not(.disabled).active:focus,.show>.btn-success.dropdown-toggle:focus{-webkit-box-shadow:0 0 0 .2rem rgba(55,114,255,.5);box-shadow:0 0 0 .2rem rgba(55,114,255,.5)}.btn-info{color:#222;background-color:#c0e0de;border-color:#c0e0de}.btn-info:hover{color:#fff;background-color:#a6d3d1;border-color:#9ecfcc}.btn-info:focus,.btn-info.focus{-webkit-box-shadow:0 0 0 .2rem rgba(192,224,222,.5);box-shadow:0 0 0 .2rem rgba(192,224,222,.5)}.btn-info.disabled,.btn-info:disabled{color:#222;background-color:#c0e0de;border-color:#c0e0de}.btn-info:not(:disabled):not(.disabled):active,.btn-info:not(:disabled):not(.disabled).active,.show>.btn-info.dropdown-toggle{color:#fff;background-color:#9ecfcc;border-color:#95cbc8}.btn-info:not(:disabled):not(.disabled):active:focus,.btn-info:not(:disabled):not(.disabled).active:focus,.show>.btn-info.dropdown-toggle:focus{-webkit-box-shadow:0 0 0 .2rem rgba(192,224,222,.5);box-shadow:0 0 0 .2rem rgba(192,224,222,.5)}.btn-warning{color:#fff;background-color:#ed6a5a;border-color:#ed6a5a}.btn-warning:hover{color:#fff;background-color:#e94b38;border-color:#e8402c}.btn-warning:focus,.btn-warning.focus{-webkit-box-shadow:0 0 0 .2rem rgba(237,106,90,.5);box-shadow:0 0 0 .2rem rgba(237,106,90,.5)}.btn-warning.disabled,.btn-warning:disabled{color:#fff;background-color:#ed6a5a;border-color:#ed6a5a}.btn-warning:not(:disabled):not(.disabled):active,.btn-warning:not(:disabled):not(.disabled).active,.show>.btn-warning.dropdown-toggle{color:#fff;background-color:#e8402c;border-color:#e73621}.btn-warning:not(:disabled):not(.disabled):active:focus,.btn-warning:not(:disabled):not(.disabled).active:focus,.show>.btn-warning.dropdown-toggle:focus{-webkit-box-shadow:0 0 0 .2rem rgba(237,106,90,.5);box-shadow:0 0 0 .2rem rgba(237,106,90,.5)}.btn-danger{color:#fff;background-color:#ed6a5a;border-color:#ed6a5a}.btn-danger:hover{color:#fff;background-color:#e94b38;border-color:#e8402c}.btn-danger:focus,.btn-danger.focus{-webkit-box-shadow:0 0 0 .2rem rgba(237,106,90,.5);box-shadow:0 0 0 .2rem rgba(237,106,90,.5)}.btn-danger.disabled,.btn-danger:disabled{color:#fff;background-color:#ed6a5a;border-color:#ed6a5a}.btn-danger:not(:disabled):not(.disabled):active,.btn-danger:not(:disabled):not(.disabled).active,.show>.btn-danger.dropdown-toggle{color:#fff;background-color:#e8402c;border-color:#e73621}.btn-danger:not(:disabled):not(.disabled):active:focus,.btn-danger:not(:disabled):not(.disabled).active:focus,.show>.btn-danger.dropdown-toggle:focus{-webkit-box-shadow:0 0 0 .2rem rgba(237,106,90,.5);box-shadow:0 0 0 .2rem rgba(237,106,90,.5)}.btn-light{color:#222;background-color:#d3f3ee;border-color:#d3f3ee}.btn-light:hover{color:#222;background-color:#b5ebe2;border-color:#abe8df}.btn-light:focus,.btn-light.focus{-webkit-box-shadow:0 0 0 .2rem rgba(211,243,238,.5);box-shadow:0 0 0 .2rem rgba(211,243,238,.5)}.btn-light.disabled,.btn-light:disabled{color:#222;background-color:#d3f3ee;border-color:#d3f3ee}.btn-light:not(:disabled):not(.disabled):active,.btn-light:not(:disabled):not(.disabled).active,.show>.btn-light.dropdown-toggle{color:#222;background-color:#abe8df;border-color:#a1e5db}.btn-light:not(:disabled):not(.disabled):active:focus,.btn-light:not(:disabled):not(.disabled).active:focus,.show>.btn-light.dropdown-toggle:focus{-webkit-box-shadow:0 0 0 .2rem rgba(211,243,238,.5);box-shadow:0 0 0 .2rem rgba(211,243,238,.5)}.btn-dark{color:#fff;background-color:#403f4c;border-color:#403f4c}.btn-dark:hover{color:#fff;background-color:#2e2e37;border-color:#292830}.btn-dark:focus,.btn-dark.focus{-webkit-box-shadow:0 0 0 .2rem rgba(64,63,76,.5);box-shadow:0 0 0 .2rem rgba(64,63,76,.5)}.btn-dark.disabled,.btn-dark:disabled{color:#fff;background-color:#403f4c;border-color:#403f4c}.btn-dark:not(:disabled):not(.disabled):active,.btn-dark:not(:disabled):not(.disabled).active,.show>.btn-dark.dropdown-toggle{color:#fff;background-color:#292830;border-color:#232229}.btn-dark:not(:disabled):not(.disabled):active:focus,.btn-dark:not(:disabled):not(.disabled).active:focus,.show>.btn-dark.dropdown-toggle:focus{-webkit-box-shadow:0 0 0 .2rem rgba(64,63,76,.5);box-shadow:0 0 0 .2rem rgba(64,63,76,.5)}.btn-outline-primary{color:#1ea149;background-color:transparent;background-image:none;border-color:#1ea149}.btn-outline-primary:hover{color:#fff;background-color:#1ea149;border-color:#1ea149}.btn-outline-primary:focus,.btn-outline-primary.focus{-webkit-box-shadow:0 0 0 .2rem rgba(30,161,73,.5);box-shadow:0 0 0 .2rem rgba(30,161,73,.5)}.btn-outline-primary.disabled,.btn-outline-primary:disabled{color:#1ea149;background-color:transparent}.btn-outline-primary:not(:disabled):not(.disabled):active,.btn-outline-primary:not(:disabled):not(.disabled).active,.show>.btn-outline-primary.dropdown-toggle{color:#fff;background-color:#1ea149;border-color:#1ea149}.btn-outline-primary:not(:disabled):not(.disabled):active:focus,.btn-outline-primary:not(:disabled):not(.disabled).active:focus,.show>.btn-outline-primary.dropdown-toggle:focus{-webkit-box-shadow:0 0 0 .2rem rgba(30,161,73,.5);box-shadow:0 0 0 .2rem rgba(30,161,73,.5)}.btn-outline-secondary{color:#ffa630;background-color:transparent;background-image:none;border-color:#ffa630}.btn-outline-secondary:hover{color:#fff;background-color:#ffa630;border-color:#ffa630}.btn-outline-secondary:focus,.btn-outline-secondary.focus{-webkit-box-shadow:0 0 0 .2rem rgba(255,166,48,.5);box-shadow:0 0 0 .2rem rgba(255,166,48,.5)}.btn-outline-secondary.disabled,.btn-outline-secondary:disabled{color:#ffa630;background-color:transparent}.btn-outline-secondary:not(:disabled):not(.disabled):active,.btn-outline-secondary:not(:disabled):not(.disabled).active,.show>.btn-outline-secondary.dropdown-toggle{color:#fff;background-color:#ffa630;border-color:#ffa630}.btn-outline-secondary:not(:disabled):not(.disabled):active:focus,.btn-outline-secondary:not(:disabled):not(.disabled).active:focus,.show>.btn-outline-secondary.dropdown-toggle:focus{-webkit-box-shadow:0 0 0 .2rem rgba(255,166,48,.5);box-shadow:0 0 0 .2rem rgba(255,166,48,.5)}.btn-outline-success{color:#3772ff;background-color:transparent;background-image:none;border-color:#3772ff}.btn-outline-success:hover{color:#fff;background-color:#3772ff;border-color:#3772ff}.btn-outline-success:focus,.btn-outline-success.focus{-webkit-box-shadow:0 0 0 .2rem rgba(55,114,255,.5);box-shadow:0 0 0 .2rem rgba(55,114,255,.5)}.btn-outline-success.disabled,.btn-outline-success:disabled{color:#3772ff;background-color:transparent}.btn-outline-success:not(:disabled):not(.disabled):active,.btn-outline-success:not(:disabled):not(.disabled).active,.show>.btn-outline-success.dropdown-toggle{color:#fff;background-color:#3772ff;border-color:#3772ff}.btn-outline-success:not(:disabled):not(.disabled):active:focus,.btn-outline-success:not(:disabled):not(.disabled).active:focus,.show>.btn-outline-success.dropdown-toggle:focus{-webkit-box-shadow:0 0 0 .2rem rgba(55,114,255,.5);box-shadow:0 0 0 .2rem rgba(55,114,255,.5)}.btn-outline-info{color:#c0e0de;background-color:transparent;background-image:none;border-color:#c0e0de}.btn-outline-info:hover{color:#222;background-color:#c0e0de;border-color:#c0e0de}.btn-outline-info:focus,.btn-outline-info.focus{-webkit-box-shadow:0 0 0 .2rem rgba(192,224,222,.5);box-shadow:0 0 0 .2rem rgba(192,224,222,.5)}.btn-outline-info.disabled,.btn-outline-info:disabled{color:#c0e0de;background-color:transparent}.btn-outline-info:not(:disabled):not(.disabled):active,.btn-outline-info:not(:disabled):not(.disabled).active,.show>.btn-outline-info.dropdown-toggle{color:#222;background-color:#c0e0de;border-color:#c0e0de}.btn-outline-info:not(:disabled):not(.disabled):active:focus,.btn-outline-info:not(:disabled):not(.disabled).active:focus,.show>.btn-outline-info.dropdown-toggle:focus{-webkit-box-shadow:0 0 0 .2rem rgba(192,224,222,.5);box-shadow:0 0 0 .2rem rgba(192,224,222,.5)}.btn-outline-warning{color:#ed6a5a;background-color:transparent;background-image:none;border-color:#ed6a5a}.btn-outline-warning:hover{color:#fff;background-color:#ed6a5a;border-color:#ed6a5a}.btn-outline-warning:focus,.btn-outline-warning.focus{-webkit-box-shadow:0 0 0 .2rem rgba(237,106,90,.5);box-shadow:0 0 0 .2rem rgba(237,106,90,.5)}.btn-outline-warning.disabled,.btn-outline-warning:disabled{color:#ed6a5a;background-color:transparent}.btn-outline-warning:not(:disabled):not(.disabled):active,.btn-outline-warning:not(:disabled):not(.disabled).active,.show>.btn-outline-warning.dropdown-toggle{color:#fff;background-color:#ed6a5a;border-color:#ed6a5a}.btn-outline-warning:not(:disabled):not(.disabled):active:focus,.btn-outline-warning:not(:disabled):not(.disabled).active:focus,.show>.btn-outline-warning.dropdown-toggle:focus{-webkit-box-shadow:0 0 0 .2rem rgba(237,106,90,.5);box-shadow:0 0 0 .2rem rgba(237,106,90,.5)}.btn-outline-danger{color:#ed6a5a;background-color:transparent;background-image:none;border-color:#ed6a5a}.btn-outline-danger:hover{color:#fff;background-color:#ed6a5a;border-color:#ed6a5a}.btn-outline-danger:focus,.btn-outline-danger.focus{-webkit-box-shadow:0 0 0 .2rem rgba(237,106,90,.5);box-shadow:0 0 0 .2rem rgba(237,106,90,.5)}.btn-outline-danger.disabled,.btn-outline-danger:disabled{color:#ed6a5a;background-color:transparent}.btn-outline-danger:not(:disabled):not(.disabled):active,.btn-outline-danger:not(:disabled):not(.disabled).active,.show>.btn-outline-danger.dropdown-toggle{color:#fff;background-color:#ed6a5a;border-color:#ed6a5a}.btn-outline-danger:not(:disabled):not(.disabled):active:focus,.btn-outline-danger:not(:disabled):not(.disabled).active:focus,.show>.btn-outline-danger.dropdown-toggle:focus{-webkit-box-shadow:0 0 0 .2rem rgba(237,106,90,.5);box-shadow:0 0 0 .2rem rgba(237,106,90,.5)}.btn-outline-light{color:#d3f3ee;background-color:transparent;background-image:none;border-color:#d3f3ee}.btn-outline-light:hover{color:#222;background-color:#d3f3ee;border-color:#d3f3ee}.btn-outline-light:focus,.btn-outline-light.focus{-webkit-box-shadow:0 0 0 .2rem rgba(211,243,238,.5);box-shadow:0 0 0 .2rem rgba(211,243,238,.5)}.btn-outline-light.disabled,.btn-outline-light:disabled{color:#d3f3ee;background-color:transparent}.btn-outline-light:not(:disabled):not(.disabled):active,.btn-outline-light:not(:disabled):not(.disabled).active,.show>.btn-outline-light.dropdown-toggle{color:#222;background-color:#d3f3ee;border-color:#d3f3ee}.btn-outline-light:not(:disabled):not(.disabled):active:focus,.btn-outline-light:not(:disabled):not(.disabled).active:focus,.show>.btn-outline-light.dropdown-toggle:focus{-webkit-box-shadow:0 0 0 .2rem rgba(211,243,238,.5);box-shadow:0 0 0 .2rem rgba(211,243,238,.5)}.btn-outline-dark{color:#403f4c;background-color:transparent;background-image:none;border-color:#403f4c}.btn-outline-dark:hover{color:#fff;background-color:#403f4c;border-color:#403f4c}.btn-outline-dark:focus,.btn-outline-dark.focus{-webkit-box-shadow:0 0 0 .2rem rgba(64,63,76,.5);box-shadow:0 0 0 .2rem rgba(64,63,76,.5)}.btn-outline-dark.disabled,.btn-outline-dark:disabled{color:#403f4c;background-color:transparent}.btn-outline-dark:not(:disabled):not(.disabled):active,.btn-outline-dark:not(:disabled):not(.disabled).active,.show>.btn-outline-dark.dropdown-toggle{color:#fff;background-color:#403f4c;border-color:#403f4c}.btn-outline-dark:not(:disabled):not(.disabled):active:focus,.btn-outline-dark:not(:disabled):not(.disabled).active:focus,.show>.btn-outline-dark.dropdown-toggle:focus{-webkit-box-shadow:0 0 0 .2rem rgba(64,63,76,.5);box-shadow:0 0 0 .2rem rgba(64,63,76,.5)}.btn-link{font-weight:400;color:#eaaa2c;background-color:transparent}.btn-link:hover{color:#fec555;text-decoration:none;background-color:transparent;border-color:transparent}.btn-link:focus,.btn-link.focus{text-decoration:none;border-color:transparent;-webkit-box-shadow:none;box-shadow:none}.btn-link:disabled,.btn-link.disabled{color:#888;pointer-events:none}.btn-lg,.btn-group-lg>.btn{padding:.5rem 1rem;font-size:1.25rem;line-height:1.5;border-radius:0}.btn-sm,.btn-group-sm>.btn{padding:.25rem .5rem;font-size:.875rem;line-height:1.5;border-radius:0}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:.5rem}input[type=submit].btn-block,input[type=reset].btn-block,input[type=button].btn-block{width:100%}.fade{-webkit-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}@media screen and (prefers-reduced-motion:reduce){.fade{-webkit-transition:none;-o-transition:none;transition:none}}.fade:not(.show){opacity:0}.collapse:not(.show){display:none}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition:height .35s ease;-o-transition:height .35s ease;transition:height .35s ease}@media screen and (prefers-reduced-motion:reduce){.collapsing{-webkit-transition:none;-o-transition:none;transition:none}}.dropup,.dropright,.dropdown,.dropleft{position:relative}.dropdown-toggle::after{display:inline-block;width:0;height:0;margin-left:.255em;vertical-align:.255em;content:"";border-top:.3em solid;border-right:.3em solid transparent;border-bottom:0;border-left:.3em solid transparent}.dropdown-toggle:empty::after{margin-left:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:10rem;padding:.5rem 0;margin:.125rem 0 0;font-size:1rem;color:#222;text-align:left;list-style:none;background-color:#fff;background-clip:padding-box;border:1px solid rgba(0,0,0,.15)}.dropdown-menu-right{right:0;left:auto}.dropup .dropdown-menu{top:auto;bottom:100%;margin-top:0;margin-bottom:.125rem}.dropup .dropdown-toggle::after{display:inline-block;width:0;height:0;margin-left:.255em;vertical-align:.255em;content:"";border-top:0;border-right:.3em solid transparent;border-bottom:.3em solid;border-left:.3em solid transparent}.dropup .dropdown-toggle:empty::after{margin-left:0}.dropright .dropdown-menu{top:0;right:auto;left:100%;margin-top:0;margin-left:.125rem}.dropright .dropdown-toggle::after{display:inline-block;width:0;height:0;margin-left:.255em;vertical-align:.255em;content:"";border-top:.3em solid transparent;border-right:0;border-bottom:.3em solid transparent;border-left:.3em solid}.dropright .dropdown-toggle:empty::after{margin-left:0}.dropright .dropdown-toggle::after{vertical-align:0}.dropleft .dropdown-menu{top:0;right:100%;left:auto;margin-top:0;margin-right:.125rem}.dropleft .dropdown-toggle::after{display:inline-block;width:0;height:0;margin-left:.255em;vertical-align:.255em;content:""}.dropleft .dropdown-toggle::after{display:none}.dropleft .dropdown-toggle::before{display:inline-block;width:0;height:0;margin-right:.255em;vertical-align:.255em;content:"";border-top:.3em solid transparent;border-right:.3em solid;border-bottom:.3em solid transparent}.dropleft .dropdown-toggle:empty::after{margin-left:0}.dropleft .dropdown-toggle::before{vertical-align:0}.dropdown-menu[x-placement^=top],.dropdown-menu[x-placement^=right],.dropdown-menu[x-placement^=bottom],.dropdown-menu[x-placement^=left]{right:auto;bottom:auto}.dropdown-divider{height:0;margin:.5rem 0;overflow:hidden;border-top:1px solid #eee}.dropdown-item{display:block;width:100%;padding:.25rem 1.5rem;clear:both;font-weight:400;color:#222;text-align:inherit;white-space:nowrap;background-color:transparent;border:0}.dropdown-item:hover,.dropdown-item:focus{color:#151515;text-decoration:none;background-color:#f8f9fa}.dropdown-item.active,.dropdown-item:active{color:#fff;text-decoration:none;background-color:#1ea149}.dropdown-item.disabled,.dropdown-item:disabled{color:#888;background-color:transparent}.dropdown-menu.show{display:block}.dropdown-header{display:block;padding:.5rem 1.5rem;margin-bottom:0;font-size:.875rem;color:#888;white-space:nowrap}.dropdown-item-text{display:block;padding:.25rem 1.5rem;color:#222}.btn-group,.btn-group-vertical{position:relative;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;vertical-align:middle}.btn-group>.btn,.btn-group-vertical>.btn{position:relative;-webkit-box-flex:0;-webkit-flex:0 1 auto;-ms-flex:0 1 auto;flex:0 1 auto}.btn-group>.btn:hover,.btn-group-vertical>.btn:hover{z-index:1}.btn-group>.btn:focus,.btn-group>.btn:active,.btn-group>.btn.active,.btn-group-vertical>.btn:focus,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn.active{z-index:1}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group,.btn-group-vertical .btn+.btn,.btn-group-vertical .btn+.btn-group,.btn-group-vertical .btn-group+.btn,.btn-group-vertical .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-pack:start;-webkit-justify-content:flex-start;-ms-flex-pack:start;justify-content:flex-start}.btn-toolbar .input-group{width:auto}.btn-group>.btn:first-child{margin-left:0}.dropdown-toggle-split{padding-right:.5625rem;padding-left:.5625rem}.dropdown-toggle-split::after,.dropup .dropdown-toggle-split::after,.dropright .dropdown-toggle-split::after{margin-left:0}.dropleft .dropdown-toggle-split::before{margin-right:0}.btn-sm+.dropdown-toggle-split,.btn-group-sm>.btn+.dropdown-toggle-split{padding-right:.375rem;padding-left:.375rem}.btn-lg+.dropdown-toggle-split,.btn-group-lg>.btn+.dropdown-toggle-split{padding-right:.75rem;padding-left:.75rem}.btn-group-vertical{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:start;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}.btn-group-vertical .btn,.btn-group-vertical .btn-group{width:100%}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-toggle>.btn,.btn-group-toggle>.btn-group>.btn{margin-bottom:0}.btn-group-toggle>.btn input[type=radio],.btn-group-toggle>.btn input[type=checkbox],.btn-group-toggle>.btn-group>.btn input[type=radio],.btn-group-toggle>.btn-group>.btn input[type=checkbox]{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.input-group{position:relative;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:stretch;-webkit-align-items:stretch;-ms-flex-align:stretch;align-items:stretch;width:100%}.input-group>.form-control,.input-group>.custom-select,.input-group>.custom-file{position:relative;-webkit-box-flex:1;-webkit-flex:1 1 auto;-ms-flex:1 1 auto;flex:1 1 auto;width:1%;margin-bottom:0}.input-group>.form-control+.form-control,.input-group>.form-control+.custom-select,.input-group>.form-control+.custom-file,.input-group>.custom-select+.form-control,.input-group>.custom-select+.custom-select,.input-group>.custom-select+.custom-file,.input-group>.custom-file+.form-control,.input-group>.custom-file+.custom-select,.input-group>.custom-file+.custom-file{margin-left:-1px}.input-group>.form-control:focus,.input-group>.custom-select:focus,.input-group>.custom-file .custom-file-input:focus~.custom-file-label{z-index:3}.input-group>.custom-file .custom-file-input:focus{z-index:4}.input-group>.custom-file{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center}.input-group-prepend,.input-group-append{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.input-group-prepend .btn,.input-group-append .btn{position:relative;z-index:2}.input-group-prepend .btn+.btn,.input-group-prepend .btn+.input-group-text,.input-group-prepend .input-group-text+.input-group-text,.input-group-prepend .input-group-text+.btn,.input-group-append .btn+.btn,.input-group-append .btn+.input-group-text,.input-group-append .input-group-text+.input-group-text,.input-group-append .input-group-text+.btn{margin-left:-1px}.input-group-prepend{margin-right:-1px}.input-group-append{margin-left:-1px}.input-group-text{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;padding:.375rem .75rem;margin-bottom:0;font-size:1rem;font-weight:400;line-height:1.5;color:#495057;text-align:center;white-space:nowrap;background-color:#eee;border:1px solid #ccc}.input-group-text input[type=radio],.input-group-text input[type=checkbox]{margin-top:0}.input-group-lg>.form-control,.input-group-lg>.input-group-prepend>.input-group-text,.input-group-lg>.input-group-append>.input-group-text,.input-group-lg>.input-group-prepend>.btn,.input-group-lg>.input-group-append>.btn{height:-webkit-calc(2.875rem + 2px);height:calc(2.875rem + 2px);padding:.5rem 1rem;font-size:1.25rem;line-height:1.5}.input-group-sm>.form-control,.input-group-sm>.input-group-prepend>.input-group-text,.input-group-sm>.input-group-append>.input-group-text,.input-group-sm>.input-group-prepend>.btn,.input-group-sm>.input-group-append>.btn{height:-webkit-calc(1.8125rem + 2px);height:calc(1.8125rem + 2px);padding:.25rem .5rem;font-size:.875rem;line-height:1.5}.custom-control{position:relative;display:block;min-height:1.5rem;padding-left:1.5rem}.custom-control-inline{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;margin-right:1rem}.custom-control-input{position:absolute;z-index:-1;opacity:0}.custom-control-input:checked~.custom-control-label::before{color:#fff;background-color:#1ea149}.custom-control-input:focus~.custom-control-label::before{-webkit-box-shadow:0 0 0 1px #fff,0 0 0 .2rem rgba(30,161,73,.25);box-shadow:0 0 0 1px #fff,0 0 0 .2rem rgba(30,161,73,.25)}.custom-control-input:active~.custom-control-label::before{color:#fff;background-color:#89e9a8}.custom-control-input:disabled~.custom-control-label{color:#888}.custom-control-input:disabled~.custom-control-label::before{background-color:#eee}.custom-control-label{position:relative;margin-bottom:0}.custom-control-label::before{position:absolute;top:.25rem;left:-1.5rem;display:block;width:1rem;height:1rem;pointer-events:none;content:"";-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-color:#dee2e6}.custom-control-label::after{position:absolute;top:.25rem;left:-1.5rem;display:block;width:1rem;height:1rem;content:"";background-repeat:no-repeat;background-position:50%;-webkit-background-size:50% 50%;background-size:50% 50%}.custom-checkbox .custom-control-input:checked~.custom-control-label::before{background-color:#1ea149}.custom-checkbox .custom-control-input:checked~.custom-control-label::after{background-image:url(data:image/svg+xml;charset=utf8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA4IDgiPjxwYXRoIGZpbGw9IiNmZmYiIGQ9Ik02LjU2NC43NWwtMy41OSAzLjYxMi0xLjUzOC0xLjU1TDAgNC4yNiAyLjk3NCA3LjI1IDggMi4xOTN6Ii8+PC9zdmc+)}.custom-checkbox .custom-control-input:indeterminate~.custom-control-label::before{background-color:#1ea149}.custom-checkbox .custom-control-input:indeterminate~.custom-control-label::after{background-image:url(data:image/svg+xml;charset=utf8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA0IDQiPjxwYXRoIHN0cm9rZT0iI2ZmZiIgZD0iTTAgMmg0Ii8+PC9zdmc+)}.custom-checkbox .custom-control-input:disabled:checked~.custom-control-label::before{background-color:rgba(30,161,73,.5)}.custom-checkbox .custom-control-input:disabled:indeterminate~.custom-control-label::before{background-color:rgba(30,161,73,.5)}.custom-radio .custom-control-label::before{border-radius:50%}.custom-radio .custom-control-input:checked~.custom-control-label::before{background-color:#1ea149}.custom-radio .custom-control-input:checked~.custom-control-label::after{background-image:url(data:image/svg+xml;charset=utf8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9Ii00IC00IDggOCI+PGNpcmNsZSByPSIzIiBmaWxsPSIjZmZmIi8+PC9zdmc+)}.custom-radio .custom-control-input:disabled:checked~.custom-control-label::before{background-color:rgba(30,161,73,.5)}.custom-select{display:inline-block;width:100%;height:-webkit-calc(2.25rem + 2px);height:calc(2.25rem + 2px);padding:.375rem 1.75rem .375rem .75rem;line-height:1.5;color:#495057;vertical-align:middle;background:#fff url(data:image/svg+xml;charset=utf8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA0IDUiPjxwYXRoIGZpbGw9IiMzMzMiIGQ9Ik0yIDAgMCAyaDR6bTAgNUwwIDNoNHoiLz48L3N2Zz4=)no-repeat right .75rem center;-webkit-background-size:8px 10px;background-size:8px 10px;border:1px solid #ccc;border-radius:0;-webkit-appearance:none;-moz-appearance:none;appearance:none}.custom-select:focus{border-color:#5ee189;outline:0;-webkit-box-shadow:0 0 0 .2rem rgba(94,225,137,.5);box-shadow:0 0 0 .2rem rgba(94,225,137,.5)}.custom-select:focus::-ms-value{color:#495057;background-color:#fff}.custom-select[multiple],.custom-select[size]:not([size="1"]){height:auto;padding-right:.75rem;background-image:none}.custom-select:disabled{color:#888;background-color:#eee}.custom-select::-ms-expand{opacity:0}.custom-select-sm{height:-webkit-calc(1.8125rem + 2px);height:calc(1.8125rem + 2px);padding-top:.375rem;padding-bottom:.375rem;font-size:75%}.custom-select-lg{height:-webkit-calc(2.875rem + 2px);height:calc(2.875rem + 2px);padding-top:.375rem;padding-bottom:.375rem;font-size:125%}.custom-file{position:relative;display:inline-block;width:100%;height:-webkit-calc(2.25rem + 2px);height:calc(2.25rem + 2px);margin-bottom:0}.custom-file-input{position:relative;z-index:2;width:100%;height:-webkit-calc(2.25rem + 2px);height:calc(2.25rem + 2px);margin:0;opacity:0}.custom-file-input:focus~.custom-file-label{border-color:#5ee189;-webkit-box-shadow:0 0 0 .2rem rgba(30,161,73,.25);box-shadow:0 0 0 .2rem rgba(30,161,73,.25)}.custom-file-input:focus~.custom-file-label::after{border-color:#5ee189}.custom-file-input:disabled~.custom-file-label{background-color:#eee}.custom-file-input:lang(en)~.custom-file-label::after{content:"Browse"}.custom-file-label{position:absolute;top:0;right:0;left:0;z-index:1;height:-webkit-calc(2.25rem + 2px);height:calc(2.25rem + 2px);padding:.375rem .75rem;line-height:1.5;color:#495057;background-color:#fff;border:1px solid #ccc}.custom-file-label::after{position:absolute;top:0;right:0;bottom:0;z-index:3;display:block;height:2.25rem;padding:.375rem .75rem;line-height:1.5;color:#495057;content:"Browse";background-color:#eee;border-left:1px solid #ccc}.custom-range{width:100%;padding-left:0;background-color:transparent;-webkit-appearance:none;-moz-appearance:none;appearance:none}.custom-range:focus{outline:none}.custom-range:focus::-webkit-slider-thumb{-webkit-box-shadow:0 0 0 1px #fff,0 0 0 .2rem rgba(30,161,73,.25);box-shadow:0 0 0 1px #fff,0 0 0 .2rem rgba(30,161,73,.25)}.custom-range:focus::-moz-range-thumb{box-shadow:0 0 0 1px #fff,0 0 0 .2rem rgba(30,161,73,.25)}.custom-range:focus::-ms-thumb{box-shadow:0 0 0 1px #fff,0 0 0 .2rem rgba(30,161,73,.25)}.custom-range::-moz-focus-outer{border:0}.custom-range::-webkit-slider-thumb{width:1rem;height:1rem;margin-top:-.25rem;background-color:#1ea149;border:0;-webkit-transition:background-color .15s ease-in-out,border-color .15s ease-in-out,-webkit-box-shadow .15s ease-in-out;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,-webkit-box-shadow .15s ease-in-out;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out,-webkit-box-shadow .15s ease-in-out;-webkit-appearance:none;appearance:none}@media screen and (prefers-reduced-motion:reduce){.custom-range::-webkit-slider-thumb{-webkit-transition:none;transition:none}}.custom-range::-webkit-slider-thumb:active{background-color:#89e9a8}.custom-range::-webkit-slider-runnable-track{width:100%;height:.5rem;color:transparent;cursor:pointer;background-color:#dee2e6;border-color:transparent}.custom-range::-moz-range-thumb{width:1rem;height:1rem;background-color:#1ea149;border:0;-moz-transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;-moz-appearance:none;appearance:none}@media screen and (prefers-reduced-motion:reduce){.custom-range::-moz-range-thumb{-moz-transition:none;transition:none}}.custom-range::-moz-range-thumb:active{background-color:#89e9a8}.custom-range::-moz-range-track{width:100%;height:.5rem;color:transparent;cursor:pointer;background-color:#dee2e6;border-color:transparent}.custom-range::-ms-thumb{width:1rem;height:1rem;margin-top:0;margin-right:.2rem;margin-left:.2rem;background-color:#1ea149;border:0;-ms-transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;appearance:none}@media screen and (prefers-reduced-motion:reduce){.custom-range::-ms-thumb{-ms-transition:none;transition:none}}.custom-range::-ms-thumb:active{background-color:#89e9a8}.custom-range::-ms-track{width:100%;height:.5rem;color:transparent;cursor:pointer;background-color:transparent;border-color:transparent;border-width:.5rem}.custom-range::-ms-fill-lower{background-color:#dee2e6}.custom-range::-ms-fill-upper{margin-right:15px;background-color:#dee2e6}.custom-control-label::before,.custom-file-label,.custom-select{-webkit-transition:background-color .15s ease-in-out,border-color .15s ease-in-out,-webkit-box-shadow .15s ease-in-out;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,-webkit-box-shadow .15s ease-in-out;-o-transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out,-webkit-box-shadow .15s ease-in-out}@media screen and (prefers-reduced-motion:reduce){.custom-control-label::before,.custom-file-label,.custom-select{-webkit-transition:none;-o-transition:none;transition:none}}.nav{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;padding-left:0;margin-bottom:0;list-style:none}.nav-link{display:block;padding:.5rem 1rem}.nav-link:hover,.nav-link:focus{text-decoration:none}.nav-link.disabled{color:#888}.nav-tabs{border-bottom:1px solid #dee2e6}.nav-tabs .nav-item{margin-bottom:-1px}.nav-tabs .nav-link{border:1px solid transparent}.nav-tabs .nav-link:hover,.nav-tabs .nav-link:focus{border-color:#eee #eee #dee2e6}.nav-tabs .nav-link.disabled{color:#888;background-color:transparent;border-color:transparent}.nav-tabs .nav-link.active,.nav-tabs .nav-item.show .nav-link{color:#495057;background-color:#fff;border-color:#dee2e6 #dee2e6 #fff}.nav-tabs .dropdown-menu{margin-top:-1px}.nav-pills .nav-link.active,.nav-pills .show>.nav-link{color:#fff;background-color:#1ea149}.nav-fill .nav-item{-webkit-box-flex:1;-webkit-flex:1 1 auto;-ms-flex:1 1 auto;flex:1 1 auto;text-align:center}.nav-justified .nav-item{-webkit-flex-basis:0;-ms-flex-preferred-size:0;flex-basis:0;-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;text-align:center}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.navbar{position:relative;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;padding:.5rem 1rem}.navbar>.container,.navbar>.container-fluid{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between}.navbar-brand{display:inline-block;padding-top:.3125rem;padding-bottom:.3125rem;margin-right:1rem;font-size:1.25rem;line-height:inherit;white-space:nowrap}.navbar-brand:hover,.navbar-brand:focus{text-decoration:none}.navbar-nav{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;padding-left:0;margin-bottom:0;list-style:none}.navbar-nav .nav-link{padding-right:0;padding-left:0}.navbar-nav .dropdown-menu{position:static;float:none}.navbar-text{display:inline-block;padding-top:.5rem;padding-bottom:.5rem}.navbar-collapse{-webkit-flex-basis:100%;-ms-flex-preferred-size:100%;flex-basis:100%;-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center}.navbar-toggler{padding:.25rem .75rem;font-size:1.25rem;line-height:1;background-color:transparent;border:1px solid transparent}.navbar-toggler:hover,.navbar-toggler:focus{text-decoration:none}.navbar-toggler:not(:disabled):not(.disabled){cursor:pointer}.navbar-toggler-icon{display:inline-block;width:1.5em;height:1.5em;vertical-align:middle;content:"";background:no-repeat 50%;-webkit-background-size:100% 100%;background-size:100% 100%}@media(max-width:575.98px){.navbar-expand-sm>.container,.navbar-expand-sm>.container-fluid{padding-right:0;padding-left:0}}@media(min-width:576px){.navbar-expand-sm{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-flow:row nowrap;-ms-flex-flow:row nowrap;flex-flow:row nowrap;-webkit-box-pack:start;-webkit-justify-content:flex-start;-ms-flex-pack:start;justify-content:flex-start}.navbar-expand-sm .navbar-nav{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row}.navbar-expand-sm .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-sm .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand-sm>.container,.navbar-expand-sm>.container-fluid{-webkit-flex-wrap:nowrap;-ms-flex-wrap:nowrap;flex-wrap:nowrap}.navbar-expand-sm .navbar-collapse{display:-webkit-box!important;display:-webkit-flex!important;display:-ms-flexbox!important;display:flex!important;-webkit-flex-basis:auto;-ms-flex-preferred-size:auto;flex-basis:auto}.navbar-expand-sm .navbar-toggler{display:none}}@media(max-width:767.98px){.navbar-expand-md>.container,.navbar-expand-md>.container-fluid{padding-right:0;padding-left:0}}@media(min-width:768px){.navbar-expand-md{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-flow:row nowrap;-ms-flex-flow:row nowrap;flex-flow:row nowrap;-webkit-box-pack:start;-webkit-justify-content:flex-start;-ms-flex-pack:start;justify-content:flex-start}.navbar-expand-md .navbar-nav{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row}.navbar-expand-md .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-md .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand-md>.container,.navbar-expand-md>.container-fluid{-webkit-flex-wrap:nowrap;-ms-flex-wrap:nowrap;flex-wrap:nowrap}.navbar-expand-md .navbar-collapse{display:-webkit-box!important;display:-webkit-flex!important;display:-ms-flexbox!important;display:flex!important;-webkit-flex-basis:auto;-ms-flex-preferred-size:auto;flex-basis:auto}.navbar-expand-md .navbar-toggler{display:none}}@media(max-width:991.98px){.navbar-expand-lg>.container,.navbar-expand-lg>.container-fluid{padding-right:0;padding-left:0}}@media(min-width:992px){.navbar-expand-lg{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-flow:row nowrap;-ms-flex-flow:row nowrap;flex-flow:row nowrap;-webkit-box-pack:start;-webkit-justify-content:flex-start;-ms-flex-pack:start;justify-content:flex-start}.navbar-expand-lg .navbar-nav{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row}.navbar-expand-lg .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-lg .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand-lg>.container,.navbar-expand-lg>.container-fluid{-webkit-flex-wrap:nowrap;-ms-flex-wrap:nowrap;flex-wrap:nowrap}.navbar-expand-lg .navbar-collapse{display:-webkit-box!important;display:-webkit-flex!important;display:-ms-flexbox!important;display:flex!important;-webkit-flex-basis:auto;-ms-flex-preferred-size:auto;flex-basis:auto}.navbar-expand-lg .navbar-toggler{display:none}}@media(max-width:1199.98px){.navbar-expand-xl>.container,.navbar-expand-xl>.container-fluid{padding-right:0;padding-left:0}}@media(min-width:1200px){.navbar-expand-xl{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-flow:row nowrap;-ms-flex-flow:row nowrap;flex-flow:row nowrap;-webkit-box-pack:start;-webkit-justify-content:flex-start;-ms-flex-pack:start;justify-content:flex-start}.navbar-expand-xl .navbar-nav{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row}.navbar-expand-xl .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-xl .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand-xl>.container,.navbar-expand-xl>.container-fluid{-webkit-flex-wrap:nowrap;-ms-flex-wrap:nowrap;flex-wrap:nowrap}.navbar-expand-xl .navbar-collapse{display:-webkit-box!important;display:-webkit-flex!important;display:-ms-flexbox!important;display:flex!important;-webkit-flex-basis:auto;-ms-flex-preferred-size:auto;flex-basis:auto}.navbar-expand-xl .navbar-toggler{display:none}}.navbar-expand{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-flow:row nowrap;-ms-flex-flow:row nowrap;flex-flow:row nowrap;-webkit-box-pack:start;-webkit-justify-content:flex-start;-ms-flex-pack:start;justify-content:flex-start}.navbar-expand>.container,.navbar-expand>.container-fluid{padding-right:0;padding-left:0}.navbar-expand .navbar-nav{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row}.navbar-expand .navbar-nav .dropdown-menu{position:absolute}.navbar-expand .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand>.container,.navbar-expand>.container-fluid{-webkit-flex-wrap:nowrap;-ms-flex-wrap:nowrap;flex-wrap:nowrap}.navbar-expand .navbar-collapse{display:-webkit-box!important;display:-webkit-flex!important;display:-ms-flexbox!important;display:flex!important;-webkit-flex-basis:auto;-ms-flex-preferred-size:auto;flex-basis:auto}.navbar-expand .navbar-toggler{display:none}.navbar-light .navbar-brand{color:rgba(0,0,0,.9)}.navbar-light .navbar-brand:hover,.navbar-light .navbar-brand:focus{color:rgba(0,0,0,.9)}.navbar-light .navbar-nav .nav-link{color:rgba(0,0,0,.5)}.navbar-light .navbar-nav .nav-link:hover,.navbar-light .navbar-nav .nav-link:focus{color:rgba(0,0,0,.7)}.navbar-light .navbar-nav .nav-link.disabled{color:rgba(0,0,0,.3)}.navbar-light .navbar-nav .show>.nav-link,.navbar-light .navbar-nav .active>.nav-link,.navbar-light .navbar-nav .nav-link.show,.navbar-light .navbar-nav .nav-link.active{color:rgba(0,0,0,.9)}.navbar-light .navbar-toggler{color:rgba(0,0,0,.5);border-color:rgba(0,0,0,.1)}.navbar-light .navbar-toggler-icon{background-image:url(data:image/svg+xml;charset=utf8;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMzAgMzAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggc3Ryb2tlPSJyZ2JhKDAsIDAsIDAsIDAuNSkiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiIGQ9Ik00IDdoMjJNNCAxNWgyMk00IDIzaDIyIi8+PC9zdmc+)}.navbar-light .navbar-text{color:rgba(0,0,0,.5)}.navbar-light .navbar-text a{color:rgba(0,0,0,.9)}.navbar-light .navbar-text a:hover,.navbar-light .navbar-text a:focus{color:rgba(0,0,0,.9)}.navbar-dark .navbar-brand{color:#fff}.navbar-dark .navbar-brand:hover,.navbar-dark .navbar-brand:focus{color:#fff}.navbar-dark .navbar-nav .nav-link{color:#fff}.navbar-dark .navbar-nav .nav-link:hover,.navbar-dark .navbar-nav .nav-link:focus{color:rgba(255,255,255,.5)}.navbar-dark .navbar-nav .nav-link.disabled{color:rgba(255,255,255,.25)}.navbar-dark .navbar-nav .show>.nav-link,.navbar-dark .navbar-nav .active>.nav-link,.navbar-dark .navbar-nav .nav-link.show,.navbar-dark .navbar-nav .nav-link.active{color:#fff}.navbar-dark .navbar-toggler{color:#fff;border-color:rgba(255,255,255,.1)}.navbar-dark .navbar-toggler-icon{background-image:url(data:image/svg+xml;charset=utf8;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMzAgMzAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggc3Ryb2tlPSIjZmZmIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLW1pdGVybGltaXQ9IjEwIiBkPSJNNCA3aDIyTTQgMTVoMjJNNCAyM2gyMiIvPjwvc3ZnPg==)}.navbar-dark .navbar-text{color:#fff}.navbar-dark .navbar-text a{color:#fff}.navbar-dark .navbar-text a:hover,.navbar-dark .navbar-text a:focus{color:#fff}.card,.td-content .highlight{position:relative;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;min-width:0;word-wrap:break-word;background-color:#fff;background-clip:border-box;border:1px solid rgba(0,0,0,.125)}.card>hr,.td-content .highlight>hr{margin-right:0;margin-left:0}.card-body{-webkit-box-flex:1;-webkit-flex:1 1 auto;-ms-flex:1 1 auto;flex:1 1 auto;padding:1.25rem}.card-title{margin-bottom:.75rem}.card-subtitle{margin-top:-.375rem;margin-bottom:0}.card-text:last-child{margin-bottom:0}.card-link:hover{text-decoration:none}.card-link+.card-link{margin-left:1.25rem}.card-header{padding:.75rem 1.25rem;margin-bottom:0;background-color:rgba(0,0,0,.03);border-bottom:1px solid rgba(0,0,0,.125)}.card-header+.list-group .list-group-item:first-child{border-top:0}.card-footer{padding:.75rem 1.25rem;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.125)}.card-header-tabs{margin-right:-.625rem;margin-bottom:-.75rem;margin-left:-.625rem;border-bottom:0}.card-header-pills{margin-right:-.625rem;margin-left:-.625rem}.card-img-overlay{position:absolute;top:0;right:0;bottom:0;left:0;padding:1.25rem}.card-img{width:100%}.card-img-top{width:100%}.card-img-bottom{width:100%}.card-deck{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column}.card-deck .card,.card-deck .td-content .highlight,.td-content .card-deck .highlight{margin-bottom:15px}@media(min-width:576px){.card-deck{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-flow:row wrap;-ms-flex-flow:row wrap;flex-flow:row wrap;margin-right:-15px;margin-left:-15px}.card-deck .card,.card-deck .td-content .highlight,.td-content .card-deck .highlight{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-webkit-flex:1 0 0%;-ms-flex:1 0 0%;flex:1 0 0%;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;margin-right:15px;margin-bottom:0;margin-left:15px}}.card-group{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column}.card-group>.card,.td-content .card-group>.highlight{margin-bottom:15px}@media(min-width:576px){.card-group{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-flow:row wrap;-ms-flex-flow:row wrap;flex-flow:row wrap}.card-group>.card,.td-content .card-group>.highlight{-webkit-box-flex:1;-webkit-flex:1 0 0%;-ms-flex:1 0 0%;flex:1 0 0%;margin-bottom:0}.card-group>.card+.card,.td-content .card-group>.highlight+.card,.td-content .card-group>.card+.highlight,.td-content .card-group>.highlight+.highlight{margin-left:0;border-left:0}}.card-columns .card,.card-columns .td-content .highlight,.td-content .card-columns .highlight{margin-bottom:.75rem}@media(min-width:576px){.card-columns{-webkit-column-count:3;-moz-column-count:3;column-count:3;-webkit-column-gap:1.25rem;-moz-column-gap:1.25rem;column-gap:1.25rem;orphans:1;widows:1}.card-columns .card,.card-columns .td-content .highlight,.td-content .card-columns .highlight{display:inline-block;width:100%}}.accordion .card:not(:first-of-type):not(:last-of-type),.accordion .td-content .highlight:not(:first-of-type):not(:last-of-type),.td-content .accordion .highlight:not(:first-of-type):not(:last-of-type){border-bottom:0;border-radius:0}.accordion .card:not(:first-of-type) .card-header:first-child,.accordion .td-content .highlight:not(:first-of-type) .card-header:first-child,.td-content .accordion .highlight:not(:first-of-type) .card-header:first-child{border-radius:0}.accordion .card:first-of-type,.accordion .td-content .highlight:first-of-type,.td-content .accordion .highlight:first-of-type{border-bottom:0;border-bottom-right-radius:0;border-bottom-left-radius:0}.accordion .card:last-of-type,.accordion .td-content .highlight:last-of-type,.td-content .accordion .highlight:last-of-type{border-top-left-radius:0;border-top-right-radius:0}.breadcrumb{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;padding:.75rem 1rem;margin-bottom:1rem;list-style:none;background-color:#eee}.breadcrumb-item+.breadcrumb-item{padding-left:.5rem}.breadcrumb-item+.breadcrumb-item::before{display:inline-block;padding-right:.5rem;color:#888;content:"/"}.breadcrumb-item+.breadcrumb-item:hover::before{text-decoration:underline}.breadcrumb-item+.breadcrumb-item:hover::before{text-decoration:none}.breadcrumb-item.active{color:#888}.pagination{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;padding-left:0;list-style:none}.page-link{position:relative;display:block;padding:.5rem .75rem;margin-left:-1px;line-height:1.25;color:#888;background-color:#fff;border:1px solid rgba(0,0,0,.1)}.page-link:hover{z-index:2;color:#fec555;text-decoration:none;background-color:#eee;border-color:#dee2e6}.page-link:focus{z-index:2;outline:0;-webkit-box-shadow:0 0 0 .2rem rgba(30,161,73,.25);box-shadow:0 0 0 .2rem rgba(30,161,73,.25)}.page-link:not(:disabled):not(.disabled){cursor:pointer}.page-item:first-child .page-link{margin-left:0}.page-item.active .page-link{z-index:1;color:#fff;background-color:#1ea149;border-color:#1a8c3f}.page-item.disabled .page-link{color:#dee2e6;pointer-events:none;cursor:auto;background-color:#fff;border-color:#dee2e6}.pagination-lg .page-link{padding:.75rem 1.5rem;font-size:1.25rem;line-height:1.5}.pagination-sm .page-link{padding:.25rem .5rem;font-size:.875rem;line-height:1.5}.badge{display:inline-block;padding:.25em .4em;font-size:75%;font-weight:700;line-height:1;text-align:center;white-space:nowrap;vertical-align:baseline}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.badge-pill{padding-right:.6em;padding-left:.6em}.badge-primary{color:#fff;background-color:#1ea149}.badge-primary[href]:hover,.badge-primary[href]:focus{color:#fff;text-decoration:none;background-color:#167636}.badge-secondary{color:#fff;background-color:#ffa630}.badge-secondary[href]:hover,.badge-secondary[href]:focus{color:#fff;text-decoration:none;background-color:#fc9000}.badge-success{color:#fff;background-color:#3772ff}.badge-success[href]:hover,.badge-success[href]:focus{color:#fff;text-decoration:none;background-color:#044eff}.badge-info{color:#222;background-color:#c0e0de}.badge-info[href]:hover,.badge-info[href]:focus{color:#222;text-decoration:none;background-color:#9ecfcc}.badge-warning{color:#fff;background-color:#ed6a5a}.badge-warning[href]:hover,.badge-warning[href]:focus{color:#fff;text-decoration:none;background-color:#e8402c}.badge-danger{color:#fff;background-color:#ed6a5a}.badge-danger[href]:hover,.badge-danger[href]:focus{color:#fff;text-decoration:none;background-color:#e8402c}.badge-light{color:#222;background-color:#d3f3ee}.badge-light[href]:hover,.badge-light[href]:focus{color:#222;text-decoration:none;background-color:#abe8df}.badge-dark{color:#fff;background-color:#403f4c}.badge-dark[href]:hover,.badge-dark[href]:focus{color:#fff;text-decoration:none;background-color:#292830}.jumbotron{padding:2rem 1rem;margin-bottom:2rem;background-color:#eee}@media(min-width:576px){.jumbotron{padding:4rem 2rem}}.jumbotron-fluid{padding-right:0;padding-left:0}.alert{position:relative;padding:.75rem 1.25rem;margin-bottom:1rem;border:1px solid transparent}.alert-heading{color:inherit}.alert-link{font-weight:700}.alert-dismissible{padding-right:4rem}.alert-dismissible .close{position:absolute;top:0;right:0;padding:.75rem 1.25rem;color:inherit}.alert-primary{color:#105426;background-color:#d2ecdb;border-color:#c0e5cc}.alert-primary hr{border-top-color:#aedebd}.alert-primary .alert-link{color:#082913}.alert-secondary{color:#855619;background-color:#ffedd6;border-color:#ffe6c5}.alert-secondary hr{border-top-color:#ffdbac}.alert-secondary .alert-link{color:#5a3a11}.alert-success{color:#1d3b85;background-color:#d7e3ff;border-color:#c7d8ff}.alert-success hr{border-top-color:#aec6ff}.alert-success .alert-link{color:#14285b}.alert-info{color:#647473;background-color:#f2f9f8;border-color:#edf6f6}.alert-info hr{border-top-color:#dceeee}.alert-info .alert-link{color:#4c5958}.alert-warning{color:#7b372f;background-color:#fbe1de;border-color:#fad5d1}.alert-warning hr{border-top-color:#f8c0ba}.alert-warning .alert-link{color:#562721}.alert-danger{color:#7b372f;background-color:#fbe1de;border-color:#fad5d1}.alert-danger hr{border-top-color:#f8c0ba}.alert-danger .alert-link{color:#562721}.alert-light{color:#6e7e7c;background-color:#f6fdfc;border-color:#f3fcfa}.alert-light hr{border-top-color:#dff7f2}.alert-light .alert-link{color:#566361}.alert-dark{color:#212128;background-color:#d9d9db;border-color:#cac9cd}.alert-dark hr{border-top-color:#bdbcc1}.alert-dark .alert-link{color:#0a0a0c}@-webkit-keyframes progress-bar-stripes{from{background-position:1rem 0}to{background-position:0 0}}@-o-keyframes progress-bar-stripes{from{background-position:1rem 0}to{background-position:0 0}}@keyframes progress-bar-stripes{from{background-position:1rem 0}to{background-position:0 0}}.progress{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;height:1rem;overflow:hidden;font-size:.75rem;background-color:#eee}.progress-bar{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;color:#fff;text-align:center;white-space:nowrap;background-color:#1ea149;-webkit-transition:width .6s ease;-o-transition:width .6s ease;transition:width .6s ease}@media screen and (prefers-reduced-motion:reduce){.progress-bar{-webkit-transition:none;-o-transition:none;transition:none}}.progress-bar-striped{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);-webkit-background-size:1rem 1rem;background-size:1rem 1rem}.progress-bar-animated{-webkit-animation:progress-bar-stripes 1s linear infinite;-o-animation:progress-bar-stripes 1s linear infinite;animation:progress-bar-stripes 1s linear infinite}.media{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:start;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start}.media-body{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}.list-group{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;padding-left:0;margin-bottom:0}.list-group-item-action{width:100%;color:#495057;text-align:inherit}.list-group-item-action:hover,.list-group-item-action:focus{color:#495057;text-decoration:none;background-color:#f8f9fa}.list-group-item-action:active{color:#222;background-color:#eee}.list-group-item{position:relative;display:block;padding:.75rem 1.25rem;margin-bottom:-1px;background-color:#fff;border:1px solid rgba(0,0,0,.125)}.list-group-item:last-child{margin-bottom:0}.list-group-item:hover,.list-group-item:focus{z-index:1;text-decoration:none}.list-group-item.disabled,.list-group-item:disabled{color:#888;background-color:#fff}.list-group-item.active{z-index:2;color:#fff;background-color:#1ea149;border-color:#1ea149}.list-group-flush .list-group-item{border-right:0;border-left:0}.list-group-flush:first-child .list-group-item:first-child{border-top:0}.list-group-flush:last-child .list-group-item:last-child{border-bottom:0}.list-group-item-primary{color:#105426;background-color:#c0e5cc}.list-group-item-primary.list-group-item-action:hover,.list-group-item-primary.list-group-item-action:focus{color:#105426;background-color:#aedebd}.list-group-item-primary.list-group-item-action.active{color:#fff;background-color:#105426;border-color:#105426}.list-group-item-secondary{color:#855619;background-color:#ffe6c5}.list-group-item-secondary.list-group-item-action:hover,.list-group-item-secondary.list-group-item-action:focus{color:#855619;background-color:#ffdbac}.list-group-item-secondary.list-group-item-action.active{color:#fff;background-color:#855619;border-color:#855619}.list-group-item-success{color:#1d3b85;background-color:#c7d8ff}.list-group-item-success.list-group-item-action:hover,.list-group-item-success.list-group-item-action:focus{color:#1d3b85;background-color:#aec6ff}.list-group-item-success.list-group-item-action.active{color:#fff;background-color:#1d3b85;border-color:#1d3b85}.list-group-item-info{color:#647473;background-color:#edf6f6}.list-group-item-info.list-group-item-action:hover,.list-group-item-info.list-group-item-action:focus{color:#647473;background-color:#dceeee}.list-group-item-info.list-group-item-action.active{color:#fff;background-color:#647473;border-color:#647473}.list-group-item-warning{color:#7b372f;background-color:#fad5d1}.list-group-item-warning.list-group-item-action:hover,.list-group-item-warning.list-group-item-action:focus{color:#7b372f;background-color:#f8c0ba}.list-group-item-warning.list-group-item-action.active{color:#fff;background-color:#7b372f;border-color:#7b372f}.list-group-item-danger{color:#7b372f;background-color:#fad5d1}.list-group-item-danger.list-group-item-action:hover,.list-group-item-danger.list-group-item-action:focus{color:#7b372f;background-color:#f8c0ba}.list-group-item-danger.list-group-item-action.active{color:#fff;background-color:#7b372f;border-color:#7b372f}.list-group-item-light{color:#6e7e7c;background-color:#f3fcfa}.list-group-item-light.list-group-item-action:hover,.list-group-item-light.list-group-item-action:focus{color:#6e7e7c;background-color:#dff7f2}.list-group-item-light.list-group-item-action.active{color:#fff;background-color:#6e7e7c;border-color:#6e7e7c}.list-group-item-dark{color:#212128;background-color:#cac9cd}.list-group-item-dark.list-group-item-action:hover,.list-group-item-dark.list-group-item-action:focus{color:#212128;background-color:#bdbcc1}.list-group-item-dark.list-group-item-action.active{color:#fff;background-color:#212128;border-color:#212128}.close{float:right;font-size:1.5rem;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;opacity:.5}.close:not(:disabled):not(.disabled){cursor:pointer}.close:not(:disabled):not(.disabled):hover,.close:not(:disabled):not(.disabled):focus{color:#000;text-decoration:none;opacity:.75}button.close{padding:0;background-color:transparent;border:0;-webkit-appearance:none}.modal-open{overflow:hidden}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;display:none;overflow:hidden;outline:0}.modal-dialog{position:relative;width:auto;margin:.5rem;pointer-events:none}.modal.fade .modal-dialog{-webkit-transition:-webkit-transform .3s ease-out;transition:-webkit-transform .3s ease-out;-o-transition:-o-transform .3s ease-out;transition:transform .3s ease-out;transition:transform .3s ease-out,-webkit-transform .3s ease-out,-o-transform .3s ease-out;-webkit-transform:translate(0,-25%);-ms-transform:translate(0,-25%);-o-transform:translate(0,-25%);transform:translate(0,-25%)}@media screen and (prefers-reduced-motion:reduce){.modal.fade .modal-dialog{-webkit-transition:none;-o-transition:none;transition:none}}.modal.show .modal-dialog{-webkit-transform:translate(0,0);-ms-transform:translate(0,0);-o-transform:translate(0,0);transform:translate(0,0)}.modal-dialog-centered{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;min-height:-webkit-calc(100% - (0.5rem * 2));min-height:calc(100% - (0.5rem * 2))}.modal-dialog-centered::before{display:block;height:-webkit-calc(100vh - (0.5rem * 2));height:calc(100vh - (0.5rem * 2));content:""}.modal-content{position:relative;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;width:100%;pointer-events:auto;background-color:#fff;background-clip:padding-box;border:1px solid rgba(0,0,0,.2);outline:0}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{opacity:0}.modal-backdrop.show{opacity:.5}.modal-header{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:start;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;padding:1rem;border-bottom:1px solid #eee}.modal-header .close{padding:1rem;margin:-1rem -1rem -1rem auto}.modal-title{margin-bottom:0;line-height:1.5}.modal-body{position:relative;-webkit-box-flex:1;-webkit-flex:1 1 auto;-ms-flex:1 1 auto;flex:1 1 auto;padding:1rem}.modal-footer{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:end;-webkit-justify-content:flex-end;-ms-flex-pack:end;justify-content:flex-end;padding:1rem;border-top:1px solid #eee}.modal-footer>:not(:first-child){margin-left:.25rem}.modal-footer>:not(:last-child){margin-right:.25rem}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media(min-width:576px){.modal-dialog{max-width:500px;margin:1.75rem auto}.modal-dialog-centered{min-height:-webkit-calc(100% - (1.75rem * 2));min-height:calc(100% - (1.75rem * 2))}.modal-dialog-centered::before{height:-webkit-calc(100vh - (1.75rem * 2));height:calc(100vh - (1.75rem * 2))}.modal-sm{max-width:300px}}@media(min-width:992px){.modal-lg{max-width:800px}}.tooltip{position:absolute;z-index:1070;display:block;margin:0;font-family:open sans,-apple-system,BlinkMacSystemFont,segoe ui,Roboto,helvetica neue,Arial,sans-serif,apple color emoji,segoe ui emoji,segoe ui symbol;font-style:normal;font-weight:400;line-height:1.5;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;white-space:normal;line-break:auto;font-size:.875rem;word-wrap:break-word;opacity:0}.tooltip.show{opacity:.9}.tooltip .arrow{position:absolute;display:block;width:.8rem;height:.4rem}.tooltip .arrow::before{position:absolute;content:"";border-color:transparent;border-style:solid}.bs-tooltip-top,.bs-tooltip-auto[x-placement^=top]{padding:.4rem 0}.bs-tooltip-top .arrow,.bs-tooltip-auto[x-placement^=top] .arrow{bottom:0}.bs-tooltip-top .arrow::before,.bs-tooltip-auto[x-placement^=top] .arrow::before{top:0;border-width:.4rem .4rem 0;border-top-color:#000}.bs-tooltip-right,.bs-tooltip-auto[x-placement^=right]{padding:0 .4rem}.bs-tooltip-right .arrow,.bs-tooltip-auto[x-placement^=right] .arrow{left:0;width:.4rem;height:.8rem}.bs-tooltip-right .arrow::before,.bs-tooltip-auto[x-placement^=right] .arrow::before{right:0;border-width:.4rem .4rem .4rem 0;border-right-color:#000}.bs-tooltip-bottom,.bs-tooltip-auto[x-placement^=bottom]{padding:.4rem 0}.bs-tooltip-bottom .arrow,.bs-tooltip-auto[x-placement^=bottom] .arrow{top:0}.bs-tooltip-bottom .arrow::before,.bs-tooltip-auto[x-placement^=bottom] .arrow::before{bottom:0;border-width:0 .4rem .4rem;border-bottom-color:#000}.bs-tooltip-left,.bs-tooltip-auto[x-placement^=left]{padding:0 .4rem}.bs-tooltip-left .arrow,.bs-tooltip-auto[x-placement^=left] .arrow{right:0;width:.4rem;height:.8rem}.bs-tooltip-left .arrow::before,.bs-tooltip-auto[x-placement^=left] .arrow::before{left:0;border-width:.4rem 0 .4rem .4rem;border-left-color:#000}.tooltip-inner{max-width:200px;padding:.25rem .5rem;color:#fff;text-align:center;background-color:#000}.popover{position:absolute;top:0;left:0;z-index:1060;display:block;max-width:276px;font-family:open sans,-apple-system,BlinkMacSystemFont,segoe ui,Roboto,helvetica neue,Arial,sans-serif,apple color emoji,segoe ui emoji,segoe ui symbol;font-style:normal;font-weight:400;line-height:1.5;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;white-space:normal;line-break:auto;font-size:.875rem;word-wrap:break-word;background-color:#fff;background-clip:padding-box;border:1px solid rgba(0,0,0,.2)}.popover .arrow{position:absolute;display:block;width:1rem;height:.5rem;margin:0 .3rem}.popover .arrow::before,.popover .arrow::after{position:absolute;display:block;content:"";border-color:transparent;border-style:solid}.bs-popover-top,.bs-popover-auto[x-placement^=top]{margin-bottom:.5rem}.bs-popover-top .arrow,.bs-popover-auto[x-placement^=top] .arrow{bottom:-webkit-calc((0.5rem + 1px) * -1);bottom:calc((0.5rem + 1px) * -1)}.bs-popover-top .arrow::before,.bs-popover-auto[x-placement^=top] .arrow::before,.bs-popover-top .arrow::after,.bs-popover-auto[x-placement^=top] .arrow::after{border-width:.5rem .5rem 0}.bs-popover-top .arrow::before,.bs-popover-auto[x-placement^=top] .arrow::before{bottom:0;border-top-color:rgba(0,0,0,.25)}.bs-popover-top .arrow::after,.bs-popover-auto[x-placement^=top] .arrow::after{bottom:1px;border-top-color:#fff}.bs-popover-right,.bs-popover-auto[x-placement^=right]{margin-left:.5rem}.bs-popover-right .arrow,.bs-popover-auto[x-placement^=right] .arrow{left:-webkit-calc((0.5rem + 1px) * -1);left:calc((0.5rem + 1px) * -1);width:.5rem;height:1rem;margin:.3rem 0}.bs-popover-right .arrow::before,.bs-popover-auto[x-placement^=right] .arrow::before,.bs-popover-right .arrow::after,.bs-popover-auto[x-placement^=right] .arrow::after{border-width:.5rem .5rem .5rem 0}.bs-popover-right .arrow::before,.bs-popover-auto[x-placement^=right] .arrow::before{left:0;border-right-color:rgba(0,0,0,.25)}.bs-popover-right .arrow::after,.bs-popover-auto[x-placement^=right] .arrow::after{left:1px;border-right-color:#fff}.bs-popover-bottom,.bs-popover-auto[x-placement^=bottom]{margin-top:.5rem}.bs-popover-bottom .arrow,.bs-popover-auto[x-placement^=bottom] .arrow{top:-webkit-calc((0.5rem + 1px) * -1);top:calc((0.5rem + 1px) * -1)}.bs-popover-bottom .arrow::before,.bs-popover-auto[x-placement^=bottom] .arrow::before,.bs-popover-bottom .arrow::after,.bs-popover-auto[x-placement^=bottom] .arrow::after{border-width:0 .5rem .5rem}.bs-popover-bottom .arrow::before,.bs-popover-auto[x-placement^=bottom] .arrow::before{top:0;border-bottom-color:rgba(0,0,0,.25)}.bs-popover-bottom .arrow::after,.bs-popover-auto[x-placement^=bottom] .arrow::after{top:1px;border-bottom-color:#fff}.bs-popover-bottom .popover-header::before,.bs-popover-auto[x-placement^=bottom] .popover-header::before{position:absolute;top:0;left:50%;display:block;width:1rem;margin-left:-.5rem;content:"";border-bottom:1px solid #f7f7f7}.bs-popover-left,.bs-popover-auto[x-placement^=left]{margin-right:.5rem}.bs-popover-left .arrow,.bs-popover-auto[x-placement^=left] .arrow{right:-webkit-calc((0.5rem + 1px) * -1);right:calc((0.5rem + 1px) * -1);width:.5rem;height:1rem;margin:.3rem 0}.bs-popover-left .arrow::before,.bs-popover-auto[x-placement^=left] .arrow::before,.bs-popover-left .arrow::after,.bs-popover-auto[x-placement^=left] .arrow::after{border-width:.5rem 0 .5rem .5rem}.bs-popover-left .arrow::before,.bs-popover-auto[x-placement^=left] .arrow::before{right:0;border-left-color:rgba(0,0,0,.25)}.bs-popover-left .arrow::after,.bs-popover-auto[x-placement^=left] .arrow::after{right:1px;border-left-color:#fff}.popover-header{padding:.5rem .75rem;margin-bottom:0;font-size:1rem;color:inherit;background-color:#f7f7f7;border-bottom:1px solid #ebebeb}.popover-header:empty{display:none}.popover-body{padding:.5rem .75rem;color:#222}.carousel{position:relative}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-item{position:relative;display:none;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;width:100%;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-perspective:1000px;perspective:1000px}.carousel-item.active,.carousel-item-next,.carousel-item-prev{display:block;-webkit-transition:-webkit-transform .6s ease;transition:-webkit-transform .6s ease;-o-transition:-o-transform .6s ease;transition:transform .6s ease;transition:transform .6s ease,-webkit-transform .6s ease,-o-transform .6s ease}@media screen and (prefers-reduced-motion:reduce){.carousel-item.active,.carousel-item-next,.carousel-item-prev{-webkit-transition:none;-o-transition:none;transition:none}}.carousel-item-next,.carousel-item-prev{position:absolute;top:0}.carousel-item-next.carousel-item-left,.carousel-item-prev.carousel-item-right{-webkit-transform:translateX(0);-ms-transform:translateX(0);-o-transform:translateX(0);transform:translateX(0)}@supports((-webkit-transform-style:preserve-3d) or (transform-style:preserve-3d)){.carousel-item-next.carousel-item-left,.carousel-item-prev.carousel-item-right{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.carousel-item-next,.active.carousel-item-right{-webkit-transform:translateX(100%);-ms-transform:translateX(100%);-o-transform:translateX(100%);transform:translateX(100%)}@supports((-webkit-transform-style:preserve-3d) or (transform-style:preserve-3d)){.carousel-item-next,.active.carousel-item-right{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}.carousel-item-prev,.active.carousel-item-left{-webkit-transform:translateX(-100%);-ms-transform:translateX(-100%);-o-transform:translateX(-100%);transform:translateX(-100%)}@supports((-webkit-transform-style:preserve-3d) or (transform-style:preserve-3d)){.carousel-item-prev,.active.carousel-item-left{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}.carousel-fade .carousel-item{opacity:0;-webkit-transition-duration:.6s;-o-transition-duration:.6s;transition-duration:.6s;-webkit-transition-property:opacity;-o-transition-property:opacity;transition-property:opacity}.carousel-fade .carousel-item.active,.carousel-fade .carousel-item-next.carousel-item-left,.carousel-fade .carousel-item-prev.carousel-item-right{opacity:1}.carousel-fade .active.carousel-item-left,.carousel-fade .active.carousel-item-right{opacity:0}.carousel-fade .carousel-item-next,.carousel-fade .carousel-item-prev,.carousel-fade .carousel-item.active,.carousel-fade .active.carousel-item-left,.carousel-fade .active.carousel-item-prev{-webkit-transform:translateX(0);-ms-transform:translateX(0);-o-transform:translateX(0);transform:translateX(0)}@supports((-webkit-transform-style:preserve-3d) or (transform-style:preserve-3d)){.carousel-fade .carousel-item-next,.carousel-fade .carousel-item-prev,.carousel-fade .carousel-item.active,.carousel-fade .active.carousel-item-left,.carousel-fade .active.carousel-item-prev{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.carousel-control-prev,.carousel-control-next{position:absolute;top:0;bottom:0;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;width:15%;color:#fff;text-align:center;opacity:.5}.carousel-control-prev:hover,.carousel-control-prev:focus,.carousel-control-next:hover,.carousel-control-next:focus{color:#fff;text-decoration:none;outline:0;opacity:.9}.carousel-control-prev{left:0}.carousel-control-next{right:0}.carousel-control-prev-icon,.carousel-control-next-icon{display:inline-block;width:20px;height:20px;background:no-repeat 50%;-webkit-background-size:100% 100%;background-size:100% 100%}.carousel-control-prev-icon{background-image:url(data:image/svg+xml;charset=utf8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9IiNmZmYiIHZpZXdCb3g9IjAgMCA4IDgiPjxwYXRoIGQ9Ik01LjI1LjBsLTQgNCA0IDQgMS41LTEuNUw0LjI1IDRsMi41LTIuNUw1LjI1LjB6Ii8+PC9zdmc+)}.carousel-control-next-icon{background-image:url(data:image/svg+xml;charset=utf8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9IiNmZmYiIHZpZXdCb3g9IjAgMCA4IDgiPjxwYXRoIGQ9Ik0yLjc1LjBsLTEuNSAxLjVMMy43NSA0bC0yLjUgMi41TDIuNzUgOGw0LTQtNC00eiIvPjwvc3ZnPg==)}.carousel-indicators{position:absolute;right:0;bottom:10px;left:0;z-index:15;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;padding-left:0;margin-right:15%;margin-left:15%;list-style:none}.carousel-indicators li{position:relative;-webkit-box-flex:0;-webkit-flex:0 1 auto;-ms-flex:0 1 auto;flex:0 1 auto;width:30px;height:3px;margin-right:3px;margin-left:3px;text-indent:-999px;cursor:pointer;background-color:rgba(255,255,255,.5)}.carousel-indicators li::before{position:absolute;top:-10px;left:0;display:inline-block;width:100%;height:10px;content:""}.carousel-indicators li::after{position:absolute;bottom:-10px;left:0;display:inline-block;width:100%;height:10px;content:""}.carousel-indicators .active{background-color:#fff}.carousel-caption{position:absolute;right:15%;bottom:20px;left:15%;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center}.align-baseline{vertical-align:baseline!important}.align-top{vertical-align:top!important}.align-middle{vertical-align:middle!important}.align-bottom{vertical-align:bottom!important}.align-text-bottom{vertical-align:text-bottom!important}.align-text-top{vertical-align:text-top!important}.bg-primary{background-color:#1ea149!important}a.bg-primary:hover,a.bg-primary:focus,button.bg-primary:hover,button.bg-primary:focus{background-color:#167636!important}.bg-secondary{background-color:#ffa630!important}a.bg-secondary:hover,a.bg-secondary:focus,button.bg-secondary:hover,button.bg-secondary:focus{background-color:#fc9000!important}.bg-success{background-color:#3772ff!important}a.bg-success:hover,a.bg-success:focus,button.bg-success:hover,button.bg-success:focus{background-color:#044eff!important}.bg-info{background-color:#c0e0de!important}a.bg-info:hover,a.bg-info:focus,button.bg-info:hover,button.bg-info:focus{background-color:#9ecfcc!important}.bg-warning{background-color:#ed6a5a!important}a.bg-warning:hover,a.bg-warning:focus,button.bg-warning:hover,button.bg-warning:focus{background-color:#e8402c!important}.bg-danger{background-color:#ed6a5a!important}a.bg-danger:hover,a.bg-danger:focus,button.bg-danger:hover,button.bg-danger:focus{background-color:#e8402c!important}.bg-light{background-color:#d3f3ee!important}a.bg-light:hover,a.bg-light:focus,button.bg-light:hover,button.bg-light:focus{background-color:#abe8df!important}.bg-dark{background-color:#403f4c!important}a.bg-dark:hover,a.bg-dark:focus,button.bg-dark:hover,button.bg-dark:focus{background-color:#292830!important}.bg-white{background-color:#fff!important}.bg-transparent{background-color:transparent!important}.border{border:1px solid #dee2e6!important}.border-top{border-top:1px solid #dee2e6!important}.border-right{border-right:1px solid #dee2e6!important}.border-bottom{border-bottom:1px solid #dee2e6!important}.border-left{border-left:1px solid #dee2e6!important}.border-0{border:0!important}.border-top-0{border-top:0!important}.border-right-0{border-right:0!important}.border-bottom-0{border-bottom:0!important}.border-left-0{border-left:0!important}.border-primary{border-color:#1ea149!important}.border-secondary{border-color:#ffa630!important}.border-success{border-color:#3772ff!important}.border-info{border-color:#c0e0de!important}.border-warning{border-color:#ed6a5a!important}.border-danger{border-color:#ed6a5a!important}.border-light{border-color:#d3f3ee!important}.border-dark{border-color:#403f4c!important}.border-white{border-color:#fff!important}.rounded{border-radius:.25rem!important}.rounded-top{border-top-left-radius:.25rem!important;border-top-right-radius:.25rem!important}.rounded-right{border-top-right-radius:.25rem!important;border-bottom-right-radius:.25rem!important}.rounded-bottom{border-bottom-right-radius:.25rem!important;border-bottom-left-radius:.25rem!important}.rounded-left{border-top-left-radius:.25rem!important;border-bottom-left-radius:.25rem!important}.rounded-circle{border-radius:50%!important}.rounded-0{border-radius:0!important}.clearfix::after{display:block;clear:both;content:""}.d-none{display:none!important}.d-inline{display:inline!important}.d-inline-block{display:inline-block!important}.d-block{display:block!important}.d-table{display:table!important}.d-table-row{display:table-row!important}.d-table-cell{display:table-cell!important}.d-flex{display:-webkit-box!important;display:-webkit-flex!important;display:-ms-flexbox!important;display:flex!important}.d-inline-flex{display:-webkit-inline-box!important;display:-webkit-inline-flex!important;display:-ms-inline-flexbox!important;display:inline-flex!important}@media(min-width:576px){.d-sm-none{display:none!important}.d-sm-inline{display:inline!important}.d-sm-inline-block{display:inline-block!important}.d-sm-block{display:block!important}.d-sm-table{display:table!important}.d-sm-table-row{display:table-row!important}.d-sm-table-cell{display:table-cell!important}.d-sm-flex{display:-webkit-box!important;display:-webkit-flex!important;display:-ms-flexbox!important;display:flex!important}.d-sm-inline-flex{display:-webkit-inline-box!important;display:-webkit-inline-flex!important;display:-ms-inline-flexbox!important;display:inline-flex!important}}@media(min-width:768px){.d-md-none{display:none!important}.d-md-inline{display:inline!important}.d-md-inline-block{display:inline-block!important}.d-md-block{display:block!important}.d-md-table{display:table!important}.d-md-table-row{display:table-row!important}.d-md-table-cell{display:table-cell!important}.d-md-flex{display:-webkit-box!important;display:-webkit-flex!important;display:-ms-flexbox!important;display:flex!important}.d-md-inline-flex{display:-webkit-inline-box!important;display:-webkit-inline-flex!important;display:-ms-inline-flexbox!important;display:inline-flex!important}}@media(min-width:992px){.d-lg-none{display:none!important}.d-lg-inline{display:inline!important}.d-lg-inline-block{display:inline-block!important}.d-lg-block{display:block!important}.d-lg-table{display:table!important}.d-lg-table-row{display:table-row!important}.d-lg-table-cell{display:table-cell!important}.d-lg-flex{display:-webkit-box!important;display:-webkit-flex!important;display:-ms-flexbox!important;display:flex!important}.d-lg-inline-flex{display:-webkit-inline-box!important;display:-webkit-inline-flex!important;display:-ms-inline-flexbox!important;display:inline-flex!important}}@media(min-width:1200px){.d-xl-none{display:none!important}.d-xl-inline{display:inline!important}.d-xl-inline-block{display:inline-block!important}.d-xl-block{display:block!important}.d-xl-table{display:table!important}.d-xl-table-row{display:table-row!important}.d-xl-table-cell{display:table-cell!important}.d-xl-flex{display:-webkit-box!important;display:-webkit-flex!important;display:-ms-flexbox!important;display:flex!important}.d-xl-inline-flex{display:-webkit-inline-box!important;display:-webkit-inline-flex!important;display:-ms-inline-flexbox!important;display:inline-flex!important}}@media print{.d-print-none{display:none!important}.d-print-inline{display:inline!important}.d-print-inline-block{display:inline-block!important}.d-print-block{display:block!important}.d-print-table{display:table!important}.d-print-table-row{display:table-row!important}.d-print-table-cell{display:table-cell!important}.d-print-flex{display:-webkit-box!important;display:-webkit-flex!important;display:-ms-flexbox!important;display:flex!important}.d-print-inline-flex{display:-webkit-inline-box!important;display:-webkit-inline-flex!important;display:-ms-inline-flexbox!important;display:inline-flex!important}}.embed-responsive{position:relative;display:block;width:100%;padding:0;overflow:hidden}.embed-responsive::before{display:block;content:""}.embed-responsive .embed-responsive-item,.embed-responsive iframe,.embed-responsive embed,.embed-responsive object,.embed-responsive video{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;border:0}.embed-responsive-21by9::before{padding-top:42.85714286%}.embed-responsive-16by9::before{padding-top:56.25%}.embed-responsive-4by3::before{padding-top:75%}.embed-responsive-1by1::before{padding-top:100%}.flex-row{-webkit-box-orient:horizontal!important;-webkit-box-direction:normal!important;-webkit-flex-direction:row!important;-ms-flex-direction:row!important;flex-direction:row!important}.flex-column{-webkit-box-orient:vertical!important;-webkit-box-direction:normal!important;-webkit-flex-direction:column!important;-ms-flex-direction:column!important;flex-direction:column!important}.flex-row-reverse{-webkit-box-orient:horizontal!important;-webkit-box-direction:reverse!important;-webkit-flex-direction:row-reverse!important;-ms-flex-direction:row-reverse!important;flex-direction:row-reverse!important}.flex-column-reverse{-webkit-box-orient:vertical!important;-webkit-box-direction:reverse!important;-webkit-flex-direction:column-reverse!important;-ms-flex-direction:column-reverse!important;flex-direction:column-reverse!important}.flex-wrap{-webkit-flex-wrap:wrap!important;-ms-flex-wrap:wrap!important;flex-wrap:wrap!important}.flex-nowrap{-webkit-flex-wrap:nowrap!important;-ms-flex-wrap:nowrap!important;flex-wrap:nowrap!important}.flex-wrap-reverse{-webkit-flex-wrap:wrap-reverse!important;-ms-flex-wrap:wrap-reverse!important;flex-wrap:wrap-reverse!important}.flex-fill{-webkit-box-flex:1!important;-webkit-flex:1 1 auto!important;-ms-flex:1 1 auto!important;flex:1 1 auto!important}.flex-grow-0{-webkit-box-flex:0!important;-webkit-flex-grow:0!important;-ms-flex-positive:0!important;flex-grow:0!important}.flex-grow-1{-webkit-box-flex:1!important;-webkit-flex-grow:1!important;-ms-flex-positive:1!important;flex-grow:1!important}.flex-shrink-0{-webkit-flex-shrink:0!important;-ms-flex-negative:0!important;flex-shrink:0!important}.flex-shrink-1{-webkit-flex-shrink:1!important;-ms-flex-negative:1!important;flex-shrink:1!important}.justify-content-start{-webkit-box-pack:start!important;-webkit-justify-content:flex-start!important;-ms-flex-pack:start!important;justify-content:flex-start!important}.justify-content-end{-webkit-box-pack:end!important;-webkit-justify-content:flex-end!important;-ms-flex-pack:end!important;justify-content:flex-end!important}.justify-content-center{-webkit-box-pack:center!important;-webkit-justify-content:center!important;-ms-flex-pack:center!important;justify-content:center!important}.justify-content-between{-webkit-box-pack:justify!important;-webkit-justify-content:space-between!important;-ms-flex-pack:justify!important;justify-content:space-between!important}.justify-content-around{-webkit-justify-content:space-around!important;-ms-flex-pack:distribute!important;justify-content:space-around!important}.align-items-start{-webkit-box-align:start!important;-webkit-align-items:flex-start!important;-ms-flex-align:start!important;align-items:flex-start!important}.align-items-end{-webkit-box-align:end!important;-webkit-align-items:flex-end!important;-ms-flex-align:end!important;align-items:flex-end!important}.align-items-center{-webkit-box-align:center!important;-webkit-align-items:center!important;-ms-flex-align:center!important;align-items:center!important}.align-items-baseline{-webkit-box-align:baseline!important;-webkit-align-items:baseline!important;-ms-flex-align:baseline!important;align-items:baseline!important}.align-items-stretch{-webkit-box-align:stretch!important;-webkit-align-items:stretch!important;-ms-flex-align:stretch!important;align-items:stretch!important}.align-content-start{-webkit-align-content:flex-start!important;-ms-flex-line-pack:start!important;align-content:flex-start!important}.align-content-end{-webkit-align-content:flex-end!important;-ms-flex-line-pack:end!important;align-content:flex-end!important}.align-content-center{-webkit-align-content:center!important;-ms-flex-line-pack:center!important;align-content:center!important}.align-content-between{-webkit-align-content:space-between!important;-ms-flex-line-pack:justify!important;align-content:space-between!important}.align-content-around{-webkit-align-content:space-around!important;-ms-flex-line-pack:distribute!important;align-content:space-around!important}.align-content-stretch{-webkit-align-content:stretch!important;-ms-flex-line-pack:stretch!important;align-content:stretch!important}.align-self-auto{-webkit-align-self:auto!important;-ms-flex-item-align:auto!important;align-self:auto!important}.align-self-start{-webkit-align-self:flex-start!important;-ms-flex-item-align:start!important;align-self:flex-start!important}.align-self-end{-webkit-align-self:flex-end!important;-ms-flex-item-align:end!important;align-self:flex-end!important}.align-self-center{-webkit-align-self:center!important;-ms-flex-item-align:center!important;align-self:center!important}.align-self-baseline{-webkit-align-self:baseline!important;-ms-flex-item-align:baseline!important;align-self:baseline!important}.align-self-stretch{-webkit-align-self:stretch!important;-ms-flex-item-align:stretch!important;align-self:stretch!important}@media(min-width:576px){.flex-sm-row{-webkit-box-orient:horizontal!important;-webkit-box-direction:normal!important;-webkit-flex-direction:row!important;-ms-flex-direction:row!important;flex-direction:row!important}.flex-sm-column{-webkit-box-orient:vertical!important;-webkit-box-direction:normal!important;-webkit-flex-direction:column!important;-ms-flex-direction:column!important;flex-direction:column!important}.flex-sm-row-reverse{-webkit-box-orient:horizontal!important;-webkit-box-direction:reverse!important;-webkit-flex-direction:row-reverse!important;-ms-flex-direction:row-reverse!important;flex-direction:row-reverse!important}.flex-sm-column-reverse{-webkit-box-orient:vertical!important;-webkit-box-direction:reverse!important;-webkit-flex-direction:column-reverse!important;-ms-flex-direction:column-reverse!important;flex-direction:column-reverse!important}.flex-sm-wrap{-webkit-flex-wrap:wrap!important;-ms-flex-wrap:wrap!important;flex-wrap:wrap!important}.flex-sm-nowrap{-webkit-flex-wrap:nowrap!important;-ms-flex-wrap:nowrap!important;flex-wrap:nowrap!important}.flex-sm-wrap-reverse{-webkit-flex-wrap:wrap-reverse!important;-ms-flex-wrap:wrap-reverse!important;flex-wrap:wrap-reverse!important}.flex-sm-fill{-webkit-box-flex:1!important;-webkit-flex:1 1 auto!important;-ms-flex:1 1 auto!important;flex:1 1 auto!important}.flex-sm-grow-0{-webkit-box-flex:0!important;-webkit-flex-grow:0!important;-ms-flex-positive:0!important;flex-grow:0!important}.flex-sm-grow-1{-webkit-box-flex:1!important;-webkit-flex-grow:1!important;-ms-flex-positive:1!important;flex-grow:1!important}.flex-sm-shrink-0{-webkit-flex-shrink:0!important;-ms-flex-negative:0!important;flex-shrink:0!important}.flex-sm-shrink-1{-webkit-flex-shrink:1!important;-ms-flex-negative:1!important;flex-shrink:1!important}.justify-content-sm-start{-webkit-box-pack:start!important;-webkit-justify-content:flex-start!important;-ms-flex-pack:start!important;justify-content:flex-start!important}.justify-content-sm-end{-webkit-box-pack:end!important;-webkit-justify-content:flex-end!important;-ms-flex-pack:end!important;justify-content:flex-end!important}.justify-content-sm-center{-webkit-box-pack:center!important;-webkit-justify-content:center!important;-ms-flex-pack:center!important;justify-content:center!important}.justify-content-sm-between{-webkit-box-pack:justify!important;-webkit-justify-content:space-between!important;-ms-flex-pack:justify!important;justify-content:space-between!important}.justify-content-sm-around{-webkit-justify-content:space-around!important;-ms-flex-pack:distribute!important;justify-content:space-around!important}.align-items-sm-start{-webkit-box-align:start!important;-webkit-align-items:flex-start!important;-ms-flex-align:start!important;align-items:flex-start!important}.align-items-sm-end{-webkit-box-align:end!important;-webkit-align-items:flex-end!important;-ms-flex-align:end!important;align-items:flex-end!important}.align-items-sm-center{-webkit-box-align:center!important;-webkit-align-items:center!important;-ms-flex-align:center!important;align-items:center!important}.align-items-sm-baseline{-webkit-box-align:baseline!important;-webkit-align-items:baseline!important;-ms-flex-align:baseline!important;align-items:baseline!important}.align-items-sm-stretch{-webkit-box-align:stretch!important;-webkit-align-items:stretch!important;-ms-flex-align:stretch!important;align-items:stretch!important}.align-content-sm-start{-webkit-align-content:flex-start!important;-ms-flex-line-pack:start!important;align-content:flex-start!important}.align-content-sm-end{-webkit-align-content:flex-end!important;-ms-flex-line-pack:end!important;align-content:flex-end!important}.align-content-sm-center{-webkit-align-content:center!important;-ms-flex-line-pack:center!important;align-content:center!important}.align-content-sm-between{-webkit-align-content:space-between!important;-ms-flex-line-pack:justify!important;align-content:space-between!important}.align-content-sm-around{-webkit-align-content:space-around!important;-ms-flex-line-pack:distribute!important;align-content:space-around!important}.align-content-sm-stretch{-webkit-align-content:stretch!important;-ms-flex-line-pack:stretch!important;align-content:stretch!important}.align-self-sm-auto{-webkit-align-self:auto!important;-ms-flex-item-align:auto!important;align-self:auto!important}.align-self-sm-start{-webkit-align-self:flex-start!important;-ms-flex-item-align:start!important;align-self:flex-start!important}.align-self-sm-end{-webkit-align-self:flex-end!important;-ms-flex-item-align:end!important;align-self:flex-end!important}.align-self-sm-center{-webkit-align-self:center!important;-ms-flex-item-align:center!important;align-self:center!important}.align-self-sm-baseline{-webkit-align-self:baseline!important;-ms-flex-item-align:baseline!important;align-self:baseline!important}.align-self-sm-stretch{-webkit-align-self:stretch!important;-ms-flex-item-align:stretch!important;align-self:stretch!important}}@media(min-width:768px){.flex-md-row{-webkit-box-orient:horizontal!important;-webkit-box-direction:normal!important;-webkit-flex-direction:row!important;-ms-flex-direction:row!important;flex-direction:row!important}.flex-md-column{-webkit-box-orient:vertical!important;-webkit-box-direction:normal!important;-webkit-flex-direction:column!important;-ms-flex-direction:column!important;flex-direction:column!important}.flex-md-row-reverse{-webkit-box-orient:horizontal!important;-webkit-box-direction:reverse!important;-webkit-flex-direction:row-reverse!important;-ms-flex-direction:row-reverse!important;flex-direction:row-reverse!important}.flex-md-column-reverse{-webkit-box-orient:vertical!important;-webkit-box-direction:reverse!important;-webkit-flex-direction:column-reverse!important;-ms-flex-direction:column-reverse!important;flex-direction:column-reverse!important}.flex-md-wrap{-webkit-flex-wrap:wrap!important;-ms-flex-wrap:wrap!important;flex-wrap:wrap!important}.flex-md-nowrap{-webkit-flex-wrap:nowrap!important;-ms-flex-wrap:nowrap!important;flex-wrap:nowrap!important}.flex-md-wrap-reverse{-webkit-flex-wrap:wrap-reverse!important;-ms-flex-wrap:wrap-reverse!important;flex-wrap:wrap-reverse!important}.flex-md-fill{-webkit-box-flex:1!important;-webkit-flex:1 1 auto!important;-ms-flex:1 1 auto!important;flex:1 1 auto!important}.flex-md-grow-0{-webkit-box-flex:0!important;-webkit-flex-grow:0!important;-ms-flex-positive:0!important;flex-grow:0!important}.flex-md-grow-1{-webkit-box-flex:1!important;-webkit-flex-grow:1!important;-ms-flex-positive:1!important;flex-grow:1!important}.flex-md-shrink-0{-webkit-flex-shrink:0!important;-ms-flex-negative:0!important;flex-shrink:0!important}.flex-md-shrink-1{-webkit-flex-shrink:1!important;-ms-flex-negative:1!important;flex-shrink:1!important}.justify-content-md-start{-webkit-box-pack:start!important;-webkit-justify-content:flex-start!important;-ms-flex-pack:start!important;justify-content:flex-start!important}.justify-content-md-end{-webkit-box-pack:end!important;-webkit-justify-content:flex-end!important;-ms-flex-pack:end!important;justify-content:flex-end!important}.justify-content-md-center{-webkit-box-pack:center!important;-webkit-justify-content:center!important;-ms-flex-pack:center!important;justify-content:center!important}.justify-content-md-between{-webkit-box-pack:justify!important;-webkit-justify-content:space-between!important;-ms-flex-pack:justify!important;justify-content:space-between!important}.justify-content-md-around{-webkit-justify-content:space-around!important;-ms-flex-pack:distribute!important;justify-content:space-around!important}.align-items-md-start{-webkit-box-align:start!important;-webkit-align-items:flex-start!important;-ms-flex-align:start!important;align-items:flex-start!important}.align-items-md-end{-webkit-box-align:end!important;-webkit-align-items:flex-end!important;-ms-flex-align:end!important;align-items:flex-end!important}.align-items-md-center{-webkit-box-align:center!important;-webkit-align-items:center!important;-ms-flex-align:center!important;align-items:center!important}.align-items-md-baseline{-webkit-box-align:baseline!important;-webkit-align-items:baseline!important;-ms-flex-align:baseline!important;align-items:baseline!important}.align-items-md-stretch{-webkit-box-align:stretch!important;-webkit-align-items:stretch!important;-ms-flex-align:stretch!important;align-items:stretch!important}.align-content-md-start{-webkit-align-content:flex-start!important;-ms-flex-line-pack:start!important;align-content:flex-start!important}.align-content-md-end{-webkit-align-content:flex-end!important;-ms-flex-line-pack:end!important;align-content:flex-end!important}.align-content-md-center{-webkit-align-content:center!important;-ms-flex-line-pack:center!important;align-content:center!important}.align-content-md-between{-webkit-align-content:space-between!important;-ms-flex-line-pack:justify!important;align-content:space-between!important}.align-content-md-around{-webkit-align-content:space-around!important;-ms-flex-line-pack:distribute!important;align-content:space-around!important}.align-content-md-stretch{-webkit-align-content:stretch!important;-ms-flex-line-pack:stretch!important;align-content:stretch!important}.align-self-md-auto{-webkit-align-self:auto!important;-ms-flex-item-align:auto!important;align-self:auto!important}.align-self-md-start{-webkit-align-self:flex-start!important;-ms-flex-item-align:start!important;align-self:flex-start!important}.align-self-md-end{-webkit-align-self:flex-end!important;-ms-flex-item-align:end!important;align-self:flex-end!important}.align-self-md-center{-webkit-align-self:center!important;-ms-flex-item-align:center!important;align-self:center!important}.align-self-md-baseline{-webkit-align-self:baseline!important;-ms-flex-item-align:baseline!important;align-self:baseline!important}.align-self-md-stretch{-webkit-align-self:stretch!important;-ms-flex-item-align:stretch!important;align-self:stretch!important}}@media(min-width:992px){.flex-lg-row{-webkit-box-orient:horizontal!important;-webkit-box-direction:normal!important;-webkit-flex-direction:row!important;-ms-flex-direction:row!important;flex-direction:row!important}.flex-lg-column{-webkit-box-orient:vertical!important;-webkit-box-direction:normal!important;-webkit-flex-direction:column!important;-ms-flex-direction:column!important;flex-direction:column!important}.flex-lg-row-reverse{-webkit-box-orient:horizontal!important;-webkit-box-direction:reverse!important;-webkit-flex-direction:row-reverse!important;-ms-flex-direction:row-reverse!important;flex-direction:row-reverse!important}.flex-lg-column-reverse{-webkit-box-orient:vertical!important;-webkit-box-direction:reverse!important;-webkit-flex-direction:column-reverse!important;-ms-flex-direction:column-reverse!important;flex-direction:column-reverse!important}.flex-lg-wrap{-webkit-flex-wrap:wrap!important;-ms-flex-wrap:wrap!important;flex-wrap:wrap!important}.flex-lg-nowrap{-webkit-flex-wrap:nowrap!important;-ms-flex-wrap:nowrap!important;flex-wrap:nowrap!important}.flex-lg-wrap-reverse{-webkit-flex-wrap:wrap-reverse!important;-ms-flex-wrap:wrap-reverse!important;flex-wrap:wrap-reverse!important}.flex-lg-fill{-webkit-box-flex:1!important;-webkit-flex:1 1 auto!important;-ms-flex:1 1 auto!important;flex:1 1 auto!important}.flex-lg-grow-0{-webkit-box-flex:0!important;-webkit-flex-grow:0!important;-ms-flex-positive:0!important;flex-grow:0!important}.flex-lg-grow-1{-webkit-box-flex:1!important;-webkit-flex-grow:1!important;-ms-flex-positive:1!important;flex-grow:1!important}.flex-lg-shrink-0{-webkit-flex-shrink:0!important;-ms-flex-negative:0!important;flex-shrink:0!important}.flex-lg-shrink-1{-webkit-flex-shrink:1!important;-ms-flex-negative:1!important;flex-shrink:1!important}.justify-content-lg-start{-webkit-box-pack:start!important;-webkit-justify-content:flex-start!important;-ms-flex-pack:start!important;justify-content:flex-start!important}.justify-content-lg-end{-webkit-box-pack:end!important;-webkit-justify-content:flex-end!important;-ms-flex-pack:end!important;justify-content:flex-end!important}.justify-content-lg-center{-webkit-box-pack:center!important;-webkit-justify-content:center!important;-ms-flex-pack:center!important;justify-content:center!important}.justify-content-lg-between{-webkit-box-pack:justify!important;-webkit-justify-content:space-between!important;-ms-flex-pack:justify!important;justify-content:space-between!important}.justify-content-lg-around{-webkit-justify-content:space-around!important;-ms-flex-pack:distribute!important;justify-content:space-around!important}.align-items-lg-start{-webkit-box-align:start!important;-webkit-align-items:flex-start!important;-ms-flex-align:start!important;align-items:flex-start!important}.align-items-lg-end{-webkit-box-align:end!important;-webkit-align-items:flex-end!important;-ms-flex-align:end!important;align-items:flex-end!important}.align-items-lg-center{-webkit-box-align:center!important;-webkit-align-items:center!important;-ms-flex-align:center!important;align-items:center!important}.align-items-lg-baseline{-webkit-box-align:baseline!important;-webkit-align-items:baseline!important;-ms-flex-align:baseline!important;align-items:baseline!important}.align-items-lg-stretch{-webkit-box-align:stretch!important;-webkit-align-items:stretch!important;-ms-flex-align:stretch!important;align-items:stretch!important}.align-content-lg-start{-webkit-align-content:flex-start!important;-ms-flex-line-pack:start!important;align-content:flex-start!important}.align-content-lg-end{-webkit-align-content:flex-end!important;-ms-flex-line-pack:end!important;align-content:flex-end!important}.align-content-lg-center{-webkit-align-content:center!important;-ms-flex-line-pack:center!important;align-content:center!important}.align-content-lg-between{-webkit-align-content:space-between!important;-ms-flex-line-pack:justify!important;align-content:space-between!important}.align-content-lg-around{-webkit-align-content:space-around!important;-ms-flex-line-pack:distribute!important;align-content:space-around!important}.align-content-lg-stretch{-webkit-align-content:stretch!important;-ms-flex-line-pack:stretch!important;align-content:stretch!important}.align-self-lg-auto{-webkit-align-self:auto!important;-ms-flex-item-align:auto!important;align-self:auto!important}.align-self-lg-start{-webkit-align-self:flex-start!important;-ms-flex-item-align:start!important;align-self:flex-start!important}.align-self-lg-end{-webkit-align-self:flex-end!important;-ms-flex-item-align:end!important;align-self:flex-end!important}.align-self-lg-center{-webkit-align-self:center!important;-ms-flex-item-align:center!important;align-self:center!important}.align-self-lg-baseline{-webkit-align-self:baseline!important;-ms-flex-item-align:baseline!important;align-self:baseline!important}.align-self-lg-stretch{-webkit-align-self:stretch!important;-ms-flex-item-align:stretch!important;align-self:stretch!important}}@media(min-width:1200px){.flex-xl-row{-webkit-box-orient:horizontal!important;-webkit-box-direction:normal!important;-webkit-flex-direction:row!important;-ms-flex-direction:row!important;flex-direction:row!important}.flex-xl-column{-webkit-box-orient:vertical!important;-webkit-box-direction:normal!important;-webkit-flex-direction:column!important;-ms-flex-direction:column!important;flex-direction:column!important}.flex-xl-row-reverse{-webkit-box-orient:horizontal!important;-webkit-box-direction:reverse!important;-webkit-flex-direction:row-reverse!important;-ms-flex-direction:row-reverse!important;flex-direction:row-reverse!important}.flex-xl-column-reverse{-webkit-box-orient:vertical!important;-webkit-box-direction:reverse!important;-webkit-flex-direction:column-reverse!important;-ms-flex-direction:column-reverse!important;flex-direction:column-reverse!important}.flex-xl-wrap{-webkit-flex-wrap:wrap!important;-ms-flex-wrap:wrap!important;flex-wrap:wrap!important}.flex-xl-nowrap{-webkit-flex-wrap:nowrap!important;-ms-flex-wrap:nowrap!important;flex-wrap:nowrap!important}.flex-xl-wrap-reverse{-webkit-flex-wrap:wrap-reverse!important;-ms-flex-wrap:wrap-reverse!important;flex-wrap:wrap-reverse!important}.flex-xl-fill{-webkit-box-flex:1!important;-webkit-flex:1 1 auto!important;-ms-flex:1 1 auto!important;flex:1 1 auto!important}.flex-xl-grow-0{-webkit-box-flex:0!important;-webkit-flex-grow:0!important;-ms-flex-positive:0!important;flex-grow:0!important}.flex-xl-grow-1{-webkit-box-flex:1!important;-webkit-flex-grow:1!important;-ms-flex-positive:1!important;flex-grow:1!important}.flex-xl-shrink-0{-webkit-flex-shrink:0!important;-ms-flex-negative:0!important;flex-shrink:0!important}.flex-xl-shrink-1{-webkit-flex-shrink:1!important;-ms-flex-negative:1!important;flex-shrink:1!important}.justify-content-xl-start{-webkit-box-pack:start!important;-webkit-justify-content:flex-start!important;-ms-flex-pack:start!important;justify-content:flex-start!important}.justify-content-xl-end{-webkit-box-pack:end!important;-webkit-justify-content:flex-end!important;-ms-flex-pack:end!important;justify-content:flex-end!important}.justify-content-xl-center{-webkit-box-pack:center!important;-webkit-justify-content:center!important;-ms-flex-pack:center!important;justify-content:center!important}.justify-content-xl-between{-webkit-box-pack:justify!important;-webkit-justify-content:space-between!important;-ms-flex-pack:justify!important;justify-content:space-between!important}.justify-content-xl-around{-webkit-justify-content:space-around!important;-ms-flex-pack:distribute!important;justify-content:space-around!important}.align-items-xl-start{-webkit-box-align:start!important;-webkit-align-items:flex-start!important;-ms-flex-align:start!important;align-items:flex-start!important}.align-items-xl-end{-webkit-box-align:end!important;-webkit-align-items:flex-end!important;-ms-flex-align:end!important;align-items:flex-end!important}.align-items-xl-center{-webkit-box-align:center!important;-webkit-align-items:center!important;-ms-flex-align:center!important;align-items:center!important}.align-items-xl-baseline{-webkit-box-align:baseline!important;-webkit-align-items:baseline!important;-ms-flex-align:baseline!important;align-items:baseline!important}.align-items-xl-stretch{-webkit-box-align:stretch!important;-webkit-align-items:stretch!important;-ms-flex-align:stretch!important;align-items:stretch!important}.align-content-xl-start{-webkit-align-content:flex-start!important;-ms-flex-line-pack:start!important;align-content:flex-start!important}.align-content-xl-end{-webkit-align-content:flex-end!important;-ms-flex-line-pack:end!important;align-content:flex-end!important}.align-content-xl-center{-webkit-align-content:center!important;-ms-flex-line-pack:center!important;align-content:center!important}.align-content-xl-between{-webkit-align-content:space-between!important;-ms-flex-line-pack:justify!important;align-content:space-between!important}.align-content-xl-around{-webkit-align-content:space-around!important;-ms-flex-line-pack:distribute!important;align-content:space-around!important}.align-content-xl-stretch{-webkit-align-content:stretch!important;-ms-flex-line-pack:stretch!important;align-content:stretch!important}.align-self-xl-auto{-webkit-align-self:auto!important;-ms-flex-item-align:auto!important;align-self:auto!important}.align-self-xl-start{-webkit-align-self:flex-start!important;-ms-flex-item-align:start!important;align-self:flex-start!important}.align-self-xl-end{-webkit-align-self:flex-end!important;-ms-flex-item-align:end!important;align-self:flex-end!important}.align-self-xl-center{-webkit-align-self:center!important;-ms-flex-item-align:center!important;align-self:center!important}.align-self-xl-baseline{-webkit-align-self:baseline!important;-ms-flex-item-align:baseline!important;align-self:baseline!important}.align-self-xl-stretch{-webkit-align-self:stretch!important;-ms-flex-item-align:stretch!important;align-self:stretch!important}}.float-left{float:left!important}.float-right{float:right!important}.float-none{float:none!important}@media(min-width:576px){.float-sm-left{float:left!important}.float-sm-right{float:right!important}.float-sm-none{float:none!important}}@media(min-width:768px){.float-md-left{float:left!important}.float-md-right{float:right!important}.float-md-none{float:none!important}}@media(min-width:992px){.float-lg-left{float:left!important}.float-lg-right{float:right!important}.float-lg-none{float:none!important}}@media(min-width:1200px){.float-xl-left{float:left!important}.float-xl-right{float:right!important}.float-xl-none{float:none!important}}.position-static{position:static!important}.position-relative{position:relative!important}.position-absolute{position:absolute!important}.position-fixed{position:fixed!important}.position-sticky{position:-webkit-sticky!important;position:sticky!important}.fixed-top{position:fixed;top:0;right:0;left:0;z-index:1030}.fixed-bottom{position:fixed;right:0;bottom:0;left:0;z-index:1030}@supports((position:-webkit-sticky) or (position:sticky)){.sticky-top{position:-webkit-sticky;position:sticky;top:0;z-index:1020}}.sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;overflow:visible;clip:auto;white-space:normal}.shadow-sm{-webkit-box-shadow:0 .125rem .25rem rgba(0,0,0,.075)!important;box-shadow:0 .125rem .25rem rgba(0,0,0,.075)!important}.shadow{-webkit-box-shadow:0 .5rem 1rem rgba(0,0,0,.15)!important;box-shadow:0 .5rem 1rem rgba(0,0,0,.15)!important}.shadow-lg{-webkit-box-shadow:0 1rem 3rem rgba(0,0,0,.175)!important;box-shadow:0 1rem 3rem rgba(0,0,0,.175)!important}.shadow-none{-webkit-box-shadow:none!important;box-shadow:none!important}.w-25{width:25%!important}.w-50{width:50%!important}.w-75{width:75%!important}.w-100{width:100%!important}.w-auto{width:auto!important}.h-25{height:25%!important}.h-50{height:50%!important}.h-75{height:75%!important}.h-100{height:100%!important}.h-auto{height:auto!important}.mw-100{max-width:100%!important}.mh-100{max-height:100%!important}.m-0{margin:0!important}.mt-0,.my-0{margin-top:0!important}.mr-0,.mx-0{margin-right:0!important}.mb-0,.my-0{margin-bottom:0!important}.ml-0,.mx-0{margin-left:0!important}.m-1{margin:.25rem!important}.mt-1,.my-1{margin-top:.25rem!important}.mr-1,.mx-1{margin-right:.25rem!important}.mb-1,.my-1{margin-bottom:.25rem!important}.ml-1,.mx-1{margin-left:.25rem!important}.m-2{margin:.5rem!important}.mt-2,.my-2{margin-top:.5rem!important}.mr-2,.mx-2{margin-right:.5rem!important}.mb-2,.my-2{margin-bottom:.5rem!important}.ml-2,.mx-2{margin-left:.5rem!important}.m-3{margin:1rem!important}.mt-3,.my-3{margin-top:1rem!important}.mr-3,.mx-3{margin-right:1rem!important}.mb-3,.my-3{margin-bottom:1rem!important}.ml-3,.mx-3{margin-left:1rem!important}.m-4{margin:1.5rem!important}.mt-4,.my-4{margin-top:1.5rem!important}.mr-4,.mx-4{margin-right:1.5rem!important}.mb-4,.my-4{margin-bottom:1.5rem!important}.ml-4,.mx-4{margin-left:1.5rem!important}.m-5{margin:3rem!important}.mt-5,.my-5{margin-top:3rem!important}.mr-5,.mx-5{margin-right:3rem!important}.mb-5,.my-5{margin-bottom:3rem!important}.ml-5,.mx-5{margin-left:3rem!important}.p-0{padding:0!important}.pt-0,.py-0{padding-top:0!important}.pr-0,.px-0{padding-right:0!important}.pb-0,.py-0{padding-bottom:0!important}.pl-0,.px-0{padding-left:0!important}.p-1{padding:.25rem!important}.pt-1,.py-1{padding-top:.25rem!important}.pr-1,.px-1{padding-right:.25rem!important}.pb-1,.py-1{padding-bottom:.25rem!important}.pl-1,.px-1{padding-left:.25rem!important}.p-2{padding:.5rem!important}.pt-2,.py-2{padding-top:.5rem!important}.pr-2,.px-2{padding-right:.5rem!important}.pb-2,.py-2{padding-bottom:.5rem!important}.pl-2,.px-2{padding-left:.5rem!important}.p-3{padding:1rem!important}.pt-3,.py-3{padding-top:1rem!important}.pr-3,.px-3{padding-right:1rem!important}.pb-3,.py-3{padding-bottom:1rem!important}.pl-3,.px-3{padding-left:1rem!important}.p-4{padding:1.5rem!important}.pt-4,.py-4{padding-top:1.5rem!important}.pr-4,.px-4{padding-right:1.5rem!important}.pb-4,.py-4{padding-bottom:1.5rem!important}.pl-4,.px-4{padding-left:1.5rem!important}.p-5{padding:3rem!important}.pt-5,.py-5{padding-top:3rem!important}.pr-5,.px-5{padding-right:3rem!important}.pb-5,.py-5{padding-bottom:3rem!important}.pl-5,.px-5{padding-left:3rem!important}.m-auto{margin:auto!important}.mt-auto,.my-auto{margin-top:auto!important}.mr-auto,.mx-auto{margin-right:auto!important}.mb-auto,.my-auto{margin-bottom:auto!important}.ml-auto,.mx-auto{margin-left:auto!important}@media(min-width:576px){.m-sm-0{margin:0!important}.mt-sm-0,.my-sm-0{margin-top:0!important}.mr-sm-0,.mx-sm-0{margin-right:0!important}.mb-sm-0,.my-sm-0{margin-bottom:0!important}.ml-sm-0,.mx-sm-0{margin-left:0!important}.m-sm-1{margin:.25rem!important}.mt-sm-1,.my-sm-1{margin-top:.25rem!important}.mr-sm-1,.mx-sm-1{margin-right:.25rem!important}.mb-sm-1,.my-sm-1{margin-bottom:.25rem!important}.ml-sm-1,.mx-sm-1{margin-left:.25rem!important}.m-sm-2{margin:.5rem!important}.mt-sm-2,.my-sm-2{margin-top:.5rem!important}.mr-sm-2,.mx-sm-2{margin-right:.5rem!important}.mb-sm-2,.my-sm-2{margin-bottom:.5rem!important}.ml-sm-2,.mx-sm-2{margin-left:.5rem!important}.m-sm-3{margin:1rem!important}.mt-sm-3,.my-sm-3{margin-top:1rem!important}.mr-sm-3,.mx-sm-3{margin-right:1rem!important}.mb-sm-3,.my-sm-3{margin-bottom:1rem!important}.ml-sm-3,.mx-sm-3{margin-left:1rem!important}.m-sm-4{margin:1.5rem!important}.mt-sm-4,.my-sm-4{margin-top:1.5rem!important}.mr-sm-4,.mx-sm-4{margin-right:1.5rem!important}.mb-sm-4,.my-sm-4{margin-bottom:1.5rem!important}.ml-sm-4,.mx-sm-4{margin-left:1.5rem!important}.m-sm-5{margin:3rem!important}.mt-sm-5,.my-sm-5{margin-top:3rem!important}.mr-sm-5,.mx-sm-5{margin-right:3rem!important}.mb-sm-5,.my-sm-5{margin-bottom:3rem!important}.ml-sm-5,.mx-sm-5{margin-left:3rem!important}.p-sm-0{padding:0!important}.pt-sm-0,.py-sm-0{padding-top:0!important}.pr-sm-0,.px-sm-0{padding-right:0!important}.pb-sm-0,.py-sm-0{padding-bottom:0!important}.pl-sm-0,.px-sm-0{padding-left:0!important}.p-sm-1{padding:.25rem!important}.pt-sm-1,.py-sm-1{padding-top:.25rem!important}.pr-sm-1,.px-sm-1{padding-right:.25rem!important}.pb-sm-1,.py-sm-1{padding-bottom:.25rem!important}.pl-sm-1,.px-sm-1{padding-left:.25rem!important}.p-sm-2{padding:.5rem!important}.pt-sm-2,.py-sm-2{padding-top:.5rem!important}.pr-sm-2,.px-sm-2{padding-right:.5rem!important}.pb-sm-2,.py-sm-2{padding-bottom:.5rem!important}.pl-sm-2,.px-sm-2{padding-left:.5rem!important}.p-sm-3{padding:1rem!important}.pt-sm-3,.py-sm-3{padding-top:1rem!important}.pr-sm-3,.px-sm-3{padding-right:1rem!important}.pb-sm-3,.py-sm-3{padding-bottom:1rem!important}.pl-sm-3,.px-sm-3{padding-left:1rem!important}.p-sm-4{padding:1.5rem!important}.pt-sm-4,.py-sm-4{padding-top:1.5rem!important}.pr-sm-4,.px-sm-4{padding-right:1.5rem!important}.pb-sm-4,.py-sm-4{padding-bottom:1.5rem!important}.pl-sm-4,.px-sm-4{padding-left:1.5rem!important}.p-sm-5{padding:3rem!important}.pt-sm-5,.py-sm-5{padding-top:3rem!important}.pr-sm-5,.px-sm-5{padding-right:3rem!important}.pb-sm-5,.py-sm-5{padding-bottom:3rem!important}.pl-sm-5,.px-sm-5{padding-left:3rem!important}.m-sm-auto{margin:auto!important}.mt-sm-auto,.my-sm-auto{margin-top:auto!important}.mr-sm-auto,.mx-sm-auto{margin-right:auto!important}.mb-sm-auto,.my-sm-auto{margin-bottom:auto!important}.ml-sm-auto,.mx-sm-auto{margin-left:auto!important}}@media(min-width:768px){.m-md-0{margin:0!important}.mt-md-0,.my-md-0{margin-top:0!important}.mr-md-0,.mx-md-0{margin-right:0!important}.mb-md-0,.my-md-0{margin-bottom:0!important}.ml-md-0,.mx-md-0{margin-left:0!important}.m-md-1{margin:.25rem!important}.mt-md-1,.my-md-1{margin-top:.25rem!important}.mr-md-1,.mx-md-1{margin-right:.25rem!important}.mb-md-1,.my-md-1{margin-bottom:.25rem!important}.ml-md-1,.mx-md-1{margin-left:.25rem!important}.m-md-2{margin:.5rem!important}.mt-md-2,.my-md-2{margin-top:.5rem!important}.mr-md-2,.mx-md-2{margin-right:.5rem!important}.mb-md-2,.my-md-2{margin-bottom:.5rem!important}.ml-md-2,.mx-md-2{margin-left:.5rem!important}.m-md-3{margin:1rem!important}.mt-md-3,.my-md-3{margin-top:1rem!important}.mr-md-3,.mx-md-3{margin-right:1rem!important}.mb-md-3,.my-md-3{margin-bottom:1rem!important}.ml-md-3,.mx-md-3{margin-left:1rem!important}.m-md-4{margin:1.5rem!important}.mt-md-4,.my-md-4{margin-top:1.5rem!important}.mr-md-4,.mx-md-4{margin-right:1.5rem!important}.mb-md-4,.my-md-4{margin-bottom:1.5rem!important}.ml-md-4,.mx-md-4{margin-left:1.5rem!important}.m-md-5{margin:3rem!important}.mt-md-5,.my-md-5{margin-top:3rem!important}.mr-md-5,.mx-md-5{margin-right:3rem!important}.mb-md-5,.my-md-5{margin-bottom:3rem!important}.ml-md-5,.mx-md-5{margin-left:3rem!important}.p-md-0{padding:0!important}.pt-md-0,.py-md-0{padding-top:0!important}.pr-md-0,.px-md-0{padding-right:0!important}.pb-md-0,.py-md-0{padding-bottom:0!important}.pl-md-0,.px-md-0{padding-left:0!important}.p-md-1{padding:.25rem!important}.pt-md-1,.py-md-1{padding-top:.25rem!important}.pr-md-1,.px-md-1{padding-right:.25rem!important}.pb-md-1,.py-md-1{padding-bottom:.25rem!important}.pl-md-1,.px-md-1{padding-left:.25rem!important}.p-md-2{padding:.5rem!important}.pt-md-2,.py-md-2{padding-top:.5rem!important}.pr-md-2,.px-md-2{padding-right:.5rem!important}.pb-md-2,.py-md-2{padding-bottom:.5rem!important}.pl-md-2,.px-md-2{padding-left:.5rem!important}.p-md-3{padding:1rem!important}.pt-md-3,.py-md-3{padding-top:1rem!important}.pr-md-3,.px-md-3{padding-right:1rem!important}.pb-md-3,.py-md-3{padding-bottom:1rem!important}.pl-md-3,.px-md-3{padding-left:1rem!important}.p-md-4{padding:1.5rem!important}.pt-md-4,.py-md-4{padding-top:1.5rem!important}.pr-md-4,.px-md-4{padding-right:1.5rem!important}.pb-md-4,.py-md-4{padding-bottom:1.5rem!important}.pl-md-4,.px-md-4{padding-left:1.5rem!important}.p-md-5{padding:3rem!important}.pt-md-5,.py-md-5{padding-top:3rem!important}.pr-md-5,.px-md-5{padding-right:3rem!important}.pb-md-5,.py-md-5{padding-bottom:3rem!important}.pl-md-5,.px-md-5{padding-left:3rem!important}.m-md-auto{margin:auto!important}.mt-md-auto,.my-md-auto{margin-top:auto!important}.mr-md-auto,.mx-md-auto{margin-right:auto!important}.mb-md-auto,.my-md-auto{margin-bottom:auto!important}.ml-md-auto,.mx-md-auto{margin-left:auto!important}}@media(min-width:992px){.m-lg-0{margin:0!important}.mt-lg-0,.my-lg-0{margin-top:0!important}.mr-lg-0,.mx-lg-0{margin-right:0!important}.mb-lg-0,.my-lg-0{margin-bottom:0!important}.ml-lg-0,.mx-lg-0{margin-left:0!important}.m-lg-1{margin:.25rem!important}.mt-lg-1,.my-lg-1{margin-top:.25rem!important}.mr-lg-1,.mx-lg-1{margin-right:.25rem!important}.mb-lg-1,.my-lg-1{margin-bottom:.25rem!important}.ml-lg-1,.mx-lg-1{margin-left:.25rem!important}.m-lg-2{margin:.5rem!important}.mt-lg-2,.my-lg-2{margin-top:.5rem!important}.mr-lg-2,.mx-lg-2{margin-right:.5rem!important}.mb-lg-2,.my-lg-2{margin-bottom:.5rem!important}.ml-lg-2,.mx-lg-2{margin-left:.5rem!important}.m-lg-3{margin:1rem!important}.mt-lg-3,.my-lg-3{margin-top:1rem!important}.mr-lg-3,.mx-lg-3{margin-right:1rem!important}.mb-lg-3,.my-lg-3{margin-bottom:1rem!important}.ml-lg-3,.mx-lg-3{margin-left:1rem!important}.m-lg-4{margin:1.5rem!important}.mt-lg-4,.my-lg-4{margin-top:1.5rem!important}.mr-lg-4,.mx-lg-4{margin-right:1.5rem!important}.mb-lg-4,.my-lg-4{margin-bottom:1.5rem!important}.ml-lg-4,.mx-lg-4{margin-left:1.5rem!important}.m-lg-5{margin:3rem!important}.mt-lg-5,.my-lg-5{margin-top:3rem!important}.mr-lg-5,.mx-lg-5{margin-right:3rem!important}.mb-lg-5,.my-lg-5{margin-bottom:3rem!important}.ml-lg-5,.mx-lg-5{margin-left:3rem!important}.p-lg-0{padding:0!important}.pt-lg-0,.py-lg-0{padding-top:0!important}.pr-lg-0,.px-lg-0{padding-right:0!important}.pb-lg-0,.py-lg-0{padding-bottom:0!important}.pl-lg-0,.px-lg-0{padding-left:0!important}.p-lg-1{padding:.25rem!important}.pt-lg-1,.py-lg-1{padding-top:.25rem!important}.pr-lg-1,.px-lg-1{padding-right:.25rem!important}.pb-lg-1,.py-lg-1{padding-bottom:.25rem!important}.pl-lg-1,.px-lg-1{padding-left:.25rem!important}.p-lg-2{padding:.5rem!important}.pt-lg-2,.py-lg-2{padding-top:.5rem!important}.pr-lg-2,.px-lg-2{padding-right:.5rem!important}.pb-lg-2,.py-lg-2{padding-bottom:.5rem!important}.pl-lg-2,.px-lg-2{padding-left:.5rem!important}.p-lg-3{padding:1rem!important}.pt-lg-3,.py-lg-3{padding-top:1rem!important}.pr-lg-3,.px-lg-3{padding-right:1rem!important}.pb-lg-3,.py-lg-3{padding-bottom:1rem!important}.pl-lg-3,.px-lg-3{padding-left:1rem!important}.p-lg-4{padding:1.5rem!important}.pt-lg-4,.py-lg-4{padding-top:1.5rem!important}.pr-lg-4,.px-lg-4{padding-right:1.5rem!important}.pb-lg-4,.py-lg-4{padding-bottom:1.5rem!important}.pl-lg-4,.px-lg-4{padding-left:1.5rem!important}.p-lg-5{padding:3rem!important}.pt-lg-5,.py-lg-5{padding-top:3rem!important}.pr-lg-5,.px-lg-5{padding-right:3rem!important}.pb-lg-5,.py-lg-5{padding-bottom:3rem!important}.pl-lg-5,.px-lg-5{padding-left:3rem!important}.m-lg-auto{margin:auto!important}.mt-lg-auto,.my-lg-auto{margin-top:auto!important}.mr-lg-auto,.mx-lg-auto{margin-right:auto!important}.mb-lg-auto,.my-lg-auto{margin-bottom:auto!important}.ml-lg-auto,.mx-lg-auto{margin-left:auto!important}}@media(min-width:1200px){.m-xl-0{margin:0!important}.mt-xl-0,.my-xl-0{margin-top:0!important}.mr-xl-0,.mx-xl-0{margin-right:0!important}.mb-xl-0,.my-xl-0{margin-bottom:0!important}.ml-xl-0,.mx-xl-0{margin-left:0!important}.m-xl-1{margin:.25rem!important}.mt-xl-1,.my-xl-1{margin-top:.25rem!important}.mr-xl-1,.mx-xl-1{margin-right:.25rem!important}.mb-xl-1,.my-xl-1{margin-bottom:.25rem!important}.ml-xl-1,.mx-xl-1{margin-left:.25rem!important}.m-xl-2{margin:.5rem!important}.mt-xl-2,.my-xl-2{margin-top:.5rem!important}.mr-xl-2,.mx-xl-2{margin-right:.5rem!important}.mb-xl-2,.my-xl-2{margin-bottom:.5rem!important}.ml-xl-2,.mx-xl-2{margin-left:.5rem!important}.m-xl-3{margin:1rem!important}.mt-xl-3,.my-xl-3{margin-top:1rem!important}.mr-xl-3,.mx-xl-3{margin-right:1rem!important}.mb-xl-3,.my-xl-3{margin-bottom:1rem!important}.ml-xl-3,.mx-xl-3{margin-left:1rem!important}.m-xl-4{margin:1.5rem!important}.mt-xl-4,.my-xl-4{margin-top:1.5rem!important}.mr-xl-4,.mx-xl-4{margin-right:1.5rem!important}.mb-xl-4,.my-xl-4{margin-bottom:1.5rem!important}.ml-xl-4,.mx-xl-4{margin-left:1.5rem!important}.m-xl-5{margin:3rem!important}.mt-xl-5,.my-xl-5{margin-top:3rem!important}.mr-xl-5,.mx-xl-5{margin-right:3rem!important}.mb-xl-5,.my-xl-5{margin-bottom:3rem!important}.ml-xl-5,.mx-xl-5{margin-left:3rem!important}.p-xl-0{padding:0!important}.pt-xl-0,.py-xl-0{padding-top:0!important}.pr-xl-0,.px-xl-0{padding-right:0!important}.pb-xl-0,.py-xl-0{padding-bottom:0!important}.pl-xl-0,.px-xl-0{padding-left:0!important}.p-xl-1{padding:.25rem!important}.pt-xl-1,.py-xl-1{padding-top:.25rem!important}.pr-xl-1,.px-xl-1{padding-right:.25rem!important}.pb-xl-1,.py-xl-1{padding-bottom:.25rem!important}.pl-xl-1,.px-xl-1{padding-left:.25rem!important}.p-xl-2{padding:.5rem!important}.pt-xl-2,.py-xl-2{padding-top:.5rem!important}.pr-xl-2,.px-xl-2{padding-right:.5rem!important}.pb-xl-2,.py-xl-2{padding-bottom:.5rem!important}.pl-xl-2,.px-xl-2{padding-left:.5rem!important}.p-xl-3{padding:1rem!important}.pt-xl-3,.py-xl-3{padding-top:1rem!important}.pr-xl-3,.px-xl-3{padding-right:1rem!important}.pb-xl-3,.py-xl-3{padding-bottom:1rem!important}.pl-xl-3,.px-xl-3{padding-left:1rem!important}.p-xl-4{padding:1.5rem!important}.pt-xl-4,.py-xl-4{padding-top:1.5rem!important}.pr-xl-4,.px-xl-4{padding-right:1.5rem!important}.pb-xl-4,.py-xl-4{padding-bottom:1.5rem!important}.pl-xl-4,.px-xl-4{padding-left:1.5rem!important}.p-xl-5{padding:3rem!important}.pt-xl-5,.py-xl-5{padding-top:3rem!important}.pr-xl-5,.px-xl-5{padding-right:3rem!important}.pb-xl-5,.py-xl-5{padding-bottom:3rem!important}.pl-xl-5,.px-xl-5{padding-left:3rem!important}.m-xl-auto{margin:auto!important}.mt-xl-auto,.my-xl-auto{margin-top:auto!important}.mr-xl-auto,.mx-xl-auto{margin-right:auto!important}.mb-xl-auto,.my-xl-auto{margin-bottom:auto!important}.ml-xl-auto,.mx-xl-auto{margin-left:auto!important}}.text-monospace{font-family:SFMono-Regular,Menlo,Monaco,Consolas,liberation mono,courier new,monospace}.text-justify{text-align:justify!important}.text-nowrap{white-space:nowrap!important}.text-truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.text-left{text-align:left!important}.text-right{text-align:right!important}.text-center{text-align:center!important}@media(min-width:576px){.text-sm-left{text-align:left!important}.text-sm-right{text-align:right!important}.text-sm-center{text-align:center!important}}@media(min-width:768px){.text-md-left{text-align:left!important}.text-md-right{text-align:right!important}.text-md-center{text-align:center!important}}@media(min-width:992px){.text-lg-left{text-align:left!important}.text-lg-right{text-align:right!important}.text-lg-center{text-align:center!important}}@media(min-width:1200px){.text-xl-left{text-align:left!important}.text-xl-right{text-align:right!important}.text-xl-center{text-align:center!important}}.text-lowercase{text-transform:lowercase!important}.text-uppercase{text-transform:uppercase!important}.text-capitalize{text-transform:capitalize!important}.font-weight-light{font-weight:300!important}.font-weight-normal{font-weight:400!important}.font-weight-bold{font-weight:700!important}.font-italic{font-style:italic!important}.text-white{color:#fff!important}.text-primary{color:#1ea149!important}a.text-primary:hover,a.text-primary:focus{color:#167636!important}.text-secondary{color:#ffa630!important}a.text-secondary:hover,a.text-secondary:focus{color:#fc9000!important}.text-success{color:#3772ff!important}a.text-success:hover,a.text-success:focus{color:#044eff!important}.text-info{color:#c0e0de!important}a.text-info:hover,a.text-info:focus{color:#9ecfcc!important}.text-warning{color:#ed6a5a!important}a.text-warning:hover,a.text-warning:focus{color:#e8402c!important}.text-danger{color:#ed6a5a!important}a.text-danger:hover,a.text-danger:focus{color:#e8402c!important}.text-light{color:#d3f3ee!important}a.text-light:hover,a.text-light:focus{color:#abe8df!important}.text-dark{color:#403f4c!important}a.text-dark:hover,a.text-dark:focus{color:#292830!important}.text-body{color:#222!important}.text-muted{color:#888!important}.text-black-50{color:rgba(0,0,0,.5)!important}.text-white-50{color:rgba(255,255,255,.5)!important}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.visible{visibility:visible!important}.invisible{visibility:hidden!important}@media print{*,*::before,*::after{text-shadow:none!important;-webkit-box-shadow:none!important;box-shadow:none!important}a:not(.btn){text-decoration:underline}abbr[title]::after{content:" (" attr(title)")"}pre{white-space:pre-wrap!important}pre,blockquote{border:1px solid #adb5bd;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}p,h2,h3{orphans:3;widows:3}h2,h3{page-break-after:avoid}@page{size:a3}body{min-width:992px!important}.container{min-width:992px!important}.navbar{display:none}.badge{border:1px solid #000}.table,.td-box .row.section>table,.td-content>table{border-collapse:collapse!important}.table td,.td-box .row.section>table td,.td-content>table td,.table th,.td-box .row.section>table th,.td-content>table th{background-color:#fff!important}.table-bordered th,.table-bordered td{border:1px solid #dee2e6!important}.table-dark{color:inherit}.table-dark th,.table-dark td,.table-dark thead th,.table-dark tbody+tbody{border-color:#dee2e6}.table .thead-dark th,.td-box .row.section>table .thead-dark th,.td-content>table .thead-dark th{color:inherit;border-color:#dee2e6}}/*!* Font Awesome Free 5.1.1 by @fontawesome - https://fontawesome.com -* License - https://fontawesome.com/license (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)*/.fa,.fas,.far,.fal,.fab{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:inline-block;font-style:normal;font-variant:normal;text-rendering:auto;line-height:1}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-.0667em}.fa-xs{font-size:.75em}.fa-sm{font-size:.875em}.fa-1x{font-size:1em}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-6x{font-size:6em}.fa-7x{font-size:7em}.fa-8x{font-size:8em}.fa-9x{font-size:9em}.fa-10x{font-size:10em}.fa-fw{text-align:center;width:1.25em}.fa-ul{list-style-type:none;margin-left:2.5em;padding-left:0}.fa-ul>li{position:relative}.fa-li{left:-2em;position:absolute;text-align:center;width:2em;line-height:inherit}.fa-border{border:solid .08em #eee;border-radius:.1em;padding:.2em .25em .15em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left,.fas.fa-pull-left,.far.fa-pull-left,.fal.fa-pull-left,.fab.fa-pull-left{margin-right:.3em}.fa.fa-pull-right,.fas.fa-pull-right,.far.fa-pull-right,.fal.fa-pull-right,.fab.fa-pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;-o-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);-o-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-o-keyframes fa-spin{0%{-o-transform:rotate(0deg);transform:rotate(0deg)}100%{-o-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);-o-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg);-o-transform:rotate(360deg);transform:rotate(360deg)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);-o-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);-o-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";-webkit-transform:scale(-1,1);-ms-transform:scale(-1,1);-o-transform:scale(-1,1);transform:scale(-1,1)}.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";-webkit-transform:scale(1,-1);-ms-transform:scale(1,-1);-o-transform:scale(1,-1);transform:scale(1,-1)}.fa-flip-horizontal.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";-webkit-transform:scale(-1,-1);-ms-transform:scale(-1,-1);-o-transform:scale(-1,-1);transform:scale(-1,-1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{-webkit-filter:none;filter:none}.fa-stack{display:inline-block;height:2em;line-height:2em;position:relative;vertical-align:middle;width:2em}.fa-stack-1x,.fa-stack-2x{left:0;position:absolute;text-align:center;width:100%}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-500px:before{content:"\f26e"}.fa-accessible-icon:before{content:"\f368"}.fa-accusoft:before{content:"\f369"}.fa-address-book:before{content:"\f2b9"}.fa-address-card:before{content:"\f2bb"}.fa-adjust:before{content:"\f042"}.fa-adn:before{content:"\f170"}.fa-adversal:before{content:"\f36a"}.fa-affiliatetheme:before{content:"\f36b"}.fa-algolia:before{content:"\f36c"}.fa-align-center:before{content:"\f037"}.fa-align-justify:before{content:"\f039"}.fa-align-left:before{content:"\f036"}.fa-align-right:before{content:"\f038"}.fa-allergies:before{content:"\f461"}.fa-amazon:before{content:"\f270"}.fa-amazon-pay:before{content:"\f42c"}.fa-ambulance:before{content:"\f0f9"}.fa-american-sign-language-interpreting:before{content:"\f2a3"}.fa-amilia:before{content:"\f36d"}.fa-anchor:before{content:"\f13d"}.fa-android:before{content:"\f17b"}.fa-angellist:before{content:"\f209"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-down:before{content:"\f107"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angry:before{content:"\f556"}.fa-angrycreative:before{content:"\f36e"}.fa-angular:before{content:"\f420"}.fa-app-store:before{content:"\f36f"}.fa-app-store-ios:before{content:"\f370"}.fa-apper:before{content:"\f371"}.fa-apple:before{content:"\f179"}.fa-apple-pay:before{content:"\f415"}.fa-archive:before{content:"\f187"}.fa-archway:before{content:"\f557"}.fa-arrow-alt-circle-down:before{content:"\f358"}.fa-arrow-alt-circle-left:before{content:"\f359"}.fa-arrow-alt-circle-right:before{content:"\f35a"}.fa-arrow-alt-circle-up:before{content:"\f35b"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-down:before{content:"\f063"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrows-alt:before{content:"\f0b2"}.fa-arrows-alt-h:before{content:"\f337"}.fa-arrows-alt-v:before{content:"\f338"}.fa-assistive-listening-systems:before{content:"\f2a2"}.fa-asterisk:before{content:"\f069"}.fa-asymmetrik:before{content:"\f372"}.fa-at:before{content:"\f1fa"}.fa-atlas:before{content:"\f558"}.fa-audible:before{content:"\f373"}.fa-audio-description:before{content:"\f29e"}.fa-autoprefixer:before{content:"\f41c"}.fa-avianex:before{content:"\f374"}.fa-aviato:before{content:"\f421"}.fa-award:before{content:"\f559"}.fa-aws:before{content:"\f375"}.fa-backspace:before{content:"\f55a"}.fa-backward:before{content:"\f04a"}.fa-balance-scale:before{content:"\f24e"}.fa-ban:before{content:"\f05e"}.fa-band-aid:before{content:"\f462"}.fa-bandcamp:before{content:"\f2d5"}.fa-barcode:before{content:"\f02a"}.fa-bars:before{content:"\f0c9"}.fa-baseball-ball:before{content:"\f433"}.fa-basketball-ball:before{content:"\f434"}.fa-bath:before{content:"\f2cd"}.fa-battery-empty:before{content:"\f244"}.fa-battery-full:before{content:"\f240"}.fa-battery-half:before{content:"\f242"}.fa-battery-quarter:before{content:"\f243"}.fa-battery-three-quarters:before{content:"\f241"}.fa-bed:before{content:"\f236"}.fa-beer:before{content:"\f0fc"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-bell:before{content:"\f0f3"}.fa-bell-slash:before{content:"\f1f6"}.fa-bezier-curve:before{content:"\f55b"}.fa-bicycle:before{content:"\f206"}.fa-bimobject:before{content:"\f378"}.fa-binoculars:before{content:"\f1e5"}.fa-birthday-cake:before{content:"\f1fd"}.fa-bitbucket:before{content:"\f171"}.fa-bitcoin:before{content:"\f379"}.fa-bity:before{content:"\f37a"}.fa-black-tie:before{content:"\f27e"}.fa-blackberry:before{content:"\f37b"}.fa-blender:before{content:"\f517"}.fa-blind:before{content:"\f29d"}.fa-blogger:before{content:"\f37c"}.fa-blogger-b:before{content:"\f37d"}.fa-bluetooth:before{content:"\f293"}.fa-bluetooth-b:before{content:"\f294"}.fa-bold:before{content:"\f032"}.fa-bolt:before{content:"\f0e7"}.fa-bomb:before{content:"\f1e2"}.fa-bong:before{content:"\f55c"}.fa-book:before{content:"\f02d"}.fa-book-open:before{content:"\f518"}.fa-bookmark:before{content:"\f02e"}.fa-bowling-ball:before{content:"\f436"}.fa-box:before{content:"\f466"}.fa-box-open:before{content:"\f49e"}.fa-boxes:before{content:"\f468"}.fa-braille:before{content:"\f2a1"}.fa-briefcase:before{content:"\f0b1"}.fa-briefcase-medical:before{content:"\f469"}.fa-broadcast-tower:before{content:"\f519"}.fa-broom:before{content:"\f51a"}.fa-brush:before{content:"\f55d"}.fa-btc:before{content:"\f15a"}.fa-bug:before{content:"\f188"}.fa-building:before{content:"\f1ad"}.fa-bullhorn:before{content:"\f0a1"}.fa-bullseye:before{content:"\f140"}.fa-burn:before{content:"\f46a"}.fa-buromobelexperte:before{content:"\f37f"}.fa-bus:before{content:"\f207"}.fa-bus-alt:before{content:"\f55e"}.fa-buysellads:before{content:"\f20d"}.fa-calculator:before{content:"\f1ec"}.fa-calendar:before{content:"\f133"}.fa-calendar-alt:before{content:"\f073"}.fa-calendar-check:before{content:"\f274"}.fa-calendar-minus:before{content:"\f272"}.fa-calendar-plus:before{content:"\f271"}.fa-calendar-times:before{content:"\f273"}.fa-camera:before{content:"\f030"}.fa-camera-retro:before{content:"\f083"}.fa-cannabis:before{content:"\f55f"}.fa-capsules:before{content:"\f46b"}.fa-car:before{content:"\f1b9"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-caret-square-down:before{content:"\f150"}.fa-caret-square-left:before{content:"\f191"}.fa-caret-square-right:before{content:"\f152"}.fa-caret-square-up:before{content:"\f151"}.fa-caret-up:before{content:"\f0d8"}.fa-cart-arrow-down:before{content:"\f218"}.fa-cart-plus:before{content:"\f217"}.fa-cc-amazon-pay:before{content:"\f42d"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-apple-pay:before{content:"\f416"}.fa-cc-diners-club:before{content:"\f24c"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-jcb:before{content:"\f24b"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-cc-visa:before{content:"\f1f0"}.fa-centercode:before{content:"\f380"}.fa-certificate:before{content:"\f0a3"}.fa-chalkboard:before{content:"\f51b"}.fa-chalkboard-teacher:before{content:"\f51c"}.fa-chart-area:before{content:"\f1fe"}.fa-chart-bar:before{content:"\f080"}.fa-chart-line:before{content:"\f201"}.fa-chart-pie:before{content:"\f200"}.fa-check:before{content:"\f00c"}.fa-check-circle:before{content:"\f058"}.fa-check-double:before{content:"\f560"}.fa-check-square:before{content:"\f14a"}.fa-chess:before{content:"\f439"}.fa-chess-bishop:before{content:"\f43a"}.fa-chess-board:before{content:"\f43c"}.fa-chess-king:before{content:"\f43f"}.fa-chess-knight:before{content:"\f441"}.fa-chess-pawn:before{content:"\f443"}.fa-chess-queen:before{content:"\f445"}.fa-chess-rook:before{content:"\f447"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-down:before{content:"\f078"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-chevron-up:before{content:"\f077"}.fa-child:before{content:"\f1ae"}.fa-chrome:before{content:"\f268"}.fa-church:before{content:"\f51d"}.fa-circle:before{content:"\f111"}.fa-circle-notch:before{content:"\f1ce"}.fa-clipboard:before{content:"\f328"}.fa-clipboard-check:before{content:"\f46c"}.fa-clipboard-list:before{content:"\f46d"}.fa-clock:before{content:"\f017"}.fa-clone:before{content:"\f24d"}.fa-closed-captioning:before{content:"\f20a"}.fa-cloud:before{content:"\f0c2"}.fa-cloud-download-alt:before{content:"\f381"}.fa-cloud-upload-alt:before{content:"\f382"}.fa-cloudscale:before{content:"\f383"}.fa-cloudsmith:before{content:"\f384"}.fa-cloudversify:before{content:"\f385"}.fa-cocktail:before{content:"\f561"}.fa-code:before{content:"\f121"}.fa-code-branch:before{content:"\f126"}.fa-codepen:before{content:"\f1cb"}.fa-codiepie:before{content:"\f284"}.fa-coffee:before{content:"\f0f4"}.fa-cog:before{content:"\f013"}.fa-cogs:before{content:"\f085"}.fa-coins:before{content:"\f51e"}.fa-columns:before{content:"\f0db"}.fa-comment:before{content:"\f075"}.fa-comment-alt:before{content:"\f27a"}.fa-comment-dots:before{content:"\f4ad"}.fa-comment-slash:before{content:"\f4b3"}.fa-comments:before{content:"\f086"}.fa-compact-disc:before{content:"\f51f"}.fa-compass:before{content:"\f14e"}.fa-compress:before{content:"\f066"}.fa-concierge-bell:before{content:"\f562"}.fa-connectdevelop:before{content:"\f20e"}.fa-contao:before{content:"\f26d"}.fa-cookie:before{content:"\f563"}.fa-cookie-bite:before{content:"\f564"}.fa-copy:before{content:"\f0c5"}.fa-copyright:before{content:"\f1f9"}.fa-couch:before{content:"\f4b8"}.fa-cpanel:before{content:"\f388"}.fa-creative-commons:before{content:"\f25e"}.fa-creative-commons-by:before{content:"\f4e7"}.fa-creative-commons-nc:before{content:"\f4e8"}.fa-creative-commons-nc-eu:before{content:"\f4e9"}.fa-creative-commons-nc-jp:before{content:"\f4ea"}.fa-creative-commons-nd:before{content:"\f4eb"}.fa-creative-commons-pd:before{content:"\f4ec"}.fa-creative-commons-pd-alt:before{content:"\f4ed"}.fa-creative-commons-remix:before{content:"\f4ee"}.fa-creative-commons-sa:before{content:"\f4ef"}.fa-creative-commons-sampling:before{content:"\f4f0"}.fa-creative-commons-sampling-plus:before{content:"\f4f1"}.fa-creative-commons-share:before{content:"\f4f2"}.fa-credit-card:before{content:"\f09d"}.fa-crop:before{content:"\f125"}.fa-crop-alt:before{content:"\f565"}.fa-crosshairs:before{content:"\f05b"}.fa-crow:before{content:"\f520"}.fa-crown:before{content:"\f521"}.fa-css3:before{content:"\f13c"}.fa-css3-alt:before{content:"\f38b"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-cut:before{content:"\f0c4"}.fa-cuttlefish:before{content:"\f38c"}.fa-d-and-d:before{content:"\f38d"}.fa-dashcube:before{content:"\f210"}.fa-database:before{content:"\f1c0"}.fa-deaf:before{content:"\f2a4"}.fa-delicious:before{content:"\f1a5"}.fa-deploydog:before{content:"\f38e"}.fa-deskpro:before{content:"\f38f"}.fa-desktop:before{content:"\f108"}.fa-deviantart:before{content:"\f1bd"}.fa-diagnoses:before{content:"\f470"}.fa-dice:before{content:"\f522"}.fa-dice-five:before{content:"\f523"}.fa-dice-four:before{content:"\f524"}.fa-dice-one:before{content:"\f525"}.fa-dice-six:before{content:"\f526"}.fa-dice-three:before{content:"\f527"}.fa-dice-two:before{content:"\f528"}.fa-digg:before{content:"\f1a6"}.fa-digital-ocean:before{content:"\f391"}.fa-digital-tachograph:before{content:"\f566"}.fa-discord:before{content:"\f392"}.fa-discourse:before{content:"\f393"}.fa-divide:before{content:"\f529"}.fa-dizzy:before{content:"\f567"}.fa-dna:before{content:"\f471"}.fa-dochub:before{content:"\f394"}.fa-docker:before{content:"\f395"}.fa-dollar-sign:before{content:"\f155"}.fa-dolly:before{content:"\f472"}.fa-dolly-flatbed:before{content:"\f474"}.fa-donate:before{content:"\f4b9"}.fa-door-closed:before{content:"\f52a"}.fa-door-open:before{content:"\f52b"}.fa-dot-circle:before{content:"\f192"}.fa-dove:before{content:"\f4ba"}.fa-download:before{content:"\f019"}.fa-draft2digital:before{content:"\f396"}.fa-drafting-compass:before{content:"\f568"}.fa-dribbble:before{content:"\f17d"}.fa-dribbble-square:before{content:"\f397"}.fa-dropbox:before{content:"\f16b"}.fa-drum:before{content:"\f569"}.fa-drum-steelpan:before{content:"\f56a"}.fa-drupal:before{content:"\f1a9"}.fa-dumbbell:before{content:"\f44b"}.fa-dyalog:before{content:"\f399"}.fa-earlybirds:before{content:"\f39a"}.fa-ebay:before{content:"\f4f4"}.fa-edge:before{content:"\f282"}.fa-edit:before{content:"\f044"}.fa-eject:before{content:"\f052"}.fa-elementor:before{content:"\f430"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-ember:before{content:"\f423"}.fa-empire:before{content:"\f1d1"}.fa-envelope:before{content:"\f0e0"}.fa-envelope-open:before{content:"\f2b6"}.fa-envelope-square:before{content:"\f199"}.fa-envira:before{content:"\f299"}.fa-equals:before{content:"\f52c"}.fa-eraser:before{content:"\f12d"}.fa-erlang:before{content:"\f39d"}.fa-ethereum:before{content:"\f42e"}.fa-etsy:before{content:"\f2d7"}.fa-euro-sign:before{content:"\f153"}.fa-exchange-alt:before{content:"\f362"}.fa-exclamation:before{content:"\f12a"}.fa-exclamation-circle:before{content:"\f06a"}.fa-exclamation-triangle:before{content:"\f071"}.fa-expand:before{content:"\f065"}.fa-expand-arrows-alt:before{content:"\f31e"}.fa-expeditedssl:before{content:"\f23e"}.fa-external-link-alt:before{content:"\f35d"}.fa-external-link-square-alt:before{content:"\f360"}.fa-eye:before{content:"\f06e"}.fa-eye-dropper:before{content:"\f1fb"}.fa-eye-slash:before{content:"\f070"}.fa-facebook:before{content:"\f09a"}.fa-facebook-f:before{content:"\f39e"}.fa-facebook-messenger:before{content:"\f39f"}.fa-facebook-square:before{content:"\f082"}.fa-fast-backward:before{content:"\f049"}.fa-fast-forward:before{content:"\f050"}.fa-fax:before{content:"\f1ac"}.fa-feather:before{content:"\f52d"}.fa-feather-alt:before{content:"\f56b"}.fa-female:before{content:"\f182"}.fa-fighter-jet:before{content:"\f0fb"}.fa-file:before{content:"\f15b"}.fa-file-alt:before{content:"\f15c"}.fa-file-archive:before{content:"\f1c6"}.fa-file-audio:before{content:"\f1c7"}.fa-file-code:before{content:"\f1c9"}.fa-file-contract:before{content:"\f56c"}.fa-file-download:before{content:"\f56d"}.fa-file-excel:before{content:"\f1c3"}.fa-file-export:before{content:"\f56e"}.fa-file-image:before{content:"\f1c5"}.fa-file-import:before{content:"\f56f"}.fa-file-invoice:before{content:"\f570"}.fa-file-invoice-dollar:before{content:"\f571"}.fa-file-medical:before{content:"\f477"}.fa-file-medical-alt:before{content:"\f478"}.fa-file-pdf:before{content:"\f1c1"}.fa-file-powerpoint:before{content:"\f1c4"}.fa-file-prescription:before{content:"\f572"}.fa-file-signature:before{content:"\f573"}.fa-file-upload:before{content:"\f574"}.fa-file-video:before{content:"\f1c8"}.fa-file-word:before{content:"\f1c2"}.fa-fill:before{content:"\f575"}.fa-fill-drip:before{content:"\f576"}.fa-film:before{content:"\f008"}.fa-filter:before{content:"\f0b0"}.fa-fingerprint:before{content:"\f577"}.fa-fire:before{content:"\f06d"}.fa-fire-extinguisher:before{content:"\f134"}.fa-firefox:before{content:"\f269"}.fa-first-aid:before{content:"\f479"}.fa-first-order:before{content:"\f2b0"}.fa-first-order-alt:before{content:"\f50a"}.fa-firstdraft:before{content:"\f3a1"}.fa-fish:before{content:"\f578"}.fa-flag:before{content:"\f024"}.fa-flag-checkered:before{content:"\f11e"}.fa-flask:before{content:"\f0c3"}.fa-flickr:before{content:"\f16e"}.fa-flipboard:before{content:"\f44d"}.fa-flushed:before{content:"\f579"}.fa-fly:before{content:"\f417"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-font:before{content:"\f031"}.fa-font-awesome:before{content:"\f2b4"}.fa-font-awesome-alt:before{content:"\f35c"}.fa-font-awesome-flag:before{content:"\f425"}.fa-font-awesome-logo-full:before{content:"\f4e6"}.fa-fonticons:before{content:"\f280"}.fa-fonticons-fi:before{content:"\f3a2"}.fa-football-ball:before{content:"\f44e"}.fa-fort-awesome:before{content:"\f286"}.fa-fort-awesome-alt:before{content:"\f3a3"}.fa-forumbee:before{content:"\f211"}.fa-forward:before{content:"\f04e"}.fa-foursquare:before{content:"\f180"}.fa-free-code-camp:before{content:"\f2c5"}.fa-freebsd:before{content:"\f3a4"}.fa-frog:before{content:"\f52e"}.fa-frown:before{content:"\f119"}.fa-frown-open:before{content:"\f57a"}.fa-fulcrum:before{content:"\f50b"}.fa-futbol:before{content:"\f1e3"}.fa-galactic-republic:before{content:"\f50c"}.fa-galactic-senate:before{content:"\f50d"}.fa-gamepad:before{content:"\f11b"}.fa-gas-pump:before{content:"\f52f"}.fa-gavel:before{content:"\f0e3"}.fa-gem:before{content:"\f3a5"}.fa-genderless:before{content:"\f22d"}.fa-get-pocket:before{content:"\f265"}.fa-gg:before{content:"\f260"}.fa-gg-circle:before{content:"\f261"}.fa-gift:before{content:"\f06b"}.fa-git:before{content:"\f1d3"}.fa-git-square:before{content:"\f1d2"}.fa-github:before{content:"\f09b"}.fa-github-alt:before{content:"\f113"}.fa-github-square:before{content:"\f092"}.fa-gitkraken:before{content:"\f3a6"}.fa-gitlab:before{content:"\f296"}.fa-gitter:before{content:"\f426"}.fa-glass-martini:before{content:"\f000"}.fa-glass-martini-alt:before{content:"\f57b"}.fa-glasses:before{content:"\f530"}.fa-glide:before{content:"\f2a5"}.fa-glide-g:before{content:"\f2a6"}.fa-globe:before{content:"\f0ac"}.fa-globe-africa:before{content:"\f57c"}.fa-globe-americas:before{content:"\f57d"}.fa-globe-asia:before{content:"\f57e"}.fa-gofore:before{content:"\f3a7"}.fa-golf-ball:before{content:"\f450"}.fa-goodreads:before{content:"\f3a8"}.fa-goodreads-g:before{content:"\f3a9"}.fa-google:before{content:"\f1a0"}.fa-google-drive:before{content:"\f3aa"}.fa-google-play:before{content:"\f3ab"}.fa-google-plus:before{content:"\f2b3"}.fa-google-plus-g:before{content:"\f0d5"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-wallet:before{content:"\f1ee"}.fa-graduation-cap:before{content:"\f19d"}.fa-gratipay:before{content:"\f184"}.fa-grav:before{content:"\f2d6"}.fa-greater-than:before{content:"\f531"}.fa-greater-than-equal:before{content:"\f532"}.fa-grimace:before{content:"\f57f"}.fa-grin:before{content:"\f580"}.fa-grin-alt:before{content:"\f581"}.fa-grin-beam:before{content:"\f582"}.fa-grin-beam-sweat:before{content:"\f583"}.fa-grin-hearts:before{content:"\f584"}.fa-grin-squint:before{content:"\f585"}.fa-grin-squint-tears:before{content:"\f586"}.fa-grin-stars:before{content:"\f587"}.fa-grin-tears:before{content:"\f588"}.fa-grin-tongue:before{content:"\f589"}.fa-grin-tongue-squint:before{content:"\f58a"}.fa-grin-tongue-wink:before{content:"\f58b"}.fa-grin-wink:before{content:"\f58c"}.fa-grip-horizontal:before{content:"\f58d"}.fa-grip-vertical:before{content:"\f58e"}.fa-gripfire:before{content:"\f3ac"}.fa-grunt:before{content:"\f3ad"}.fa-gulp:before{content:"\f3ae"}.fa-h-square:before{content:"\f0fd"}.fa-hacker-news:before{content:"\f1d4"}.fa-hacker-news-square:before{content:"\f3af"}.fa-hand-holding:before{content:"\f4bd"}.fa-hand-holding-heart:before{content:"\f4be"}.fa-hand-holding-usd:before{content:"\f4c0"}.fa-hand-lizard:before{content:"\f258"}.fa-hand-paper:before{content:"\f256"}.fa-hand-peace:before{content:"\f25b"}.fa-hand-point-down:before{content:"\f0a7"}.fa-hand-point-left:before{content:"\f0a5"}.fa-hand-point-right:before{content:"\f0a4"}.fa-hand-point-up:before{content:"\f0a6"}.fa-hand-pointer:before{content:"\f25a"}.fa-hand-rock:before{content:"\f255"}.fa-hand-scissors:before{content:"\f257"}.fa-hand-spock:before{content:"\f259"}.fa-hands:before{content:"\f4c2"}.fa-hands-helping:before{content:"\f4c4"}.fa-handshake:before{content:"\f2b5"}.fa-hashtag:before{content:"\f292"}.fa-hdd:before{content:"\f0a0"}.fa-heading:before{content:"\f1dc"}.fa-headphones:before{content:"\f025"}.fa-headphones-alt:before{content:"\f58f"}.fa-headset:before{content:"\f590"}.fa-heart:before{content:"\f004"}.fa-heartbeat:before{content:"\f21e"}.fa-helicopter:before{content:"\f533"}.fa-highlighter:before{content:"\f591"}.fa-hips:before{content:"\f452"}.fa-hire-a-helper:before{content:"\f3b0"}.fa-history:before{content:"\f1da"}.fa-hockey-puck:before{content:"\f453"}.fa-home:before{content:"\f015"}.fa-hooli:before{content:"\f427"}.fa-hornbill:before{content:"\f592"}.fa-hospital:before{content:"\f0f8"}.fa-hospital-alt:before{content:"\f47d"}.fa-hospital-symbol:before{content:"\f47e"}.fa-hot-tub:before{content:"\f593"}.fa-hotel:before{content:"\f594"}.fa-hotjar:before{content:"\f3b1"}.fa-hourglass:before{content:"\f254"}.fa-hourglass-end:before{content:"\f253"}.fa-hourglass-half:before{content:"\f252"}.fa-hourglass-start:before{content:"\f251"}.fa-houzz:before{content:"\f27c"}.fa-html5:before{content:"\f13b"}.fa-hubspot:before{content:"\f3b2"}.fa-i-cursor:before{content:"\f246"}.fa-id-badge:before{content:"\f2c1"}.fa-id-card:before{content:"\f2c2"}.fa-id-card-alt:before{content:"\f47f"}.fa-image:before{content:"\f03e"}.fa-images:before{content:"\f302"}.fa-imdb:before{content:"\f2d8"}.fa-inbox:before{content:"\f01c"}.fa-indent:before{content:"\f03c"}.fa-industry:before{content:"\f275"}.fa-infinity:before{content:"\f534"}.fa-info:before{content:"\f129"}.fa-info-circle:before{content:"\f05a"}.fa-instagram:before{content:"\f16d"}.fa-internet-explorer:before{content:"\f26b"}.fa-ioxhost:before{content:"\f208"}.fa-italic:before{content:"\f033"}.fa-itunes:before{content:"\f3b4"}.fa-itunes-note:before{content:"\f3b5"}.fa-java:before{content:"\f4e4"}.fa-jedi-order:before{content:"\f50e"}.fa-jenkins:before{content:"\f3b6"}.fa-joget:before{content:"\f3b7"}.fa-joint:before{content:"\f595"}.fa-joomla:before{content:"\f1aa"}.fa-js:before{content:"\f3b8"}.fa-js-square:before{content:"\f3b9"}.fa-jsfiddle:before{content:"\f1cc"}.fa-key:before{content:"\f084"}.fa-keybase:before{content:"\f4f5"}.fa-keyboard:before{content:"\f11c"}.fa-keycdn:before{content:"\f3ba"}.fa-kickstarter:before{content:"\f3bb"}.fa-kickstarter-k:before{content:"\f3bc"}.fa-kiss:before{content:"\f596"}.fa-kiss-beam:before{content:"\f597"}.fa-kiss-wink-heart:before{content:"\f598"}.fa-kiwi-bird:before{content:"\f535"}.fa-korvue:before{content:"\f42f"}.fa-language:before{content:"\f1ab"}.fa-laptop:before{content:"\f109"}.fa-laravel:before{content:"\f3bd"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-laugh:before{content:"\f599"}.fa-laugh-beam:before{content:"\f59a"}.fa-laugh-squint:before{content:"\f59b"}.fa-laugh-wink:before{content:"\f59c"}.fa-leaf:before{content:"\f06c"}.fa-leanpub:before{content:"\f212"}.fa-lemon:before{content:"\f094"}.fa-less:before{content:"\f41d"}.fa-less-than:before{content:"\f536"}.fa-less-than-equal:before{content:"\f537"}.fa-level-down-alt:before{content:"\f3be"}.fa-level-up-alt:before{content:"\f3bf"}.fa-life-ring:before{content:"\f1cd"}.fa-lightbulb:before{content:"\f0eb"}.fa-line:before{content:"\f3c0"}.fa-link:before{content:"\f0c1"}.fa-linkedin:before{content:"\f08c"}.fa-linkedin-in:before{content:"\f0e1"}.fa-linode:before{content:"\f2b8"}.fa-linux:before{content:"\f17c"}.fa-lira-sign:before{content:"\f195"}.fa-list:before{content:"\f03a"}.fa-list-alt:before{content:"\f022"}.fa-list-ol:before{content:"\f0cb"}.fa-list-ul:before{content:"\f0ca"}.fa-location-arrow:before{content:"\f124"}.fa-lock:before{content:"\f023"}.fa-lock-open:before{content:"\f3c1"}.fa-long-arrow-alt-down:before{content:"\f309"}.fa-long-arrow-alt-left:before{content:"\f30a"}.fa-long-arrow-alt-right:before{content:"\f30b"}.fa-long-arrow-alt-up:before{content:"\f30c"}.fa-low-vision:before{content:"\f2a8"}.fa-luggage-cart:before{content:"\f59d"}.fa-lyft:before{content:"\f3c3"}.fa-magento:before{content:"\f3c4"}.fa-magic:before{content:"\f0d0"}.fa-magnet:before{content:"\f076"}.fa-mailchimp:before{content:"\f59e"}.fa-male:before{content:"\f183"}.fa-mandalorian:before{content:"\f50f"}.fa-map:before{content:"\f279"}.fa-map-marked:before{content:"\f59f"}.fa-map-marked-alt:before{content:"\f5a0"}.fa-map-marker:before{content:"\f041"}.fa-map-marker-alt:before{content:"\f3c5"}.fa-map-pin:before{content:"\f276"}.fa-map-signs:before{content:"\f277"}.fa-marker:before{content:"\f5a1"}.fa-mars:before{content:"\f222"}.fa-mars-double:before{content:"\f227"}.fa-mars-stroke:before{content:"\f229"}.fa-mars-stroke-h:before{content:"\f22b"}.fa-mars-stroke-v:before{content:"\f22a"}.fa-mastodon:before{content:"\f4f6"}.fa-maxcdn:before{content:"\f136"}.fa-medal:before{content:"\f5a2"}.fa-medapps:before{content:"\f3c6"}.fa-medium:before{content:"\f23a"}.fa-medium-m:before{content:"\f3c7"}.fa-medkit:before{content:"\f0fa"}.fa-medrt:before{content:"\f3c8"}.fa-meetup:before{content:"\f2e0"}.fa-megaport:before{content:"\f5a3"}.fa-meh:before{content:"\f11a"}.fa-meh-blank:before{content:"\f5a4"}.fa-meh-rolling-eyes:before{content:"\f5a5"}.fa-memory:before{content:"\f538"}.fa-mercury:before{content:"\f223"}.fa-microchip:before{content:"\f2db"}.fa-microphone:before{content:"\f130"}.fa-microphone-alt:before{content:"\f3c9"}.fa-microphone-alt-slash:before{content:"\f539"}.fa-microphone-slash:before{content:"\f131"}.fa-microsoft:before{content:"\f3ca"}.fa-minus:before{content:"\f068"}.fa-minus-circle:before{content:"\f056"}.fa-minus-square:before{content:"\f146"}.fa-mix:before{content:"\f3cb"}.fa-mixcloud:before{content:"\f289"}.fa-mizuni:before{content:"\f3cc"}.fa-mobile:before{content:"\f10b"}.fa-mobile-alt:before{content:"\f3cd"}.fa-modx:before{content:"\f285"}.fa-monero:before{content:"\f3d0"}.fa-money-bill:before{content:"\f0d6"}.fa-money-bill-alt:before{content:"\f3d1"}.fa-money-bill-wave:before{content:"\f53a"}.fa-money-bill-wave-alt:before{content:"\f53b"}.fa-money-check:before{content:"\f53c"}.fa-money-check-alt:before{content:"\f53d"}.fa-monument:before{content:"\f5a6"}.fa-moon:before{content:"\f186"}.fa-mortar-pestle:before{content:"\f5a7"}.fa-motorcycle:before{content:"\f21c"}.fa-mouse-pointer:before{content:"\f245"}.fa-music:before{content:"\f001"}.fa-napster:before{content:"\f3d2"}.fa-neuter:before{content:"\f22c"}.fa-newspaper:before{content:"\f1ea"}.fa-nimblr:before{content:"\f5a8"}.fa-nintendo-switch:before{content:"\f418"}.fa-node:before{content:"\f419"}.fa-node-js:before{content:"\f3d3"}.fa-not-equal:before{content:"\f53e"}.fa-notes-medical:before{content:"\f481"}.fa-npm:before{content:"\f3d4"}.fa-ns8:before{content:"\f3d5"}.fa-nutritionix:before{content:"\f3d6"}.fa-object-group:before{content:"\f247"}.fa-object-ungroup:before{content:"\f248"}.fa-odnoklassniki:before{content:"\f263"}.fa-odnoklassniki-square:before{content:"\f264"}.fa-old-republic:before{content:"\f510"}.fa-opencart:before{content:"\f23d"}.fa-openid:before{content:"\f19b"}.fa-opera:before{content:"\f26a"}.fa-optin-monster:before{content:"\f23c"}.fa-osi:before{content:"\f41a"}.fa-outdent:before{content:"\f03b"}.fa-page4:before{content:"\f3d7"}.fa-pagelines:before{content:"\f18c"}.fa-paint-brush:before{content:"\f1fc"}.fa-paint-roller:before{content:"\f5aa"}.fa-palette:before{content:"\f53f"}.fa-palfed:before{content:"\f3d8"}.fa-pallet:before{content:"\f482"}.fa-paper-plane:before{content:"\f1d8"}.fa-paperclip:before{content:"\f0c6"}.fa-parachute-box:before{content:"\f4cd"}.fa-paragraph:before{content:"\f1dd"}.fa-parking:before{content:"\f540"}.fa-passport:before{content:"\f5ab"}.fa-paste:before{content:"\f0ea"}.fa-patreon:before{content:"\f3d9"}.fa-pause:before{content:"\f04c"}.fa-pause-circle:before{content:"\f28b"}.fa-paw:before{content:"\f1b0"}.fa-paypal:before{content:"\f1ed"}.fa-pen:before{content:"\f304"}.fa-pen-alt:before{content:"\f305"}.fa-pen-fancy:before{content:"\f5ac"}.fa-pen-nib:before{content:"\f5ad"}.fa-pen-square:before{content:"\f14b"}.fa-pencil-alt:before{content:"\f303"}.fa-pencil-ruler:before{content:"\f5ae"}.fa-people-carry:before{content:"\f4ce"}.fa-percent:before{content:"\f295"}.fa-percentage:before{content:"\f541"}.fa-periscope:before{content:"\f3da"}.fa-phabricator:before{content:"\f3db"}.fa-phoenix-framework:before{content:"\f3dc"}.fa-phoenix-squadron:before{content:"\f511"}.fa-phone:before{content:"\f095"}.fa-phone-slash:before{content:"\f3dd"}.fa-phone-square:before{content:"\f098"}.fa-phone-volume:before{content:"\f2a0"}.fa-php:before{content:"\f457"}.fa-pied-piper:before{content:"\f2ae"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-pied-piper-hat:before{content:"\f4e5"}.fa-pied-piper-pp:before{content:"\f1a7"}.fa-piggy-bank:before{content:"\f4d3"}.fa-pills:before{content:"\f484"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-p:before{content:"\f231"}.fa-pinterest-square:before{content:"\f0d3"}.fa-plane:before{content:"\f072"}.fa-plane-arrival:before{content:"\f5af"}.fa-plane-departure:before{content:"\f5b0"}.fa-play:before{content:"\f04b"}.fa-play-circle:before{content:"\f144"}.fa-playstation:before{content:"\f3df"}.fa-plug:before{content:"\f1e6"}.fa-plus:before{content:"\f067"}.fa-plus-circle:before{content:"\f055"}.fa-plus-square:before{content:"\f0fe"}.fa-podcast:before{content:"\f2ce"}.fa-poo:before{content:"\f2fe"}.fa-portrait:before{content:"\f3e0"}.fa-pound-sign:before{content:"\f154"}.fa-power-off:before{content:"\f011"}.fa-prescription:before{content:"\f5b1"}.fa-prescription-bottle:before{content:"\f485"}.fa-prescription-bottle-alt:before{content:"\f486"}.fa-print:before{content:"\f02f"}.fa-procedures:before{content:"\f487"}.fa-product-hunt:before{content:"\f288"}.fa-project-diagram:before{content:"\f542"}.fa-pushed:before{content:"\f3e1"}.fa-puzzle-piece:before{content:"\f12e"}.fa-python:before{content:"\f3e2"}.fa-qq:before{content:"\f1d6"}.fa-qrcode:before{content:"\f029"}.fa-question:before{content:"\f128"}.fa-question-circle:before{content:"\f059"}.fa-quidditch:before{content:"\f458"}.fa-quinscape:before{content:"\f459"}.fa-quora:before{content:"\f2c4"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-r-project:before{content:"\f4f7"}.fa-random:before{content:"\f074"}.fa-ravelry:before{content:"\f2d9"}.fa-react:before{content:"\f41b"}.fa-readme:before{content:"\f4d5"}.fa-rebel:before{content:"\f1d0"}.fa-receipt:before{content:"\f543"}.fa-recycle:before{content:"\f1b8"}.fa-red-river:before{content:"\f3e3"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-alien:before{content:"\f281"}.fa-reddit-square:before{content:"\f1a2"}.fa-redo:before{content:"\f01e"}.fa-redo-alt:before{content:"\f2f9"}.fa-registered:before{content:"\f25d"}.fa-rendact:before{content:"\f3e4"}.fa-renren:before{content:"\f18b"}.fa-reply:before{content:"\f3e5"}.fa-reply-all:before{content:"\f122"}.fa-replyd:before{content:"\f3e6"}.fa-researchgate:before{content:"\f4f8"}.fa-resolving:before{content:"\f3e7"}.fa-retweet:before{content:"\f079"}.fa-rev:before{content:"\f5b2"}.fa-ribbon:before{content:"\f4d6"}.fa-road:before{content:"\f018"}.fa-robot:before{content:"\f544"}.fa-rocket:before{content:"\f135"}.fa-rocketchat:before{content:"\f3e8"}.fa-rockrms:before{content:"\f3e9"}.fa-rss:before{content:"\f09e"}.fa-rss-square:before{content:"\f143"}.fa-ruble-sign:before{content:"\f158"}.fa-ruler:before{content:"\f545"}.fa-ruler-combined:before{content:"\f546"}.fa-ruler-horizontal:before{content:"\f547"}.fa-ruler-vertical:before{content:"\f548"}.fa-rupee-sign:before{content:"\f156"}.fa-sad-cry:before{content:"\f5b3"}.fa-sad-tear:before{content:"\f5b4"}.fa-safari:before{content:"\f267"}.fa-sass:before{content:"\f41e"}.fa-save:before{content:"\f0c7"}.fa-schlix:before{content:"\f3ea"}.fa-school:before{content:"\f549"}.fa-screwdriver:before{content:"\f54a"}.fa-scribd:before{content:"\f28a"}.fa-search:before{content:"\f002"}.fa-search-minus:before{content:"\f010"}.fa-search-plus:before{content:"\f00e"}.fa-searchengin:before{content:"\f3eb"}.fa-seedling:before{content:"\f4d8"}.fa-sellcast:before{content:"\f2da"}.fa-sellsy:before{content:"\f213"}.fa-server:before{content:"\f233"}.fa-servicestack:before{content:"\f3ec"}.fa-share:before{content:"\f064"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-share-square:before{content:"\f14d"}.fa-shekel-sign:before{content:"\f20b"}.fa-shield-alt:before{content:"\f3ed"}.fa-ship:before{content:"\f21a"}.fa-shipping-fast:before{content:"\f48b"}.fa-shirtsinbulk:before{content:"\f214"}.fa-shoe-prints:before{content:"\f54b"}.fa-shopping-bag:before{content:"\f290"}.fa-shopping-basket:before{content:"\f291"}.fa-shopping-cart:before{content:"\f07a"}.fa-shopware:before{content:"\f5b5"}.fa-shower:before{content:"\f2cc"}.fa-shuttle-van:before{content:"\f5b6"}.fa-sign:before{content:"\f4d9"}.fa-sign-in-alt:before{content:"\f2f6"}.fa-sign-language:before{content:"\f2a7"}.fa-sign-out-alt:before{content:"\f2f5"}.fa-signal:before{content:"\f012"}.fa-signature:before{content:"\f5b7"}.fa-simplybuilt:before{content:"\f215"}.fa-sistrix:before{content:"\f3ee"}.fa-sitemap:before{content:"\f0e8"}.fa-sith:before{content:"\f512"}.fa-skull:before{content:"\f54c"}.fa-skyatlas:before{content:"\f216"}.fa-skype:before{content:"\f17e"}.fa-slack:before{content:"\f198"}.fa-slack-hash:before{content:"\f3ef"}.fa-sliders-h:before{content:"\f1de"}.fa-slideshare:before{content:"\f1e7"}.fa-smile:before{content:"\f118"}.fa-smile-beam:before{content:"\f5b8"}.fa-smile-wink:before{content:"\f4da"}.fa-smoking:before{content:"\f48d"}.fa-smoking-ban:before{content:"\f54d"}.fa-snapchat:before{content:"\f2ab"}.fa-snapchat-ghost:before{content:"\f2ac"}.fa-snapchat-square:before{content:"\f2ad"}.fa-snowflake:before{content:"\f2dc"}.fa-solar-panel:before{content:"\f5ba"}.fa-sort:before{content:"\f0dc"}.fa-sort-alpha-down:before{content:"\f15d"}.fa-sort-alpha-up:before{content:"\f15e"}.fa-sort-amount-down:before{content:"\f160"}.fa-sort-amount-up:before{content:"\f161"}.fa-sort-down:before{content:"\f0dd"}.fa-sort-numeric-down:before{content:"\f162"}.fa-sort-numeric-up:before{content:"\f163"}.fa-sort-up:before{content:"\f0de"}.fa-soundcloud:before{content:"\f1be"}.fa-spa:before{content:"\f5bb"}.fa-space-shuttle:before{content:"\f197"}.fa-speakap:before{content:"\f3f3"}.fa-spinner:before{content:"\f110"}.fa-splotch:before{content:"\f5bc"}.fa-spotify:before{content:"\f1bc"}.fa-spray-can:before{content:"\f5bd"}.fa-square:before{content:"\f0c8"}.fa-square-full:before{content:"\f45c"}.fa-squarespace:before{content:"\f5be"}.fa-stack-exchange:before{content:"\f18d"}.fa-stack-overflow:before{content:"\f16c"}.fa-stamp:before{content:"\f5bf"}.fa-star:before{content:"\f005"}.fa-star-half:before{content:"\f089"}.fa-star-half-alt:before{content:"\f5c0"}.fa-staylinked:before{content:"\f3f5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-steam-symbol:before{content:"\f3f6"}.fa-step-backward:before{content:"\f048"}.fa-step-forward:before{content:"\f051"}.fa-stethoscope:before{content:"\f0f1"}.fa-sticker-mule:before{content:"\f3f7"}.fa-sticky-note:before{content:"\f249"}.fa-stop:before{content:"\f04d"}.fa-stop-circle:before{content:"\f28d"}.fa-stopwatch:before{content:"\f2f2"}.fa-store:before{content:"\f54e"}.fa-store-alt:before{content:"\f54f"}.fa-strava:before{content:"\f428"}.fa-stream:before{content:"\f550"}.fa-street-view:before{content:"\f21d"}.fa-strikethrough:before{content:"\f0cc"}.fa-stripe:before{content:"\f429"}.fa-stripe-s:before{content:"\f42a"}.fa-stroopwafel:before{content:"\f551"}.fa-studiovinari:before{content:"\f3f8"}.fa-stumbleupon:before{content:"\f1a4"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-subscript:before{content:"\f12c"}.fa-subway:before{content:"\f239"}.fa-suitcase:before{content:"\f0f2"}.fa-suitcase-rolling:before{content:"\f5c1"}.fa-sun:before{content:"\f185"}.fa-superpowers:before{content:"\f2dd"}.fa-superscript:before{content:"\f12b"}.fa-supple:before{content:"\f3f9"}.fa-surprise:before{content:"\f5c2"}.fa-swatchbook:before{content:"\f5c3"}.fa-swimmer:before{content:"\f5c4"}.fa-swimming-pool:before{content:"\f5c5"}.fa-sync:before{content:"\f021"}.fa-sync-alt:before{content:"\f2f1"}.fa-syringe:before{content:"\f48e"}.fa-table:before{content:"\f0ce"}.fa-table-tennis:before{content:"\f45d"}.fa-tablet:before{content:"\f10a"}.fa-tablet-alt:before{content:"\f3fa"}.fa-tablets:before{content:"\f490"}.fa-tachometer-alt:before{content:"\f3fd"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-tape:before{content:"\f4db"}.fa-tasks:before{content:"\f0ae"}.fa-taxi:before{content:"\f1ba"}.fa-teamspeak:before{content:"\f4f9"}.fa-telegram:before{content:"\f2c6"}.fa-telegram-plane:before{content:"\f3fe"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-terminal:before{content:"\f120"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-th:before{content:"\f00a"}.fa-th-large:before{content:"\f009"}.fa-th-list:before{content:"\f00b"}.fa-themeco:before{content:"\f5c6"}.fa-themeisle:before{content:"\f2b2"}.fa-thermometer:before{content:"\f491"}.fa-thermometer-empty:before{content:"\f2cb"}.fa-thermometer-full:before{content:"\f2c7"}.fa-thermometer-half:before{content:"\f2c9"}.fa-thermometer-quarter:before{content:"\f2ca"}.fa-thermometer-three-quarters:before{content:"\f2c8"}.fa-thumbs-down:before{content:"\f165"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbtack:before{content:"\f08d"}.fa-ticket-alt:before{content:"\f3ff"}.fa-times:before{content:"\f00d"}.fa-times-circle:before{content:"\f057"}.fa-tint:before{content:"\f043"}.fa-tint-slash:before{content:"\f5c7"}.fa-tired:before{content:"\f5c8"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-toolbox:before{content:"\f552"}.fa-tooth:before{content:"\f5c9"}.fa-trade-federation:before{content:"\f513"}.fa-trademark:before{content:"\f25c"}.fa-train:before{content:"\f238"}.fa-transgender:before{content:"\f224"}.fa-transgender-alt:before{content:"\f225"}.fa-trash:before{content:"\f1f8"}.fa-trash-alt:before{content:"\f2ed"}.fa-tree:before{content:"\f1bb"}.fa-trello:before{content:"\f181"}.fa-tripadvisor:before{content:"\f262"}.fa-trophy:before{content:"\f091"}.fa-truck:before{content:"\f0d1"}.fa-truck-loading:before{content:"\f4de"}.fa-truck-moving:before{content:"\f4df"}.fa-tshirt:before{content:"\f553"}.fa-tty:before{content:"\f1e4"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-tv:before{content:"\f26c"}.fa-twitch:before{content:"\f1e8"}.fa-twitter:before{content:"\f099"}.fa-twitter-square:before{content:"\f081"}.fa-typo3:before{content:"\f42b"}.fa-uber:before{content:"\f402"}.fa-uikit:before{content:"\f403"}.fa-umbrella:before{content:"\f0e9"}.fa-umbrella-beach:before{content:"\f5ca"}.fa-underline:before{content:"\f0cd"}.fa-undo:before{content:"\f0e2"}.fa-undo-alt:before{content:"\f2ea"}.fa-uniregistry:before{content:"\f404"}.fa-universal-access:before{content:"\f29a"}.fa-university:before{content:"\f19c"}.fa-unlink:before{content:"\f127"}.fa-unlock:before{content:"\f09c"}.fa-unlock-alt:before{content:"\f13e"}.fa-untappd:before{content:"\f405"}.fa-upload:before{content:"\f093"}.fa-usb:before{content:"\f287"}.fa-user:before{content:"\f007"}.fa-user-alt:before{content:"\f406"}.fa-user-alt-slash:before{content:"\f4fa"}.fa-user-astronaut:before{content:"\f4fb"}.fa-user-check:before{content:"\f4fc"}.fa-user-circle:before{content:"\f2bd"}.fa-user-clock:before{content:"\f4fd"}.fa-user-cog:before{content:"\f4fe"}.fa-user-edit:before{content:"\f4ff"}.fa-user-friends:before{content:"\f500"}.fa-user-graduate:before{content:"\f501"}.fa-user-lock:before{content:"\f502"}.fa-user-md:before{content:"\f0f0"}.fa-user-minus:before{content:"\f503"}.fa-user-ninja:before{content:"\f504"}.fa-user-plus:before{content:"\f234"}.fa-user-secret:before{content:"\f21b"}.fa-user-shield:before{content:"\f505"}.fa-user-slash:before{content:"\f506"}.fa-user-tag:before{content:"\f507"}.fa-user-tie:before{content:"\f508"}.fa-user-times:before{content:"\f235"}.fa-users:before{content:"\f0c0"}.fa-users-cog:before{content:"\f509"}.fa-ussunnah:before{content:"\f407"}.fa-utensil-spoon:before{content:"\f2e5"}.fa-utensils:before{content:"\f2e7"}.fa-vaadin:before{content:"\f408"}.fa-vector-square:before{content:"\f5cb"}.fa-venus:before{content:"\f221"}.fa-venus-double:before{content:"\f226"}.fa-venus-mars:before{content:"\f228"}.fa-viacoin:before{content:"\f237"}.fa-viadeo:before{content:"\f2a9"}.fa-viadeo-square:before{content:"\f2aa"}.fa-vial:before{content:"\f492"}.fa-vials:before{content:"\f493"}.fa-viber:before{content:"\f409"}.fa-video:before{content:"\f03d"}.fa-video-slash:before{content:"\f4e2"}.fa-vimeo:before{content:"\f40a"}.fa-vimeo-square:before{content:"\f194"}.fa-vimeo-v:before{content:"\f27d"}.fa-vine:before{content:"\f1ca"}.fa-vk:before{content:"\f189"}.fa-vnv:before{content:"\f40b"}.fa-volleyball-ball:before{content:"\f45f"}.fa-volume-down:before{content:"\f027"}.fa-volume-off:before{content:"\f026"}.fa-volume-up:before{content:"\f028"}.fa-vuejs:before{content:"\f41f"}.fa-walking:before{content:"\f554"}.fa-wallet:before{content:"\f555"}.fa-warehouse:before{content:"\f494"}.fa-weebly:before{content:"\f5cc"}.fa-weibo:before{content:"\f18a"}.fa-weight:before{content:"\f496"}.fa-weight-hanging:before{content:"\f5cd"}.fa-weixin:before{content:"\f1d7"}.fa-whatsapp:before{content:"\f232"}.fa-whatsapp-square:before{content:"\f40c"}.fa-wheelchair:before{content:"\f193"}.fa-whmcs:before{content:"\f40d"}.fa-wifi:before{content:"\f1eb"}.fa-wikipedia-w:before{content:"\f266"}.fa-window-close:before{content:"\f410"}.fa-window-maximize:before{content:"\f2d0"}.fa-window-minimize:before{content:"\f2d1"}.fa-window-restore:before{content:"\f2d2"}.fa-windows:before{content:"\f17a"}.fa-wine-glass:before{content:"\f4e3"}.fa-wine-glass-alt:before{content:"\f5ce"}.fa-wix:before{content:"\f5cf"}.fa-wolf-pack-battalion:before{content:"\f514"}.fa-won-sign:before{content:"\f159"}.fa-wordpress:before{content:"\f19a"}.fa-wordpress-simple:before{content:"\f411"}.fa-wpbeginner:before{content:"\f297"}.fa-wpexplorer:before{content:"\f2de"}.fa-wpforms:before{content:"\f298"}.fa-wrench:before{content:"\f0ad"}.fa-x-ray:before{content:"\f497"}.fa-xbox:before{content:"\f412"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-y-combinator:before{content:"\f23b"}.fa-yahoo:before{content:"\f19e"}.fa-yandex:before{content:"\f413"}.fa-yandex-international:before{content:"\f414"}.fa-yelp:before{content:"\f1e9"}.fa-yen-sign:before{content:"\f157"}.fa-yoast:before{content:"\f2b1"}.fa-youtube:before{content:"\f167"}.fa-youtube-square:before{content:"\f431"}.sr-only{border:0;clip:rect(0,0,0,0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.sr-only-focusable:active,.sr-only-focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}/*!* Font Awesome Free 5.1.0 by @fontawesome - https://fontawesome.com -* License - https://fontawesome.com/license (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)*/@font-face{font-family:'font awesome 5 free';font-style:normal;font-weight:900;src:url(../webfonts/fa-solid-900.eot);src:url(../webfonts/fa-solid-900.eot?#iefix)format("embedded-opentype"),url(../webfonts/fa-solid-900.woff2)format("woff2"),url(../webfonts/fa-solid-900.woff)format("woff"),url(../webfonts/fa-solid-900.ttf)format("truetype"),url(../webfonts/fa-solid-900.svg#fontawesome)format("svg")}.fa,.fas{font-family:'font awesome 5 free';font-weight:900}/*!* Font Awesome Free 5.1.0 by @fontawesome - https://fontawesome.com -* License - https://fontawesome.com/license (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)*/@font-face{font-family:'font awesome 5 brands';font-style:normal;font-weight:400;src:url(../webfonts/fa-brands-400.eot);src:url(../webfonts/fa-brands-400.eot?#iefix)format("embedded-opentype"),url(../webfonts/fa-brands-400.woff2)format("woff2"),url(../webfonts/fa-brands-400.woff)format("woff"),url(../webfonts/fa-brands-400.ttf)format("truetype"),url(../webfonts/fa-brands-400.svg#fontawesome)format("svg")}.fab{font-family:'font awesome 5 brands'}.td-border-top{border:none;border-top:1px solid #eee}.td-border-none{border:none}.td-block-padding,.td-default main section{padding-top:4rem;padding-bottom:4rem}@media(min-width:768px){.td-block-padding,.td-default main section{padding-top:5rem;padding-bottom:5rem}}.td-overlay{position:relative}.td-overlay::after{content:"";position:absolute;top:0;right:0;bottom:0;left:0}.td-overlay--dark::after{background-color:rgba(64,63,76,.3)}.td-overlay--light::after{background-color:rgba(211,243,238,.3)}.td-overlay__inner{position:relative;z-index:1}@media(min-width:992px){.td-max-width-on-larger-screens,.td-content>pre,.td-content>.highlight,.td-content>.lead,.td-content>h1,.td-content>h2,.td-content>ul,.td-content>ol,.td-content>p,.td-content>blockquote,.td-content>dl dd,.td-content .footnotes,.td-content>.alert{max-width:80%}}.-bg-blue{color:#fff;background-color:#72a1e5}.-bg-blue p>a{color:#a0c0ee}.-bg-blue p>a:hover,.-bg-blue p>a:focus{color:#fec555}.-text-blue{color:#72a1e5}.-bg-indigo{color:#fff;background-color:#6610f2}.-bg-indigo p>a{color:#b8cff2}.-bg-indigo p>a:hover,.-bg-indigo p>a:focus{color:#fec555}.-text-indigo{color:#6610f2}.-bg-purple{color:#fff;background-color:#6f42c1}.-bg-purple p>a{color:#b7cff2}.-bg-purple p>a:hover,.-bg-purple p>a:focus{color:#fec555}.-text-purple{color:#6f42c1}.-bg-pink{color:#fff;background-color:#e83e8c}.-bg-pink p>a{color:#aec9f0}.-bg-pink p>a:hover,.-bg-pink p>a:focus{color:#fec555}.-text-pink{color:#e83e8c}.-bg-red{color:#fff;background-color:#dc3545}.-bg-red p>a{color:#b4cdf1}.-bg-red p>a:hover,.-bg-red p>a:focus{color:#fec555}.-text-red{color:#dc3545}.-bg-orange{color:#fff;background-color:#eaaa2c}.-bg-orange p>a{color:#b2ccf1}.-bg-orange p>a:hover,.-bg-orange p>a:focus{color:#fec555}.-text-orange{color:#eaaa2c}.-bg-yellow{color:#fff;background-color:#ffc107}.-bg-yellow p>a{color:#b7cff2}.-bg-yellow p>a:hover,.-bg-yellow p>a:focus{color:#fec555}.-text-yellow{color:#ffc107}.-bg-green{color:#fff;background-color:#28a745}.-bg-green p>a{color:#c6d9f4}.-bg-green p>a:hover,.-bg-green p>a:focus{color:#fec555}.-text-green{color:#28a745}.-bg-teal{color:#fff;background-color:#20c997}.-bg-teal p>a{color:#bfd4f3}.-bg-teal p>a:hover,.-bg-teal p>a:focus{color:#fec555}.-text-teal{color:#20c997}.-bg-cyan{color:#fff;background-color:#17a2b8}.-bg-cyan p>a{color:#c6d9f4}.-bg-cyan p>a:hover,.-bg-cyan p>a:focus{color:#fec555}.-text-cyan{color:#17a2b8}.-bg-white{color:#222;background-color:#fff}.-bg-white p>a{color:#72a1e5}.-bg-white p>a:hover,.-bg-white p>a:focus{color:#fec555}.-text-white{color:#fff}.-bg-gray{color:#fff;background-color:#888}.-bg-gray p>a{color:#b4cdf1}.-bg-gray p>a:hover,.-bg-gray p>a:focus{color:#fec555}.-text-gray{color:#888}.-bg-gray-dark{color:#fff;background-color:#333}.-bg-gray-dark p>a{color:#e3ecfa}.-bg-gray-dark p>a:hover,.-bg-gray-dark p>a:focus{color:#fec555}.-text-gray-dark{color:#333}.-bg-primary{color:#fff;background-color:#1ea149}.-bg-primary p>a{color:#cadcf5}.-bg-primary p>a:hover,.-bg-primary p>a:focus{color:#fec555}.-text-primary{color:#1ea149}.-bg-secondary{color:#fff;background-color:#ffa630}.-bg-secondary p>a{color:#abc7f0}.-bg-secondary p>a:hover,.-bg-secondary p>a:focus{color:#fec555}.-text-secondary{color:#ffa630}.-bg-success{color:#fff;background-color:#3772ff}.-bg-success p>a{color:#a9c6ef}.-bg-success p>a:hover,.-bg-success p>a:focus{color:#fec555}.-text-success{color:#3772ff}.-bg-info{color:#222;background-color:#c0e0de}.-bg-info p>a{color:#638ac1}.-bg-info p>a:hover,.-bg-info p>a:focus{color:#fec555}.-text-info{color:#c0e0de}.-bg-warning{color:#fff;background-color:#ed6a5a}.-bg-warning p>a{color:#a5c3ee}.-bg-warning p>a:hover,.-bg-warning p>a:focus{color:#fec555}.-text-warning{color:#ed6a5a}.-bg-danger{color:#fff;background-color:#ed6a5a}.-bg-danger p>a{color:#a5c3ee}.-bg-danger p>a:hover,.-bg-danger p>a:focus{color:#fec555}.-text-danger{color:#ed6a5a}.-bg-light{color:#222;background-color:#d3f3ee}.-bg-light p>a{color:#6993d0}.-bg-light p>a:hover,.-bg-light p>a:focus{color:#fec555}.-text-light{color:#d3f3ee}.-bg-dark{color:#fff;background-color:#403f4c}.-bg-dark p>a{color:#d9e5f8}.-bg-dark p>a:hover,.-bg-dark p>a:focus{color:#fec555}.-text-dark{color:#403f4c}.-bg-100{color:#222;background-color:#f8f9fa}.-bg-100 p>a{color:#709ee0}.-bg-100 p>a:hover,.-bg-100 p>a:focus{color:#fec555}.-text-100{color:#f8f9fa}.-bg-200{color:#222;background-color:#eee}.-bg-200 p>a{color:#6d99d8}.-bg-200 p>a:hover,.-bg-200 p>a:focus{color:#fec555}.-text-200{color:#eee}.-bg-300{color:#222;background-color:#dee2e6}.-bg-300 p>a{color:#6993cf}.-bg-300 p>a:hover,.-bg-300 p>a:focus{color:#fec555}.-text-300{color:#dee2e6}.-bg-400{color:#222;background-color:#ccc}.-bg-400 p>a{color:#6288be}.-bg-400 p>a:hover,.-bg-400 p>a:focus{color:#fec555}.-text-400{color:#ccc}.-bg-500{color:#fff;background-color:#adb5bd}.-bg-500 p>a{color:#9bbced}.-bg-500 p>a:hover,.-bg-500 p>a:focus{color:#fec555}.-text-500{color:#adb5bd}.-bg-600{color:#fff;background-color:#888}.-bg-600 p>a{color:#b4cdf1}.-bg-600 p>a:hover,.-bg-600 p>a:focus{color:#fec555}.-text-600{color:#888}.-bg-700{color:#fff;background-color:#495057}.-bg-700 p>a{color:#d3e2f7}.-bg-700 p>a:hover,.-bg-700 p>a:focus{color:#fec555}.-text-700{color:#495057}.-bg-800{color:#fff;background-color:#333}.-bg-800 p>a{color:#e3ecfa}.-bg-800 p>a:hover,.-bg-800 p>a:focus{color:#fec555}.-text-800{color:#333}.-bg-900{color:#fff;background-color:#222}.-bg-900 p>a{color:#ecf2fc}.-bg-900 p>a:hover,.-bg-900 p>a:focus{color:#fec555}.-text-900{color:#222}.-bg-0{color:#fff;background-color:#ffa630}.-bg-0 p>a{color:#abc7f0}.-bg-0 p>a:hover,.-bg-0 p>a:focus{color:#fec555}.-text-0{color:#ffa630}.td-box--height-min{min-height:300px}.td-box--height-med{min-height:400px}.td-box--height-max{min-height:500px}.td-box--height-full{min-height:100vh}@media(min-width:768px){.td-box--height-min{min-height:450px}.td-box--height-med{min-height:500px}.td-box--height-max{min-height:650px}}.td-box .row.section{padding-left:5rem;padding-right:5rem;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column}.td-box .row{padding-left:5rem;padding-right:5rem;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row}.td-box.linkbox{padding:5rem}.td-box--0{color:#fff;background-color:#ffa630}.td-box--0 .td-arrow-down::before{left:50%;margin-left:-30px;bottom:-25px;border-style:solid;border-width:25px 30px 0;border-color:#ffa630 transparent transparent transparent;z-index:3;position:absolute;content:""}.td-box--0 p>a{color:#abc7f0}.td-box--0 p>a:hover,.td-box--0 p>a:focus{color:#fec555}.td-box--blue{color:#fff;background-color:#72a1e5}.td-box--blue .td-arrow-down::before{left:50%;margin-left:-30px;bottom:-25px;border-style:solid;border-width:25px 30px 0;border-color:#72a1e5 transparent transparent transparent;z-index:3;position:absolute;content:""}.td-box--blue p>a{color:#a0c0ee}.td-box--blue p>a:hover,.td-box--blue p>a:focus{color:#fec555}.td-box--indigo{color:#fff;background-color:#6610f2}.td-box--indigo .td-arrow-down::before{left:50%;margin-left:-30px;bottom:-25px;border-style:solid;border-width:25px 30px 0;border-color:#6610f2 transparent transparent transparent;z-index:3;position:absolute;content:""}.td-box--indigo p>a{color:#b8cff2}.td-box--indigo p>a:hover,.td-box--indigo p>a:focus{color:#fec555}.td-box--purple{color:#fff;background-color:#6f42c1}.td-box--purple .td-arrow-down::before{left:50%;margin-left:-30px;bottom:-25px;border-style:solid;border-width:25px 30px 0;border-color:#6f42c1 transparent transparent transparent;z-index:3;position:absolute;content:""}.td-box--purple p>a{color:#b7cff2}.td-box--purple p>a:hover,.td-box--purple p>a:focus{color:#fec555}.td-box--pink{color:#fff;background-color:#e83e8c}.td-box--pink .td-arrow-down::before{left:50%;margin-left:-30px;bottom:-25px;border-style:solid;border-width:25px 30px 0;border-color:#e83e8c transparent transparent transparent;z-index:3;position:absolute;content:""}.td-box--pink p>a{color:#aec9f0}.td-box--pink p>a:hover,.td-box--pink p>a:focus{color:#fec555}.td-box--red{color:#fff;background-color:#dc3545}.td-box--red .td-arrow-down::before{left:50%;margin-left:-30px;bottom:-25px;border-style:solid;border-width:25px 30px 0;border-color:#dc3545 transparent transparent transparent;z-index:3;position:absolute;content:""}.td-box--red p>a{color:#b4cdf1}.td-box--red p>a:hover,.td-box--red p>a:focus{color:#fec555}.td-box--orange{color:#fff;background-color:#eaaa2c}.td-box--orange .td-arrow-down::before{left:50%;margin-left:-30px;bottom:-25px;border-style:solid;border-width:25px 30px 0;border-color:#eaaa2c transparent transparent transparent;z-index:3;position:absolute;content:""}.td-box--orange p>a{color:#b2ccf1}.td-box--orange p>a:hover,.td-box--orange p>a:focus{color:#fec555}.td-box--yellow{color:#fff;background-color:#ffc107}.td-box--yellow .td-arrow-down::before{left:50%;margin-left:-30px;bottom:-25px;border-style:solid;border-width:25px 30px 0;border-color:#ffc107 transparent transparent transparent;z-index:3;position:absolute;content:""}.td-box--yellow p>a{color:#b7cff2}.td-box--yellow p>a:hover,.td-box--yellow p>a:focus{color:#fec555}.td-box--green{color:#fff;background-color:#28a745}.td-box--green .td-arrow-down::before{left:50%;margin-left:-30px;bottom:-25px;border-style:solid;border-width:25px 30px 0;border-color:#28a745 transparent transparent transparent;z-index:3;position:absolute;content:""}.td-box--green p>a{color:#c6d9f4}.td-box--green p>a:hover,.td-box--green p>a:focus{color:#fec555}.td-box--teal{color:#fff;background-color:#20c997}.td-box--teal .td-arrow-down::before{left:50%;margin-left:-30px;bottom:-25px;border-style:solid;border-width:25px 30px 0;border-color:#20c997 transparent transparent transparent;z-index:3;position:absolute;content:""}.td-box--teal p>a{color:#bfd4f3}.td-box--teal p>a:hover,.td-box--teal p>a:focus{color:#fec555}.td-box--cyan{color:#fff;background-color:#17a2b8}.td-box--cyan .td-arrow-down::before{left:50%;margin-left:-30px;bottom:-25px;border-style:solid;border-width:25px 30px 0;border-color:#17a2b8 transparent transparent transparent;z-index:3;position:absolute;content:""}.td-box--cyan p>a{color:#c6d9f4}.td-box--cyan p>a:hover,.td-box--cyan p>a:focus{color:#fec555}.td-box--white{color:#222;background-color:#fff}.td-box--white .td-arrow-down::before{left:50%;margin-left:-30px;bottom:-25px;border-style:solid;border-width:25px 30px 0;border-color:#fff transparent transparent transparent;z-index:3;position:absolute;content:""}.td-box--white p>a{color:#72a1e5}.td-box--white p>a:hover,.td-box--white p>a:focus{color:#fec555}.td-box--gray{color:#fff;background-color:#888}.td-box--gray .td-arrow-down::before{left:50%;margin-left:-30px;bottom:-25px;border-style:solid;border-width:25px 30px 0;border-color:#888 transparent transparent transparent;z-index:3;position:absolute;content:""}.td-box--gray p>a{color:#b4cdf1}.td-box--gray p>a:hover,.td-box--gray p>a:focus{color:#fec555}.td-box--gray-dark{color:#fff;background-color:#333}.td-box--gray-dark .td-arrow-down::before{left:50%;margin-left:-30px;bottom:-25px;border-style:solid;border-width:25px 30px 0;border-color:#333 transparent transparent transparent;z-index:3;position:absolute;content:""}.td-box--gray-dark p>a{color:#e3ecfa}.td-box--gray-dark p>a:hover,.td-box--gray-dark p>a:focus{color:#fec555}.td-box--primary{color:#fff;background-color:#1ea149}.td-box--primary .td-arrow-down::before{left:50%;margin-left:-30px;bottom:-25px;border-style:solid;border-width:25px 30px 0;border-color:#1ea149 transparent transparent transparent;z-index:3;position:absolute;content:""}.td-box--primary p>a{color:#cadcf5}.td-box--primary p>a:hover,.td-box--primary p>a:focus{color:#fec555}.td-box--secondary{color:#fff;background-color:#ffa630}.td-box--secondary .td-arrow-down::before{left:50%;margin-left:-30px;bottom:-25px;border-style:solid;border-width:25px 30px 0;border-color:#ffa630 transparent transparent transparent;z-index:3;position:absolute;content:""}.td-box--secondary p>a{color:#abc7f0}.td-box--secondary p>a:hover,.td-box--secondary p>a:focus{color:#fec555}.td-box--success{color:#fff;background-color:#3772ff}.td-box--success .td-arrow-down::before{left:50%;margin-left:-30px;bottom:-25px;border-style:solid;border-width:25px 30px 0;border-color:#3772ff transparent transparent transparent;z-index:3;position:absolute;content:""}.td-box--success p>a{color:#a9c6ef}.td-box--success p>a:hover,.td-box--success p>a:focus{color:#fec555}.td-box--info{color:#222;background-color:#c0e0de}.td-box--info .td-arrow-down::before{left:50%;margin-left:-30px;bottom:-25px;border-style:solid;border-width:25px 30px 0;border-color:#c0e0de transparent transparent transparent;z-index:3;position:absolute;content:""}.td-box--info p>a{color:#638ac1}.td-box--info p>a:hover,.td-box--info p>a:focus{color:#fec555}.td-box--warning{color:#fff;background-color:#ed6a5a}.td-box--warning .td-arrow-down::before{left:50%;margin-left:-30px;bottom:-25px;border-style:solid;border-width:25px 30px 0;border-color:#ed6a5a transparent transparent transparent;z-index:3;position:absolute;content:""}.td-box--warning p>a{color:#a5c3ee}.td-box--warning p>a:hover,.td-box--warning p>a:focus{color:#fec555}.td-box--danger{color:#fff;background-color:#ed6a5a}.td-box--danger .td-arrow-down::before{left:50%;margin-left:-30px;bottom:-25px;border-style:solid;border-width:25px 30px 0;border-color:#ed6a5a transparent transparent transparent;z-index:3;position:absolute;content:""}.td-box--danger p>a{color:#a5c3ee}.td-box--danger p>a:hover,.td-box--danger p>a:focus{color:#fec555}.td-box--light{color:#222;background-color:#d3f3ee}.td-box--light .td-arrow-down::before{left:50%;margin-left:-30px;bottom:-25px;border-style:solid;border-width:25px 30px 0;border-color:#d3f3ee transparent transparent transparent;z-index:3;position:absolute;content:""}.td-box--light p>a{color:#6993d0}.td-box--light p>a:hover,.td-box--light p>a:focus{color:#fec555}.td-box--dark{color:#fff;background-color:#403f4c}.td-box--dark .td-arrow-down::before{left:50%;margin-left:-30px;bottom:-25px;border-style:solid;border-width:25px 30px 0;border-color:#403f4c transparent transparent transparent;z-index:3;position:absolute;content:""}.td-box--dark p>a{color:#d9e5f8}.td-box--dark p>a:hover,.td-box--dark p>a:focus{color:#fec555}.td-box--100{color:#222;background-color:#f8f9fa}.td-box--100 .td-arrow-down::before{left:50%;margin-left:-30px;bottom:-25px;border-style:solid;border-width:25px 30px 0;border-color:#f8f9fa transparent transparent transparent;z-index:3;position:absolute;content:""}.td-box--100 p>a{color:#709ee0}.td-box--100 p>a:hover,.td-box--100 p>a:focus{color:#fec555}.td-box--200{color:#222;background-color:#eee}.td-box--200 .td-arrow-down::before{left:50%;margin-left:-30px;bottom:-25px;border-style:solid;border-width:25px 30px 0;border-color:#eee transparent transparent transparent;z-index:3;position:absolute;content:""}.td-box--200 p>a{color:#6d99d8}.td-box--200 p>a:hover,.td-box--200 p>a:focus{color:#fec555}.td-box--300{color:#222;background-color:#dee2e6}.td-box--300 .td-arrow-down::before{left:50%;margin-left:-30px;bottom:-25px;border-style:solid;border-width:25px 30px 0;border-color:#dee2e6 transparent transparent transparent;z-index:3;position:absolute;content:""}.td-box--300 p>a{color:#6993cf}.td-box--300 p>a:hover,.td-box--300 p>a:focus{color:#fec555}.td-box--400{color:#222;background-color:#ccc}.td-box--400 .td-arrow-down::before{left:50%;margin-left:-30px;bottom:-25px;border-style:solid;border-width:25px 30px 0;border-color:#ccc transparent transparent transparent;z-index:3;position:absolute;content:""}.td-box--400 p>a{color:#6288be}.td-box--400 p>a:hover,.td-box--400 p>a:focus{color:#fec555}.td-box--500{color:#fff;background-color:#adb5bd}.td-box--500 .td-arrow-down::before{left:50%;margin-left:-30px;bottom:-25px;border-style:solid;border-width:25px 30px 0;border-color:#adb5bd transparent transparent transparent;z-index:3;position:absolute;content:""}.td-box--500 p>a{color:#9bbced}.td-box--500 p>a:hover,.td-box--500 p>a:focus{color:#fec555}.td-box--600{color:#fff;background-color:#888}.td-box--600 .td-arrow-down::before{left:50%;margin-left:-30px;bottom:-25px;border-style:solid;border-width:25px 30px 0;border-color:#888 transparent transparent transparent;z-index:3;position:absolute;content:""}.td-box--600 p>a{color:#b4cdf1}.td-box--600 p>a:hover,.td-box--600 p>a:focus{color:#fec555}.td-box--700{color:#fff;background-color:#495057}.td-box--700 .td-arrow-down::before{left:50%;margin-left:-30px;bottom:-25px;border-style:solid;border-width:25px 30px 0;border-color:#495057 transparent transparent transparent;z-index:3;position:absolute;content:""}.td-box--700 p>a{color:#d3e2f7}.td-box--700 p>a:hover,.td-box--700 p>a:focus{color:#fec555}.td-box--800{color:#fff;background-color:#333}.td-box--800 .td-arrow-down::before{left:50%;margin-left:-30px;bottom:-25px;border-style:solid;border-width:25px 30px 0;border-color:#333 transparent transparent transparent;z-index:3;position:absolute;content:""}.td-box--800 p>a{color:#e3ecfa}.td-box--800 p>a:hover,.td-box--800 p>a:focus{color:#fec555}.td-box--900{color:#fff;background-color:#222}.td-box--900 .td-arrow-down::before{left:50%;margin-left:-30px;bottom:-25px;border-style:solid;border-width:25px 30px 0;border-color:#222 transparent transparent transparent;z-index:3;position:absolute;content:""}.td-box--900 p>a{color:#ecf2fc}.td-box--900 p>a:hover,.td-box--900 p>a:focus{color:#fec555}.td-blog .td-rss-button{position:absolute;top:5.5rem;right:1rem;z-index:22}.td-content .highlight{margin:2rem 0;padding:1rem;background-color:#f8f9fa}.td-content .highlight pre,.td-content .highlight div{background-color:inherit!important}.td-content .highlight pre{margin:0;padding:0}.td-content p code,.td-content li>code,.td-content table code{color:inherit;padding:.2em .4em;margin:0;font-size:85%;word-break:normal;background-color:rgba(0,0,0,.05);border-radius:.25rem}.td-content p code br,.td-content li>code br,.td-content table code br{display:none}.td-content pre{word-wrap:normal;background-color:#f8f9fa;padding:1rem}.td-content pre>code{padding:0;margin:0;font-size:100%;word-break:normal;white-space:pre;border:0}.td-navbar-cover{background:#1ea149}@media(min-width:768px){.td-navbar-cover{background:0 0!important}.td-navbar-cover .nav-link{text-shadow:1px 1px 2px #403f4c}}.td-navbar-cover.navbar-bg-onscroll .nav-link{text-shadow:none}.navbar-bg-onscroll{background:#1ea149!important;opacity:inherit}.td-navbar{background:#1ea149;min-height:4rem;margin:0;z-index:32}@media(min-width:768px){.td-navbar{position:fixed;top:0;width:100%}}.td-navbar .navbar-brand{text-transform:none;text-align:middle}.td-navbar .navbar-brand .nav-link{display:inline-block;margin-right:-30px}.td-navbar .navbar-brand svg{display:inline-block;margin:0 10px;height:30px}.td-navbar .nav-link{text-transform:none;font-weight:700}.td-navbar .td-search-input{border:none}.td-navbar .td-search-input::-webkit-input-placeholder{color:#fff}.td-navbar .td-search-input:-moz-placeholder{color:#fff}.td-navbar .td-search-input::-moz-placeholder{color:#fff}.td-navbar .td-search-input:-ms-input-placeholder{color:#fff}.td-navbar .dropdown{min-width:100px}@media(max-width:991.98px){.td-navbar{padding-right:.5rem;padding-left:.75rem}.td-navbar .td-navbar-nav-scroll{max-width:100%;height:2.5rem;margin-top:.25rem;overflow:hidden;font-size:.875rem}.td-navbar .td-navbar-nav-scroll .nav-link{padding-right:.25rem;padding-left:0}.td-navbar .td-navbar-nav-scroll .navbar-nav{padding-bottom:2rem;overflow-x:auto;white-space:nowrap;-webkit-overflow-scrolling:touch}}.td-sidebar-nav{padding-right:.5rem;margin-right:-15px;margin-left:-15px}@media(min-width:768px){@supports((position:-webkit-sticky) or (position:sticky)){.td-sidebar-nav{max-height:-webkit-calc(100vh - 10rem);max-height:calc(100vh - 10rem);overflow-y:auto}}}@media(min-width:768px){.td-sidebar-nav{display:block!important}}.td-sidebar-nav__section{padding-left:0}.td-sidebar-nav__section li{list-style:none}.td-sidebar-nav__section ul{padding:0;margin:0}@media(min-width:768px){.td-sidebar-nav__section>ul{padding-left:.5rem}}.td-sidebar-nav__section-title{display:block;font-weight:500}.td-sidebar-nav__section-title .active{font-weight:700}.td-sidebar-nav__section-title a{color:#222}.td-sidebar-nav .td-sidebar-link{display:block;padding-bottom:.375rem}.td-sidebar-nav .td-sidebar-link__page{color:#495057;font-weight:300}.td-sidebar-nav a:hover{color:#72a1e5;text-decoration:none}.td-sidebar-nav a.active{font-weight:700}.td-sidebar-nav .dropdown a{color:#495057}.td-sidebar-nav .dropdown .nav-link{padding:0 0 1rem}.td-sidebar{padding-bottom:1rem}@media(min-width:768px){.td-sidebar{padding-top:4rem;background-color:rgba(30,161,73,.03);padding-right:1rem;border-right:1px solid #dee2e6}}.td-sidebar__toggle{line-height:1;color:#222;margin:1rem}.td-sidebar__search{padding:1rem 15px;margin-right:-15px;margin-left:-15px}.td-sidebar__inner{-webkit-box-ordinal-group:1;-webkit-order:0;-ms-flex-order:0;order:0}@media(min-width:768px){@supports((position:-webkit-sticky) or (position:sticky)){.td-sidebar__inner{position:-webkit-sticky;position:sticky;top:4rem;z-index:10;height:-webkit-calc(100vh - 6rem);height:calc(100vh - 6rem)}}}@media(min-width:1200px){.td-sidebar__inner{-webkit-box-flex:0;-webkit-flex:0 1 320px;-ms-flex:0 1 320px;flex:0 1 320px}}.td-sidebar__inner .td-search-box{width:100%}.td-toc{border-left:1px solid #dee2e6;-webkit-box-ordinal-group:3;-webkit-order:2;-ms-flex-order:2;order:2;padding-top:.75rem;padding-bottom:1.5rem;vertical-align:top}@supports((position:-webkit-sticky) or (position:sticky)){.td-toc{position:-webkit-sticky;position:sticky;top:4rem;height:-webkit-calc(100vh - 10rem);height:calc(100vh - 10rem);overflow-y:auto}}.td-toc a{display:block;font-weight:300;padding-bottom:.25rem}.td-toc li{list-style:none;display:block}.td-toc li li{margin-left:.5rem}.td-toc .td-page-meta a{font-weight:500}.td-toc #TableOfContents a{color:#888}.td-toc #TableOfContents a:hover{color:#72a1e5;text-decoration:none}.td-toc ul{padding-left:0}.breadcrumb{background:0 0;padding-left:0;padding-top:0}.alert{font-weight:500;background:#fff;color:inherit;border-radius:0}.alert-primary{border-style:solid;border-color:#1ea149;border-width:0 0 0 4px}.alert-primary .alert-heading{color:#1ea149}.alert-secondary{border-style:solid;border-color:#ffa630;border-width:0 0 0 4px}.alert-secondary .alert-heading{color:#ffa630}.alert-success{border-style:solid;border-color:#3772ff;border-width:0 0 0 4px}.alert-success .alert-heading{color:#3772ff}.alert-info{border-style:solid;border-color:#c0e0de;border-width:0 0 0 4px}.alert-info .alert-heading{color:#c0e0de}.alert-warning{border-style:solid;border-color:#ed6a5a;border-width:0 0 0 4px}.alert-warning .alert-heading{color:#ed6a5a}.alert-danger{border-style:solid;border-color:#ed6a5a;border-width:0 0 0 4px}.alert-danger .alert-heading{color:#ed6a5a}.alert-light{border-style:solid;border-color:#d3f3ee;border-width:0 0 0 4px}.alert-light .alert-heading{color:#d3f3ee}.alert-dark{border-style:solid;border-color:#403f4c;border-width:0 0 0 4px}.alert-dark .alert-heading{color:#403f4c}.td-content{-webkit-box-ordinal-group:2;-webkit-order:1;-ms-flex-order:1;order:1}.td-content p,.td-content li,.td-content td{font-weight:400}.td-content>h1{font-weight:700;margin-bottom:1rem}.td-content>h2{margin-bottom:1rem}.td-content>h2:not(:first-child){margin-top:3rem}.td-content>h2+h3{margin-top:1rem}.td-content>h3,.td-content>h4,.td-content>h5,.td-content>h6{margin-bottom:1rem;margin-top:2rem}.td-content>blockquote{padding:0 0 0 1rem;margin-bottom:1rem;color:#888;border-left:6px solid #ffa630}.td-content>ul li,.td-content>ol li{margin-bottom:.25rem}.td-content strong{font-weight:700}.td-content .alert:not(:first-child){margin-top:2rem;margin-bottom:2rem}.td-content .lead{margin-bottom:1.5rem}.td-title{margin-top:1rem;margin-bottom:.5rem}@media(min-width:576px){.td-title{font-size:3rem}}.td-search-input{background:0 0;font-family:"font awesome 5 free",open sans,-apple-system,BlinkMacSystemFont,segoe ui,Roboto,helvetica neue,Arial,sans-serif,apple color emoji,segoe ui emoji,segoe ui symbol}.td-search-input.form-control:focus{border-color:#f4fdf7;-webkit-box-shadow:0 0 0 2px #73e598;box-shadow:0 0 0 2px #73e598}.td-outer{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;height:100vh}@media(min-width:768px){.td-default main section:first-of-type{padding-top:8rem}}.td-main{-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1}.td-main main{padding-bottom:2rem}@media(min-width:768px){.td-main main{padding-top:5.5rem}}.td-cover-block--height-min{min-height:300px}.td-cover-block--height-med{min-height:400px}.td-cover-block--height-max{min-height:500px}.td-cover-block--height-full{min-height:100vh}@media(min-width:768px){.td-cover-block--height-min{min-height:450px}.td-cover-block--height-med{min-height:500px}.td-cover-block--height-max{min-height:650px}}.td-cover-logo{margin-right:.5em}.td-cover-block{position:relative;padding-top:5rem;padding-bottom:5rem;background-repeat:no-repeat;background-position:50% 0;-webkit-background-size:cover;background-size:cover}.td-bg-arrow-wrapper{position:relative}.section-index .entry{padding:.75rem}.section-index h5{margin-bottom:0}.section-index h5 a{font-weight:700}.section-index p{margin-top:0}.pageinfo{font-weight:500;background:#f8f9fa;color:inherit;border-radius:0;margin:2rem;padding:1.5rem;padding-bottom:.5rem;width:77.5%}.pageinfo-primary{border-style:solid;border-color:#1ea149}.pageinfo-secondary{border-style:solid;border-color:#ffa630}.pageinfo-success{border-style:solid;border-color:#3772ff}.pageinfo-info{border-style:solid;border-color:#c0e0de}.pageinfo-warning{border-style:solid;border-color:#ed6a5a}.pageinfo-danger{border-style:solid;border-color:#ed6a5a}.pageinfo-light{border-style:solid;border-color:#d3f3ee}.pageinfo-dark{border-style:solid;border-color:#403f4c}div.row div.col-lg-4 p a{font-size:90%;background-color:#eaaa2c;padding:10px 12px;color:#f5f5f5}footer{min-height:150px}@media(max-width:991.98px){footer{min-height:200px}}@media(min-width:768px){.td-offset-anchor:target{display:block;position:relative;top:-4rem;visibility:hidden}h2[id]:before,h3[id]:before,h4[id]:before,h5[id]:before{display:block;content:" ";margin-top:-5rem;height:5rem;visibility:hidden}} \ No newline at end of file diff --git a/docs/search/index.html b/docs/search/index.html deleted file mode 100644 index 190f7e98c..000000000 --- a/docs/search/index.html +++ /dev/null @@ -1,138 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Search Results | Jenkins Operator - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - -
-
-
- -
-
-

Search Results

- - - - -
-
- - -
- -
-
-
-
- -
-
- -
-
- © 2023 Jenkins Operator is created by VirtusLab. Source is available under Apache License Version 2 and website content under Creative Commons Attribution-ShareAlike 4.0.
- Jenkins® is a registered trademark of Software in the Public Interest, Inc. - -

What's the Jenkins Operator?

- -
-
-
-
- - -
- - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/sitemap.xml b/docs/sitemap.xml deleted file mode 100644 index d285a9e3e..000000000 --- a/docs/sitemap.xml +++ /dev/null @@ -1,476 +0,0 @@ - - - - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/installing-the-operator/ - 2023-01-08T00:00:00+00:00 - - - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.6.x/installing-the-operator/ - 2021-12-08T00:00:00+00:00 - - - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/ - 2021-12-08T00:00:00+00:00 - - - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.6.x/ - 2021-12-08T00:00:00+00:00 - - - - https://jenkinsci.github.io/kubernetes-operator/docs/how-it-works/architecture-and-design/ - 2021-10-01T00:00:00+00:00 - - - - https://jenkinsci.github.io/kubernetes-operator/docs/how-it-works/ - 2021-08-19T00:00:00+00:00 - - - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.5.x/deploy-jenkins/ - 2021-01-25T00:00:00+00:00 - - - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.4.x/deploy-jenkins/ - 2020-04-13T00:00:00+00:00 - - - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.3.x/deploy-jenkins/ - 2019-12-20T00:00:00+00:00 - - - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.1.x/deploy-jenkins/ - 2019-08-05T00:00:00+00:00 - - - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.2.x/deploy-jenkins/ - 2019-08-05T00:00:00+00:00 - - - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.1.x/configuration/ - 2023-01-16T00:00:00+00:00 - - - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/deploying-jenkins/ - 2021-12-08T00:00:00+00:00 - - - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.6.x/deploying-jenkins/ - 2021-12-08T00:00:00+00:00 - - - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.5.x/configuration/ - 2021-10-01T00:00:00+00:00 - - - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/ - 2021-08-19T00:00:00+00:00 - - - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.5.x/ - 2021-08-19T00:00:00+00:00 - - - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.4.x/configuration/ - 2020-04-13T00:00:00+00:00 - - - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.3.x/configuration/ - 2019-12-20T00:00:00+00:00 - - - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.2.x/configuration/ - 2019-08-05T00:00:00+00:00 - - - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/customizing-jenkins/ - 2021-12-08T00:00:00+00:00 - - - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.6.x/customizing-jenkins/ - 2021-12-08T00:00:00+00:00 - - - - https://jenkinsci.github.io/kubernetes-operator/docs/security/ - 2021-10-06T00:00:00+00:00 - - - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.5.x/customization/ - 2021-10-01T00:00:00+00:00 - - - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.4.x/ - 2021-08-19T00:00:00+00:00 - - - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.4.x/customization/ - 2020-04-13T00:00:00+00:00 - - - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.3.x/customization/ - 2019-12-20T00:00:00+00:00 - - - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.1.x/customization/ - 2019-08-05T00:00:00+00:00 - - - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.2.x/customization/ - 2019-08-05T00:00:00+00:00 - - - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configuring-seed-jobs-and-pipelines/ - 2021-12-08T00:00:00+00:00 - - - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.6.x/configuring-seed-jobs-and-pipelines/ - 2021-12-08T00:00:00+00:00 - - - - https://jenkinsci.github.io/kubernetes-operator/docs/troubleshooting/ - 2021-10-06T00:00:00+00:00 - - - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.3.x/ - 2021-08-19T00:00:00+00:00 - - - - https://jenkinsci.github.io/kubernetes-operator/docs/developer-guide/ - 2023-01-16T00:00:00+00:00 - - - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configuring-backup-and-restore/ - 2023-01-08T00:00:00+00:00 - - - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.6.x/configuring-backup-and-restore/ - 2021-12-08T00:00:00+00:00 - - - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.2.x/ - 2021-08-19T00:00:00+00:00 - - - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/separate-namespaces/ - 2021-12-08T00:00:00+00:00 - - - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.6.x/separate-namespaces/ - 2021-12-08T00:00:00+00:00 - - - - https://jenkinsci.github.io/kubernetes-operator/docs/faq/ - 2021-08-19T00:00:00+00:00 - - - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.1.x/ - 2021-08-19T00:00:00+00:00 - - - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/custom-backup-and-restore/ - 2021-12-08T00:00:00+00:00 - - - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.6.x/custom-backup-and-restore/ - 2021-12-08T00:00:00+00:00 - - - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/aks/ - 2021-12-08T00:00:00+00:00 - - - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.6.x/aks/ - 2021-12-08T00:00:00+00:00 - - - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/ldap/ - 2021-12-08T00:00:00+00:00 - - - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.6.x/ldap/ - 2021-12-08T00:00:00+00:00 - - - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/openshift/ - 2021-12-08T00:00:00+00:00 - - - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.6.x/openshift/ - 2021-12-08T00:00:00+00:00 - - - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.5.x/configure-backup-and-restore/ - 2021-01-25T00:00:00+00:00 - - - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.5.x/aks/ - 2021-01-18T00:00:00+00:00 - - - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.5.x/custom-backup-and-restore/ - 2021-01-18T00:00:00+00:00 - - - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.5.x/notifications/ - 2021-01-18T00:00:00+00:00 - - - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.4.x/aks/ - 2020-04-13T00:00:00+00:00 - - - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.4.x/configure-backup-and-restore/ - 2020-04-13T00:00:00+00:00 - - - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.4.x/custom-backup-and-restore/ - 2020-04-13T00:00:00+00:00 - - - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.4.x/notifications/ - 2020-04-13T00:00:00+00:00 - - - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.3.x/migration/ - 2020-01-03T00:00:00+00:00 - - - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.3.x/aks/ - 2019-12-20T00:00:00+00:00 - - - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.3.x/configure-backup-and-restore/ - 2019-12-20T00:00:00+00:00 - - - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.3.x/custom-backup-and-restore/ - 2019-12-20T00:00:00+00:00 - - - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.3.x/notifications/ - 2019-12-20T00:00:00+00:00 - - - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.1.x/aks/ - 2019-08-05T00:00:00+00:00 - - - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.2.x/aks/ - 2019-08-05T00:00:00+00:00 - - - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.1.x/configure-backup-and-restore/ - 2019-08-05T00:00:00+00:00 - - - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.2.x/configure-backup-and-restore/ - 2019-08-05T00:00:00+00:00 - - - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.2.x/custom-backup-and-restore/ - 2019-08-05T00:00:00+00:00 - - - - https://jenkinsci.github.io/kubernetes-operator/docs/how-it-works/jenkins-docker-images/ - 2019-08-05T00:00:00+00:00 - - - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.2.x/migration/ - 2019-08-05T00:00:00+00:00 - - - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/schema/ - 2023-01-08T00:00:00+00:00 - - - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.6.x/schema/ - 2021-12-08T00:00:00+00:00 - - - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.4.x/openshift/ - 2020-04-29T00:00:00+00:00 - - - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.5.x/openshift/ - 2020-04-29T00:00:00+00:00 - - - - https://jenkinsci.github.io/kubernetes-operator/docs/ - 2019-09-03T00:00:00+00:00 - - - - https://jenkinsci.github.io/kubernetes-operator/blog/news/ - 2018-10-06T00:00:00+00:00 - - - - https://jenkinsci.github.io/kubernetes-operator/blog/releases/ - 2018-01-04T00:00:00+00:00 - - - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.5.x/diagnostics/ - 2021-01-18T00:00:00+00:00 - - - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.5.x/schema/ - 2021-01-18T00:00:00+00:00 - - - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.4.x/diagnostics/ - 2020-04-13T00:00:00+00:00 - - - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.4.x/schema/ - 2020-04-13T00:00:00+00:00 - - - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.3.x/diagnostics/ - 2019-12-20T00:00:00+00:00 - - - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.3.x/schema/ - 2019-12-20T00:00:00+00:00 - - - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.1.x/diagnostics/ - 2019-08-05T00:00:00+00:00 - - - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.2.x/diagnostics/ - 2019-08-05T00:00:00+00:00 - - - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.2.x/schema/ - 2019-08-05T00:00:00+00:00 - - - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.1.x/scheme/ - 2019-08-05T00:00:00+00:00 - - - - https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.1.x/migration-guide-v1alpha1-to-v1alpha2/ - 2019-08-05T00:00:00+00:00 - - - - https://jenkinsci.github.io/kubernetes-operator/ - 2023-01-16T00:00:00+00:00 - - - - https://jenkinsci.github.io/kubernetes-operator/blog/2018/10/06/easy-documentation-with-docsy/ - 2018-10-06T00:00:00+00:00 - - - - https://jenkinsci.github.io/kubernetes-operator/blog/2018/10/06/the-second-blog-post/ - 2018-10-06T00:00:00+00:00 - - - - https://jenkinsci.github.io/kubernetes-operator/blog/2018/01/04/another-great-release/ - 2018-01-04T00:00:00+00:00 - - - - https://jenkinsci.github.io/kubernetes-operator/blog/ - - - - https://jenkinsci.github.io/kubernetes-operator/community/ - - - - https://jenkinsci.github.io/kubernetes-operator/search/ - - - - https://jenkinsci.github.io/kubernetes-operator/about/ - - - \ No newline at end of file diff --git a/docs/webfonts/fa-brands-400.eot b/docs/webfonts/fa-brands-400.eot deleted file mode 100644 index 9c3f23f74..000000000 Binary files a/docs/webfonts/fa-brands-400.eot and /dev/null differ diff --git a/docs/webfonts/fa-brands-400.svg b/docs/webfonts/fa-brands-400.svg deleted file mode 100644 index 94bf39be9..000000000 --- a/docs/webfonts/fa-brands-400.svg +++ /dev/null @@ -1,1131 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/webfonts/fa-brands-400.ttf b/docs/webfonts/fa-brands-400.ttf deleted file mode 100644 index 397a4216f..000000000 Binary files a/docs/webfonts/fa-brands-400.ttf and /dev/null differ diff --git a/docs/webfonts/fa-brands-400.woff b/docs/webfonts/fa-brands-400.woff deleted file mode 100644 index 201203d47..000000000 Binary files a/docs/webfonts/fa-brands-400.woff and /dev/null differ diff --git a/docs/webfonts/fa-brands-400.woff2 b/docs/webfonts/fa-brands-400.woff2 deleted file mode 100644 index aa1a33613..000000000 Binary files a/docs/webfonts/fa-brands-400.woff2 and /dev/null differ diff --git a/docs/webfonts/fa-regular-400.eot b/docs/webfonts/fa-regular-400.eot deleted file mode 100644 index 18733ca52..000000000 Binary files a/docs/webfonts/fa-regular-400.eot and /dev/null differ diff --git a/docs/webfonts/fa-regular-400.svg b/docs/webfonts/fa-regular-400.svg deleted file mode 100644 index 155e263bc..000000000 --- a/docs/webfonts/fa-regular-400.svg +++ /dev/null @@ -1,471 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/webfonts/fa-regular-400.ttf b/docs/webfonts/fa-regular-400.ttf deleted file mode 100644 index 9ed2581b6..000000000 Binary files a/docs/webfonts/fa-regular-400.ttf and /dev/null differ diff --git a/docs/webfonts/fa-regular-400.woff b/docs/webfonts/fa-regular-400.woff deleted file mode 100644 index 2e2a00f0f..000000000 Binary files a/docs/webfonts/fa-regular-400.woff and /dev/null differ diff --git a/docs/webfonts/fa-regular-400.woff2 b/docs/webfonts/fa-regular-400.woff2 deleted file mode 100644 index 5657c1a00..000000000 Binary files a/docs/webfonts/fa-regular-400.woff2 and /dev/null differ diff --git a/docs/webfonts/fa-solid-900.eot b/docs/webfonts/fa-solid-900.eot deleted file mode 100644 index 58c85e198..000000000 Binary files a/docs/webfonts/fa-solid-900.eot and /dev/null differ diff --git a/docs/webfonts/fa-solid-900.svg b/docs/webfonts/fa-solid-900.svg deleted file mode 100644 index 281ab15c1..000000000 --- a/docs/webfonts/fa-solid-900.svg +++ /dev/null @@ -1,2235 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/webfonts/fa-solid-900.ttf b/docs/webfonts/fa-solid-900.ttf deleted file mode 100644 index ed7140852..000000000 Binary files a/docs/webfonts/fa-solid-900.ttf and /dev/null differ diff --git a/docs/webfonts/fa-solid-900.woff b/docs/webfonts/fa-solid-900.woff deleted file mode 100644 index f58c44585..000000000 Binary files a/docs/webfonts/fa-solid-900.woff and /dev/null differ diff --git a/docs/webfonts/fa-solid-900.woff2 b/docs/webfonts/fa-solid-900.woff2 deleted file mode 100644 index 8670c4ed2..000000000 Binary files a/docs/webfonts/fa-solid-900.woff2 and /dev/null differ diff --git a/nix/website-build.nix b/nix/website-build.nix index 9962ced6b..7766380a4 100644 --- a/nix/website-build.nix +++ b/nix/website-build.nix @@ -13,10 +13,10 @@ in pkgs.buildNpmPackage { name = "jenkins-kubernetes-operator-website"; src = ../website; - version = "0.0.1"; - npmDepsHash = "sha256-NcspVYF+9dCrGxH/cGNhD+TxLZm6ZDX523mKm9smAAA="; + version = "0.0.2"; + npmDepsHash = "sha256-VrHuyqTPUzVJSjah+BWfg7R9yiarJQ2MDvEdqkOWddM="; nativeBuildInputs = buildPackages; - buildPhase = "npm run build"; + buildPhase = "${pkgs.nodejs_21}/bin/npm run build"; installPhase = "cp -r public $out"; BASE_URL = "${baseUrl}"; } diff --git a/test/bats/1-deploy.bats b/test/bats/1-deploy.bats index 5a6e6d383..ea5e327e6 100644 --- a/test/bats/1-deploy.bats +++ b/test/bats/1-deploy.bats @@ -42,7 +42,7 @@ diag() { --set jenkins.seedJobs[0].repositoryBranch=master \ --set jenkins.seedJobs[0].repositoryUrl=https://github.com/jenkinsci/kubernetes-operator \ --set jenkins.seedJobs[0].buildPeriodically="10 * * * *" \ - jenkins-operator/jenkins-operator --version=$(cat VERSION.txt | sed 's/v//') + jenkins-operator/jenkins-operator --version=$(get_latest_chart_version) assert_success assert ${HELM} status default touch "chart/jenkins-operator/deploy.tmp" @@ -136,7 +136,7 @@ diag() { run verify "there is 1 pod named 'seed-job-agent-jenkins-'" assert_success - sleep 5 + sleep 10 run ${KUBECTL} logs -l app=seed-job-agent-selector --tail=20000 assert_success diff --git a/test/bats/2-deploy-with-more-options.bats b/test/bats/2-deploy-with-more-options.bats index c685e57ee..e3a99fda0 100644 --- a/test/bats/2-deploy-with-more-options.bats +++ b/test/bats/2-deploy-with-more-options.bats @@ -32,7 +32,7 @@ setup() { --set jenkins.image="jenkins/jenkins:2.452.2-lts" \ --set jenkins.backup.makeBackupBeforePodDeletion=false \ --set jenkins.backup.image=quay.io/jenkins-kubernetes-operator/backup-pvc:e2e-test \ - jenkins-operator/jenkins-operator --version=$(cat VERSION.txt | sed 's/v//') + jenkins-operator/jenkins-operator --version=$(get_latest_chart_version) assert_success assert ${HELM} status options touch "chart/jenkins-operator/deploy.tmp" diff --git a/test/bats/3-deploy-with-webhook.bats b/test/bats/3-deploy-with-webhook.bats index 9e6343a89..d2ea751cf 100644 --- a/test/bats/3-deploy-with-webhook.bats +++ b/test/bats/3-deploy-with-webhook.bats @@ -33,7 +33,7 @@ setup() { --set jenkins.backup.makeBackupBeforePodDeletion=true \ --set jenkins.backup.image=quay.io/jenkins-kubernetes-operator/backup-pvc:e2e-test \ --set webhook.enabled=true \ - jenkins-operator/jenkins-operator --version=$(cat VERSION.txt | sed 's/v//') + jenkins-operator/jenkins-operator --version=$(get_latest_chart_version) assert_success assert ${HELM} status webhook touch "chart/jenkins-operator/deploy.tmp" diff --git a/test/bats/test_helper.bash b/test/bats/test_helper.bash index bb5da0b30..259776293 100644 --- a/test/bats/test_helper.bash +++ b/test/bats/test_helper.bash @@ -11,3 +11,7 @@ _common_setup() { export KUBECTL="kubectl --context=${CONTEXT} -n ${DETIK_CLIENT_NAMESPACE}" export HELM="helm --kube-context=${CONTEXT} -n ${DETIK_CLIENT_NAMESPACE}" } + +get_latest_chart_version() { + helm search repo jenkins-operator/jenkins --versions | awk 'NR==2 {print $2}' | sed 's/v//' +} diff --git a/website/content/en/blog/news/first-post/featured-sunset-get.png b/website/content/en/blog/news/first-post/featured-sunset-get.png deleted file mode 100644 index db3373c0b..000000000 Binary files a/website/content/en/blog/news/first-post/featured-sunset-get.png and /dev/null differ diff --git a/website/content/en/blog/news/first-post/index.md b/website/content/en/blog/news/first-post/index.md deleted file mode 100644 index b6bfb4772..000000000 --- a/website/content/en/blog/news/first-post/index.md +++ /dev/null @@ -1,46 +0,0 @@ ---- -date: 2018-10-06 -title: "Easy documentation with Docsy" -linkTitle: "Announcing Docsy" -description: "The Docsy Hugo theme lets project maintainers and contributors focus on content, not on reinventing a website infrastructure from scratch" -author: Riona MacNamara ([@rionam](https://twitter.com/bepsays)) -resources: -- src: "**.{png,jpg}" - title: "Image #:counter" - params: - byline: "Photo: Riona MacNamara / CC-BY-CA" ---- - -**This is a typical blog post that includes images.** - -The front matter specifies the date of the blog post, its title, a short description that will be displayed on the blog landing page, and its author. - -## Including images - -Here's an image (`featured-sunset-get.png`) that includes a byline and a caption. - -{{< imgproc sunset Fill "600x300" >}} -Fetch and scale an image in the upcoming Hugo 0.43. -{{< /imgproc >}} - -The front matter of this post specifies properties to be assigned to all image resources: - -``` -resources: -- src: "**.{png,jpg}" - title: "Image #:counter" - params: - byline: "Photo: Riona MacNamara / CC-BY-CA" -``` - -To include the image in a page, specify its details like this: - -``` -{{< imgproc sunset Fill "600x300" >}} -Fetch and scale an image in the upcoming Hugo 0.43. -{{< /imgproc >}} -``` - -The image will be rendered at the size and byline specified in the front matter. - - diff --git a/website/content/en/blog/news/release-0-8-1.md b/website/content/en/blog/news/release-0-8-1.md new file mode 100644 index 000000000..2b15cde96 --- /dev/null +++ b/website/content/en/blog/news/release-0-8-1.md @@ -0,0 +1,7 @@ +--- +title: "Lorem ipsum" +linkTitle: "Temporary title" +date: 2024-04-07 +description: > + TODO: change this +--- diff --git a/website/content/en/blog/news/second-post.md b/website/content/en/blog/news/second-post.md deleted file mode 100755 index 5185f85ef..000000000 --- a/website/content/en/blog/news/second-post.md +++ /dev/null @@ -1,245 +0,0 @@ - ---- -title: "The second blog post" -linkTitle: "Second blog post" -date: 2018-10-06 -description: > - A short lead description about this content page. Text here can also be **bold** or _italic_ and can even be split over multiple paragraphs. ---- - -Text can be **bold**, _italic_, or ~~strikethrough~~. [Links](https://github.com) should be blue with no underlines (unless hovered over). - -There should be whitespace between paragraphs. There should be whitespace between paragraphs. There should be whitespace between paragraphs. There should be whitespace between paragraphs. - -There should be whitespace between paragraphs. There should be whitespace between paragraphs. There should be whitespace between paragraphs. There should be whitespace between paragraphs. - -> There should be no margin above this first sentence. -> -> Blockquotes should be a lighter gray with a border along the left side in the secondary color. -> -> There should be no margin below this final sentence. - -## First Header - -This is a normal paragraph following a header. Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong. Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong. Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong. - - - -Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong. - -On big screens, paragraphs and headings should not take up the full container width, but we want tables, code blocks and similar to take the full width. - -Lorem markdownum tuta hospes stabat; idem saxum facit quaterque repetito -occumbere, oves novem gestit haerebat frena; qui. Respicit recurvam erat: -pignora hinc reppulit nos **aut**, aptos, ipsa. - -Meae optatos *passa est* Epiros utiliter *Talibus niveis*, hoc lata, edidit. -Dixi ad aestum. - -## Header 2 - -> This is a blockquote following a header. Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong. - -### Header 3 - -``` -This is a code block following a header. -``` - -#### Header 4 - -* This is an unordered list following a header. -* This is an unordered list following a header. -* This is an unordered list following a header. - -##### Header 5 - -1. This is an ordered list following a header. -2. This is an ordered list following a header. -3. This is an ordered list following a header. - -###### Header 6 - -| What | Follows | -|-----------|-----------------| -| A table | A header | -| A table | A header | -| A table | A header | - ----------------- - -There's a horizontal rule above and below this. - ----------------- - -Here is an unordered list: - -* Salt-n-Pepa -* Bel Biv DeVoe -* Kid 'N Play - -And an ordered list: - -1. Michael Jackson -2. Michael Bolton -3. Michael Bublé - -And an unordered task list: - -- [x] Create a sample markdown document -- [x] Add task lists to it -- [ ] Take a vacation - -And a "mixed" task list: - -- [ ] Steal underpants -- ? -- [ ] Profit! - -And a nested list: - -* Jackson 5 - * Michael - * Tito - * Jackie - * Marlon - * Jermaine -* TMNT - * Leonardo - * Michelangelo - * Donatello - * Raphael - -Definition lists can be used with Markdown syntax. Definition terms are bold. - -Name -: Godzilla - -Born -: 1952 - -Birthplace -: Japan - -Color -: Green - - ----------------- - -Tables should have bold headings and alternating shaded rows. - -| Artist | Album | Year | -|-------------------|-----------------|------| -| Michael Jackson | Thriller | 1982 | -| Prince | Purple Rain | 1984 | -| Beastie Boys | License to Ill | 1986 | - -If a table is too wide, it should scroll horizontally. - -| Artist | Album | Year | Label | Awards | Songs | -|-------------------|-----------------|------|-------------|----------|-----------| -| Michael Jackson | Thriller | 1982 | Epic Records | Grammy Award for Album of the Year, American Music Award for Favorite Pop/Rock Album, American Music Award for Favorite Soul/R&B Album, Brit Award for Best Selling Album, Grammy Award for Best Engineered Album, Non-Classical | Wanna Be Startin' Somethin', Baby Be Mine, The Girl Is Mine, Thriller, Beat It, Billie Jean, Human Nature, P.Y.T. (Pretty Young Thing), The Lady in My Life | -| Prince | Purple Rain | 1984 | Warner Brothers Records | Grammy Award for Best Score Soundtrack for Visual Media, American Music Award for Favorite Pop/Rock Album, American Music Award for Favorite Soul/R&B Album, Brit Award for Best Soundtrack/Cast Recording, Grammy Award for Best Rock Performance by a Duo or Group with Vocal | Let's Go Crazy, Take Me With U, The Beautiful Ones, Computer Blue, Darling Nikki, When Doves Cry, I Would Die 4 U, Baby I'm a Star, Purple Rain | -| Beastie Boys | License to Ill | 1986 | Mercury Records | noawardsbutthistablecelliswide | Rhymin & Stealin, The New Style, She's Crafty, Posse in Effect, Slow Ride, Girls, (You Gotta) Fight for Your Right, No Sleep Till Brooklyn, Paul Revere, Hold It Now, Hit It, Brass Monkey, Slow and Low, Time to Get Ill | - ----------------- - -Code snippets like `var foo = "bar";` can be shown inline. - -Also, `this should vertically align` ~~`with this`~~ ~~and this~~. - -Code can also be shown in a block element. - -``` -foo := "bar"; -bar := "foo"; -``` - -Code can also use syntax highlighting. - -```go -func main() { - input := `var foo = "bar";` - - lexer := lexers.Get("javascript") - iterator, _ := lexer.Tokenise(nil, input) - style := styles.Get("github") - formatter := html.New(html.WithLineNumbers()) - - var buff bytes.Buffer - formatter.Format(&buff, style, iterator) - - fmt.Println(buff.String()) -} -``` - -``` -Long, single-line code blocks should not wrap. They should horizontally scroll if they are too long. This line should be long enough to demonstrate this. -``` - -Inline code inside table cells should still be distinguishable. - -| Language | Code | -|-------------|--------------------| -| Javascript | `var foo = "bar";` | -| Ruby | `foo = "bar"{` | - ----------------- - -Small images should be shown at their actual size. - -![](http://placekitten.com/g/300/200/) - -Large images should always scale down and fit in the content container. - -![](http://placekitten.com/g/1200/800/) - -## Components - -### Alerts - -{{< alert >}}This is an alert.{{< /alert >}} -{{< alert title="Note:" >}}This is an alert with a title.{{< /alert >}} -{{< alert type="success" >}}This is a successful alert.{{< /alert >}} -{{< alert type="warning" >}}This is a warning!{{< /alert >}} -{{< alert type="warning" title="Warning!" >}}This is a warning with a title!{{< /alert >}} - - -## Sizing - -Add some sections here to see how the ToC looks like. Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong. - -### Parameters available - -Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong. - -### Using pixels - -Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong. - -### Using rem - -Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong. - -## Memory - -Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong. - -### RAM to use - -Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong. - -### More is better - -Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong. - -### Used RAM - -Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong. - - - -``` -This is the final element on the page and there should be no margin below this. -``` diff --git a/website/content/en/blog/releases/_index.md b/website/content/en/blog/releases/_index.md deleted file mode 100644 index b1d9eb4ff..000000000 --- a/website/content/en/blog/releases/_index.md +++ /dev/null @@ -1,8 +0,0 @@ - ---- -title: "New Releases" -linkTitle: "Releases" -weight: 20 ---- - - diff --git a/website/content/en/blog/releases/in-depth-monoliths-detailed-spec.md b/website/content/en/blog/releases/in-depth-monoliths-detailed-spec.md deleted file mode 100755 index b270ba4f0..000000000 --- a/website/content/en/blog/releases/in-depth-monoliths-detailed-spec.md +++ /dev/null @@ -1,245 +0,0 @@ - ---- -title: "Another Great Release" -linkTitle: "Release New Features" -date: 2018-01-04 -description: > - A short lead description about this content page. Text here can also be **bold** or _italic_ and can even be split over multiple paragraphs. ---- - -Text can be **bold**, _italic_, or ~~strikethrough~~. [Links](https://github.com) should be blue with no underlines (unless hovered over). - -There should be whitespace between paragraphs. There should be whitespace between paragraphs. There should be whitespace between paragraphs. There should be whitespace between paragraphs. - -There should be whitespace between paragraphs. There should be whitespace between paragraphs. There should be whitespace between paragraphs. There should be whitespace between paragraphs. - -> There should be no margin above this first sentence. -> -> Blockquotes should be a lighter gray with a border along the left side in the secondary color. -> -> There should be no margin below this final sentence. - -## First Header - -This is a normal paragraph following a header. Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong. Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong. Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong. - - - -Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong. - -On big screens, paragraphs and headings should not take up the full container width, but we want tables, code blocks and similar to take the full width. - -Lorem markdownum tuta hospes stabat; idem saxum facit quaterque repetito -occumbere, oves novem gestit haerebat frena; qui. Respicit recurvam erat: -pignora hinc reppulit nos **aut**, aptos, ipsa. - -Meae optatos *passa est* Epiros utiliter *Talibus niveis*, hoc lata, edidit. -Dixi ad aestum. - -## Header 2 - -> This is a blockquote following a header. Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong. - -### Header 3 - -``` -This is a code block following a header. -``` - -#### Header 4 - -* This is an unordered list following a header. -* This is an unordered list following a header. -* This is an unordered list following a header. - -##### Header 5 - -1. This is an ordered list following a header. -2. This is an ordered list following a header. -3. This is an ordered list following a header. - -###### Header 6 - -| What | Follows | -|-----------|-----------------| -| A table | A header | -| A table | A header | -| A table | A header | - ----------------- - -There's a horizontal rule above and below this. - ----------------- - -Here is an unordered list: - -* Salt-n-Pepa -* Bel Biv DeVoe -* Kid 'N Play - -And an ordered list: - -1. Michael Jackson -2. Michael Bolton -3. Michael Bublé - -And an unordered task list: - -- [x] Create a sample markdown document -- [x] Add task lists to it -- [ ] Take a vacation - -And a "mixed" task list: - -- [ ] Steal underpants -- ? -- [ ] Profit! - -And a nested list: - -* Jackson 5 - * Michael - * Tito - * Jackie - * Marlon - * Jermaine -* TMNT - * Leonardo - * Michelangelo - * Donatello - * Raphael - -Definition lists can be used with Markdown syntax. Definition terms are bold. - -Name -: Godzilla - -Born -: 1952 - -Birthplace -: Japan - -Color -: Green - - ----------------- - -Tables should have bold headings and alternating shaded rows. - -| Artist | Album | Year | -|-------------------|-----------------|------| -| Michael Jackson | Thriller | 1982 | -| Prince | Purple Rain | 1984 | -| Beastie Boys | License to Ill | 1986 | - -If a table is too wide, it should scroll horizontally. - -| Artist | Album | Year | Label | Awards | Songs | -|-------------------|-----------------|------|-------------|----------|-----------| -| Michael Jackson | Thriller | 1982 | Epic Records | Grammy Award for Album of the Year, American Music Award for Favorite Pop/Rock Album, American Music Award for Favorite Soul/R&B Album, Brit Award for Best Selling Album, Grammy Award for Best Engineered Album, Non-Classical | Wanna Be Startin' Somethin', Baby Be Mine, The Girl Is Mine, Thriller, Beat It, Billie Jean, Human Nature, P.Y.T. (Pretty Young Thing), The Lady in My Life | -| Prince | Purple Rain | 1984 | Warner Brothers Records | Grammy Award for Best Score Soundtrack for Visual Media, American Music Award for Favorite Pop/Rock Album, American Music Award for Favorite Soul/R&B Album, Brit Award for Best Soundtrack/Cast Recording, Grammy Award for Best Rock Performance by a Duo or Group with Vocal | Let's Go Crazy, Take Me With U, The Beautiful Ones, Computer Blue, Darling Nikki, When Doves Cry, I Would Die 4 U, Baby I'm a Star, Purple Rain | -| Beastie Boys | License to Ill | 1986 | Mercury Records | noawardsbutthistablecelliswide | Rhymin & Stealin, The New Style, She's Crafty, Posse in Effect, Slow Ride, Girls, (You Gotta) Fight for Your Right, No Sleep Till Brooklyn, Paul Revere, Hold It Now, Hit It, Brass Monkey, Slow and Low, Time to Get Ill | - ----------------- - -Code snippets like `var foo = "bar";` can be shown inline. - -Also, `this should vertically align` ~~`with this`~~ ~~and this~~. - -Code can also be shown in a block element. - -``` -foo := "bar"; -bar := "foo"; -``` - -Code can also use syntax highlighting. - -```go -func main() { - input := `var foo = "bar";` - - lexer := lexers.Get("javascript") - iterator, _ := lexer.Tokenise(nil, input) - style := styles.Get("github") - formatter := html.New(html.WithLineNumbers()) - - var buff bytes.Buffer - formatter.Format(&buff, style, iterator) - - fmt.Println(buff.String()) -} -``` - -``` -Long, single-line code blocks should not wrap. They should horizontally scroll if they are too long. This line should be long enough to demonstrate this. -``` - -Inline code inside table cells should still be distinguishable. - -| Language | Code | -|-------------|--------------------| -| Javascript | `var foo = "bar";` | -| Ruby | `foo = "bar"{` | - ----------------- - -Small images should be shown at their actual size. - -![](http://placekitten.com/g/300/200/) - -Large images should always scale down and fit in the content container. - -![](http://placekitten.com/g/1200/800/) - -## Components - -### Alerts - -{{< alert >}}This is an alert.{{< /alert >}} -{{< alert title="Note:" >}}This is an alert with a title.{{< /alert >}} -{{< alert type="success" >}}This is a successful alert.{{< /alert >}} -{{< alert type="warning" >}}This is a warning!{{< /alert >}} -{{< alert type="warning" title="Warning!" >}}This is a warning with a title!{{< /alert >}} - - -## Sizing - -Add some sections here to see how the ToC looks like. Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong. - -### Parameters available - -Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong. - -### Using pixels - -Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong. - -### Using rem - -Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong. - -## Memory - -Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong. - -### RAM to use - -Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong. - -### More is better - -Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong. - -### Used RAM - -Bacon ipsum dolor sit amet t-bone doner shank drumstick, pork belly porchetta chuck sausage brisket ham hock rump pig. Chuck kielbasa leberkas, pork bresaola ham hock filet mignon cow shoulder short ribs biltong. - - - -``` -This is the final element on the page and there should be no margin below this. -``` diff --git a/website/layouts/partials/navbar.html b/website/layouts/partials/navbar.html index 0eed944ea..d44a5f625 100644 --- a/website/layouts/partials/navbar.html +++ b/website/layouts/partials/navbar.html @@ -10,6 +10,9 @@ + {{ if (gt (len .Site.Home.Translations) 0) }}