You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For a summary of all configurable options, see [VALUES_SUMMARY.md](./VALUES_SUMMARY.md)
72
72
73
+
### Configuration as Code
74
+
75
+
Jenkins Configuration as Code is now a standard component in the Jenkins project.
76
+
Add a key under configScripts for each configuration area, where each corresponds to a plugin or section of the UI.
77
+
The keys (prior to `|` character) are just labels, and can be any value.
78
+
They are only used to give the section a meaningful name.
79
+
The only restriction is they must conform to RFC 1123 definition of a DNS label, so they may only contain lowercase letters, numbers, and hyphens.
80
+
Each key will become the name of a configuration yaml file on the master in /var/jenkins_home/casc_configs (by default) and will be processed by the Configuration as Code Plugin during Jenkins startup.
81
+
The lines after each `|` become the content of the configuration yaml file.
82
+
The first line after this is a JCasC root element, e.g. jenkins, credentials, etc.
83
+
Best reference is the Documentation link here: `https://<jenkins_url>/configuration-as-code`.
84
+
The example below creates ldap settings:
85
+
86
+
```yaml
87
+
configScripts:
88
+
ldap-settings: |
89
+
jenkins:
90
+
securityRealm:
91
+
ldap:
92
+
configurations:
93
+
- server: ldap.acme.com
94
+
rootDN: dc=acme,dc=uk
95
+
managerPasswordSecret: ${LDAP_PASSWORD}
96
+
groupMembershipStrategy:
97
+
fromUserRecord:
98
+
attributeName: "memberOf"
99
+
```
100
+
101
+
Further JCasC examples can be found [here](https://github.com/jenkinsci/configuration-as-code-plugin/tree/master/demos).
102
+
103
+
#### Config as Code With or Without Auto-Reload
104
+
105
+
Config as Code changes (to `master.JCasC.configScripts`) can either force a new pod to be created and only be applied at next startup, or can be auto-reloaded on-the-fly.
106
+
If you set `master.sidecars.autoConfigReload.enabled` to `true`, a second, auxiliary container will be installed into the Jenkins master pod, known as a "sidecar".
107
+
This watches for changes to configScripts, copies the content onto the Jenkins file-system and issues a POST to `http://<jenkins_url>/reload-configuration-as-code` with a pre-shared key.
108
+
You can monitor this sidecar's logs using command `kubectl logs <master_pod> -c jenkins-sc-config -f`.
109
+
If you want to enable auto-reload then you also need to configure rbac as the container which triggers the reload needs to watch the config maps:
110
+
111
+
```yaml
112
+
master:
113
+
JCasC:
114
+
enabled: true
115
+
sidecars:
116
+
configAutoReload:
117
+
enabled: true
118
+
rbac:
119
+
create: true
120
+
```
121
+
73
122
### Allow Limited HTML Markup in User-Submitted Text
74
123
Some third-party systems (e.g. GitHub) use HTML-formatted data in their payload sent to a Jenkins webhook (e.g. URL of a pull-request being built).
75
124
To display such data as processed HTML instead of raw text set `master.enableRawHtmlMarkupFormatter` to true.
@@ -161,54 +210,6 @@ It is possible to define which storage class to use, by setting `persistence.sto
161
210
If set to a dash (`-`), dynamic provisioning is disabled.
162
211
If the storage class is set to null or left undefined (`""`), the default provisioner is used (gp2 on AWS, standard on GKE, AWS & OpenStack).
163
212
164
-
### Configuration as Code
165
-
166
-
Jenkins Configuration as Code is now a standard component in the Jenkins project.
167
-
Add a key under configScripts for each configuration area, where each corresponds to a plugin or section of the UI.
168
-
The keys (prior to `|` character) are just labels, and can be any value.
169
-
They are only used to give the section a meaningful name.
170
-
The only restriction is they must conform to RFC 1123 definition of a DNS label, so they may only contain lowercase letters, numbers, and hyphens.
171
-
Each key will become the name of a configuration yaml file on the master in /var/jenkins_home/casc_configs (by default) and will be processed by the Configuration as Code Plugin during Jenkins startup.
172
-
The lines after each `|` become the content of the configuration yaml file.
173
-
The first line after this is a JCasC root element, e.g. jenkins, credentials, etc.
174
-
Best reference is the Documentation link here: `https://<jenkins_url>/configuration-as-code`.
175
-
The example below creates ldap settings:
176
-
177
-
```yaml
178
-
configScripts:
179
-
ldap-settings: |
180
-
jenkins:
181
-
securityRealm:
182
-
ldap:
183
-
configurations:
184
-
- server: ldap.acme.com
185
-
rootDN: dc=acme,dc=uk
186
-
managerPasswordSecret: ${LDAP_PASSWORD}
187
-
groupMembershipStrategy:
188
-
fromUserRecord:
189
-
attributeName: "memberOf"
190
-
```
191
-
192
-
Further JCasC examples can be found [here](https://github.com/jenkinsci/configuration-as-code-plugin/tree/master/demos).
193
-
194
-
#### Config as Code With or Without Auto-Reload
195
-
196
-
Config as Code changes (to `master.JCasC.configScripts`) can either force a new pod to be created and only be applied at next startup, or can be auto-reloaded on-the-fly.
197
-
If you set `master.sidecars.autoConfigReload.enabled` to `true`, a second, auxiliary container will be installed into the Jenkins master pod, known as a "sidecar".
198
-
This watches for changes to configScripts, copies the content onto the Jenkins file-system and issues a POST to `http://<jenkins_url>/reload-configuration-as-code` with a pre-shared key.
199
-
You can monitor this sidecar's logs using command `kubectl logs <master_pod> -c jenkins-sc-config -f`.
200
-
If you want to enable auto-reload then you also need to configure rbac as the container which triggers the reload needs to watch the config maps:
0 commit comments