diff --git a/chart/jenkins-operator/templates/jenkins.yaml b/chart/jenkins-operator/templates/jenkins.yaml index 1d580066..b2650342 100644 --- a/chart/jenkins-operator/templates/jenkins.yaml +++ b/chart/jenkins-operator/templates/jenkins.yaml @@ -105,6 +105,9 @@ spec: priorityClassName: {{ .Values.jenkins.priorityClassName }} {{- end }} disableCSRFProtection: {{ .Values.jenkins.disableCSRFProtection }} + {{- with .Values.jenkins.hostAliases }} + hostAliases: {{ toYaml . | nindent 4 }} + {{- end }} containers: - name: jenkins-master image: {{ .Values.jenkins.image }} diff --git a/chart/jenkins-operator/values.yaml b/chart/jenkins-operator/values.yaml index 9452e480..98777afe 100644 --- a/chart/jenkins-operator/values.yaml +++ b/chart/jenkins-operator/values.yaml @@ -47,6 +47,17 @@ jenkins: # See https://github.com/jenkinsci/kubernetes-operator/pull/193 for more info disableCSRFProtection: false + # adding entries to a pod's /etc/hosts file provides pod-level override of hostname + # resolution when DNS and other options are not applicable. + hostAliases: {} + # - ip: "127.0.0.1" + # hostnames: + # - "foo.local" + # - "bar.local" + # - ip: "10.1.2.3" + # hostnames: + # - "foo.remote" + # - "bar.remote" # validateSecurityWarnings enables or disables validating potential security warnings in Jenkins plugins via admission webhooks. validateSecurityWarnings: false