Skip to content

Commit

Permalink
[stable/jenkins] Add hostAliases (helm#11701)
Browse files Browse the repository at this point in the history
Signed-off-by: Pedro Hernandez <[email protected]>
  • Loading branch information
pedrohdz authored and k8s-ci-robot committed Feb 25, 2019
1 parent 9f10c2d commit 0b89e10
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion stable/jenkins/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: jenkins
home: https://jenkins.io/
version: 0.32.10
version: 0.33.0
appVersion: lts
description: Open source continuous integration server. It supports multiple SCM tools
including CVS, Subversion and Git. It can execute Apache Ant and Apache Maven-based
Expand Down
1 change: 1 addition & 0 deletions stable/jenkins/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ The following tables list the configurable parameters of the Jenkins chart and t
| `Master.UsePodSecurityContext` | Enable pod security context (must be `true` if `RunAsUser` or `FsGroup` are set) | `true` |
| `Master.RunAsUser` | uid that jenkins runs with | `0` |
| `Master.FsGroup` | uid that will be used for persistent volume | `0` |
| `Master.HostAliases` | Aliases for IPs in `/etc/hosts` | `[]` |
| `Master.ServiceAnnotations` | Service annotations | `{}` |
| `Master.ServiceType` | k8s service type | `LoadBalancer` |
| `Master.ServicePort` | k8s service port | `8080` |
Expand Down
4 changes: 4 additions & 0 deletions stable/jenkins/templates/jenkins-master-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ spec:
hostNetwork: true
dnsPolicy: ClusterFirstWithHostNet
{{- end }}
{{- if .Values.Master.HostAliases }}
hostAliases:
{{- toYaml .Values.Master.HostAliases | nindent 8 }}
{{- end }}
initContainers:
- name: "copy-default-config"
image: "{{ .Values.Master.Image }}:{{ .Values.Master.ImageTag }}"
Expand Down
10 changes: 10 additions & 0 deletions stable/jenkins/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,16 @@ Master:
# - jenkins.cluster.local
AdditionalConfig: {}

# Master.HostAliases allows for adding entries to Pod /etc/hosts:
# https://kubernetes.io/docs/concepts/services-networking/add-entries-to-pod-etc-hosts-with-host-aliases/
HostAliases: []
# - ip: 192.168.50.50
# hostnames:
# - something.local
# - ip: 10.0.50.50
# hostnames:
# - other.local

Agent:
Enabled: true
Image: jenkins/jnlp-slave
Expand Down

0 comments on commit 0b89e10

Please sign in to comment.