Skip to content

Commit

Permalink
Provides an Override to the WATCH_NAMESPACE env variable.
Browse files Browse the repository at this point in the history
In case the Jenkins instance is disabled, this commit allows us to pick
a different namespace for the deployment by configuring the operator
object instead of the jenkins object.
  • Loading branch information
João Valença committed Oct 27, 2023
1 parent 3682468 commit 6da412f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 2 additions & 0 deletions chart/jenkins-operator/templates/operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ spec:
- name: WATCH_NAMESPACE
{{- if .Values.jenkins.enabled }}
value: {{ .Values.jenkins.namespace }}
{{- else if .Values.operator.watchNamespace }}
value: {{ .Values.operator.watchNamespace }}
{{- else }}
valueFrom:
fieldRef:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,13 @@ Name of resource. The pod name will be <code>jenkins-&lt;name&gt;</code> (name w
<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>)
Namespace the resources will be deployed to. If omitted, the resources will be deployed to the same namespace as the operator.
It's not recommended to use default namespace. Create new namespace for jenkins (e.g. <code>kubectl create -n jenkins</code>).

<b>Note:</b> If the Jenkins instance is disabled, this propery will be ignored. Use the `operator.watchNamespace` property instead.

Check failure on line 136 in website/content/en/docs/Getting Started/latest/installing-the-operator.md

View workflow job for this annotation

GitHub Actions / codespell

propery ==> property, properly
</td>
</tr>
<tr>
Expand Down

0 comments on commit 6da412f

Please sign in to comment.