Skip to content

Commit

Permalink
Merge branch 'main' into feat/httpd/allow-using-parent-ingress-and-pvc
Browse files Browse the repository at this point in the history
  • Loading branch information
dduportal authored Oct 3, 2023
2 parents 39d2f29 + beda07f commit 83cff46
Show file tree
Hide file tree
Showing 10 changed files with 75 additions and 14 deletions.
8 changes: 4 additions & 4 deletions charts/mirrorbits-parent/Chart.lock
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
dependencies:
- name: mirrorbits-lite
repository: https://jenkins-infra.github.io/helm-charts
version: 0.2.1
version: 0.3.0
- name: httpd
repository: https://jenkins-infra.github.io/helm-charts
version: 0.1.0
- name: rsyncd
repository: https://jenkins-infra.github.io/helm-charts
version: 1.3.1
digest: sha256:9582d38aad0e4036c979fd219de612b0311df580eb0a65536ab5c3e1a357ee32
generated: "2023-09-26T07:21:06.778448542Z"
version: 1.3.2
digest: sha256:9cf11370cdbed50b554291fd4bfffd79b55a6e26c8147c7e29373d4c4f002e24
generated: "2023-10-02T16:05:56.833429193Z"
6 changes: 3 additions & 3 deletions charts/mirrorbits-parent/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@ apiVersion: v2
name: mirrorbits-parent
description: A mirrorbits parent chart for Kubernetes
type: application
version: 0.2.3
version: 0.2.4
dependencies:
- name: mirrorbits-lite
condition: mirrorbits-lite.enabled
repository: https://jenkins-infra.github.io/helm-charts
version: 0.2.1
version: 0.3.0
- name: httpd
condition: httpd.enabled
repository: https://jenkins-infra.github.io/helm-charts
version: 0.1.0
- name: rsyncd
condition: rsyncd.enabled
repository: https://jenkins-infra.github.io/helm-charts
version: 1.3.1
version: 1.3.2
2 changes: 1 addition & 1 deletion charts/mirrorbits/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ maintainers:
- email: [email protected]
name: jenkins-infra-team
name: mirrorbits
version: 0.70.2
version: 1.0.0
11 changes: 9 additions & 2 deletions charts/mirrorbits/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,20 @@ Create chart name and version as used by the chart label.
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{/*
Selector labels
*/}}
{{- define "mirrorbits.selectorLabels" -}}
app.kubernetes.io/name: {{ include "mirrorbits.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

{{/*
Common labels
*/}}
{{- define "mirrorbits.labels" -}}
app.kubernetes.io/name: {{ include "mirrorbits.name" . }}
{{ include "mirrorbits.selectorLabels" . }}
helm.sh/chart: {{ include "mirrorbits.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
Expand Down
2 changes: 1 addition & 1 deletion charts/mirrorbits/templates/deployment.files.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ spec:
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
{{- with .Values.affinity.files }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
Expand Down
2 changes: 1 addition & 1 deletion charts/mirrorbits/templates/deployment.rsyncd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ spec:
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
{{- with .Values.affinity.rsyncd }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
Expand Down
2 changes: 1 addition & 1 deletion charts/mirrorbits/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ spec:
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
{{- with .Values.affinity.mirrorbits }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
Expand Down
49 changes: 49 additions & 0 deletions charts/mirrorbits/tests/custom_values_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,46 @@ set:
volume:
persistentVolumeClaim:
claimName: foobar
affinity:
mirrorbits:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: "app.kubernetes.io/name"
operator: In
values:
- mirrorbits
topologyKey: "kubernetes.io/hostname"
files:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: "app.kubernetes.io/name"
operator: In
values:
- mirrorbits-files
topologyKey: "kubernetes.io/hostname"
rsyncd:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: "app.kubernetes.io/name"
operator: In
values:
- mirrorbits-rsyncd
topologyKey: "kubernetes.io/hostname"
poddisruptionbudget:
mirrorbits:
minAvailable: 1
mirrorbitsFiles:
minAvailable: 1
mirrorbitsRsyncd:
minAvailable: 1


templates:
- deployment.yaml
- deployment.files.yaml
Expand Down Expand Up @@ -71,6 +111,9 @@ tests:
- equal:
path: "spec.template.spec.containers[*].imagePullPolicy"
value: Never
- equal:
path: spec.template.spec.affinity.podAntiAffinity.requiredDuringSchedulingIgnoredDuringExecution[0].topologyKey
value: "kubernetes.io/hostname"
- it: should define a customized "mirrorbits" deployment
template: deployment.yaml
asserts:
Expand All @@ -94,6 +137,9 @@ tests:
- equal:
path: spec.template.spec.containers[0].volumeMounts[2].mountPath
value: /var/log/mirrorbits
- equal:
path: spec.template.spec.affinity.podAntiAffinity.requiredDuringSchedulingIgnoredDuringExecution[0].topologyKey
value: "kubernetes.io/hostname"
- it: should create ingress with pathType set to the specified custom value by default
template: ingress.yaml
asserts:
Expand All @@ -111,6 +157,9 @@ tests:
count: 1
- isKind:
of: Deployment
- equal:
path: spec.template.spec.affinity.podAntiAffinity.requiredDuringSchedulingIgnoredDuringExecution[0].topologyKey
value: "kubernetes.io/hostname"
- it: should create rsyncd service if rsyncd is enabled
template: service.rsyncd.yaml
asserts:
Expand Down
2 changes: 2 additions & 0 deletions charts/mirrorbits/tests/defaults_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,3 +88,5 @@ tests:
- equal:
path: spec.template.spec.containers[0].volumeMounts[2].mountPath
value: /var/log/mirrorbits
- notExists:
path: spec.template.spec.affinity
5 changes: 4 additions & 1 deletion charts/mirrorbits/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,10 @@ resources: {}
# memory: 128Mi
nodeSelector: {}
tolerations: []
affinity: {}
affinity:
mirrorbits: {}
files: {}
rsyncd: {}
geoipupdate:
image:
repository: maxmindinc/geoipupdate
Expand Down

0 comments on commit 83cff46

Please sign in to comment.