Provides an Override to the WATCH_NAMESPACE env variable. (#923)

Co-authored-by: João Valença <joao.valenca@feedzai.com>
This commit is contained in:
João Valença 2024-02-04 17:34:36 +00:00 committed by GitHub
parent 332eabe8d7
commit bfda3c8cf9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 11 additions and 3 deletions

View File

@ -57,6 +57,8 @@ spec:
- name: WATCH_NAMESPACE - name: WATCH_NAMESPACE
{{- if .Values.jenkins.enabled }} {{- if .Values.jenkins.enabled }}
value: {{ .Values.jenkins.namespace }} value: {{ .Values.jenkins.namespace }}
{{- else if .Values.operator.watchNamespace }}
value: {{ .Values.operator.watchNamespace }}
{{- else }} {{- else }}
valueFrom: valueFrom:
fieldRef: fieldRef:

View File

@ -308,6 +308,10 @@ operator:
# fullnameOverride overrides the deployment name # fullnameOverride overrides the deployment name
fullnameOverride: "" fullnameOverride: ""
# Select a different namespace to look for the Jenkins CR and deploy Jenkins in. Defaults to the same namespace as
# the operator.
# watchNamespace: "jenkins-namespace"
resources: {} resources: {}
nodeSelector: {} nodeSelector: {}
tolerations: [] tolerations: []

View File

@ -127,11 +127,13 @@ Name of resource. The pod name will be <code>jenkins-&lt;name&gt;</code> (name w
<code>namespace</code> <code>namespace</code>
</td> </td>
<td> <td>
default ""
</td> </td>
<td> <td>
Namespace the resources will be deployed to. It's not recommended to use default namespace. Namespace the resources will be deployed to. If omitted, the resources will be deployed to the same namespace as the operator.
Create new namespace for jenkins (e.g. <code>kubectl create -n jenkins</code>) 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 property will be ignored. Use the `operator.watchNamespace` property instead.
</td> </td>
</tr> </tr>
<tr> <tr>