Skip to content

Commit 4b2cc5a

Browse files
authored
Merge pull request #8 from funkypenguin/improve-strategy
Fixes #6 by genericizing spec.strategy
2 parents ea50bcc + 6db6245 commit 4b2cc5a

11 files changed

Lines changed: 81 additions & 24 deletions

File tree

.ci/ct-config.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# This file defines the config for "ct" (chart tester) used by the helm linting GitHub workflow
2+
3+
# Here we define every possible upstream repo our charts use in `requirements.yaml`
4+
chart-repos:
5+
- haproxy=https://haproxytech.github.io/helm-charts
6+
7+
lint-conf: .ci/lint-config.yaml

.ci/lint-config.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
rules:
2+
# One blank line is OK
3+
empty-lines:
4+
max-start: 1
5+
max-end: 1
6+
max: 1

.ci/scripts/local-ci.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/bash
2+
3+
docker run --rm -it -w /repo -v `pwd`:/repo quay.io/helmpack/chart-testing ct lint --config=.ci/ct-config.yaml

CONTRIBUTING.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# :wave: How can I contribute?
2+
3+
First off, thank you for helping to improve this chart! :heart_eyes: :pray:
4+
5+
## Testing
6+
7+
To test the chart locally, before submitting changes, run `./ci/scripts/local-ci.sh`
8+
9+
## Submitting changes
10+
11+
Please send a [GitHub Pull Request](https://github.com/funkypenguin/helm-docker-mailserver/pull/new/master) with a clear list of what you've done (read more about [pull requests](http://help.github.com/pull-requests/)).
12+
13+
When you send a pull request, please make sure all of your commits are atomic (one feature per commit), and bump the chart version in `chart.yaml`
14+
15+
Always write a clear log message for your commits. One-line messages are fine for small changes, but bigger changes should look like this:
16+
17+
$ git commit -m "A brief summary of the commit
18+
>
19+
> A paragraph describing what changed and its impact."
20+
21+
Thanks again!
22+
Funky Penguin :penguin:

charts/docker-mailserver/Chart.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ apiVersion: v1
22
appVersion: "6.3.0"
33
description: A fullstack but simple mailserver (smtp, imap, antispam, antivirus, ssl...) using Docker.
44
name: docker-mailserver
5-
version: 0.2.3
5+
version: 0.2.4-pre1
66
sources:
7-
- https://github.com/funkypenguin/docker-mailserver
7+
- https://github.com/funkypenguin/helm-docker-mailserver
88
maintainers:
99
- name: funkypenguin
1010
email: davidy@funkypenguin.co.nz
@@ -14,4 +14,4 @@ keywords:
1414
- dovecot
1515
- amavis
1616
- imap
17-
tillerVersion: ">=2.13.0"
17+
home: https://github.com/funkypenguin/helm-docker-mailserver

charts/docker-mailserver/requirements.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ dependencies:
22
- name: kubernetes-ingress
33
repository: https://haproxytech.github.io/helm-charts
44
version: 0.7.0
5-
digest: sha256:2fb5dd45349f1002565ff2a3c729212db7e6ed74d397fe9f2e67c3306366eb15
6-
generated: "2020-02-22T09:14:23.359769+13:00"
5+
digest: sha256:f1aefde9a154637312577e8dbdbe577851061e36565a612d8c15d86aef329a13
6+
generated: "2020-04-27T10:30:45.01314+12:00"

charts/docker-mailserver/templates/deployment-rainloop.yaml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,7 @@ spec:
1616
matchLabels:
1717
app: {{ template "dockermailserver.fullname" . }}-rainloop
1818
release: "{{ .Release.Name }}"
19-
strategy:
20-
rollingUpdate:
21-
maxSurge: 1
22-
maxUnavailable: 0
23-
type: "Recreate"
19+
strategy: {{- toYaml .Values.rainloop.strategy | nindent 4 }}
2420
template:
2521
metadata:
2622
labels:

charts/docker-mailserver/templates/deployment.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,7 @@ spec:
1414
matchLabels:
1515
app: {{ template "dockermailserver.fullname" . }}
1616
release: "{{ .Release.Name }}"
17-
strategy:
18-
rollingUpdate:
19-
maxSurge: 1
20-
maxUnavailable: 1
21-
type: "RollingUpdate"
17+
strategy: {{- toYaml .Values.pod.dockermailserver.strategy | nindent 4 }}
2218
template:
2319
metadata:
2420
labels:
@@ -42,12 +38,14 @@ spec:
4238
- name: "opendkim-keys"
4339
secret:
4440
secretName: {{ template "dockermailserver.fullname" . }}-secrets
41+
{{ if .Values.pod.dockermailserver.ssl_type }}
4542
- name: "ssl-cert"
4643
secret:
4744
{{ if .Values.ssl.useExisting }}
4845
secretName: {{ .Values.ssl.existingName }}
4946
{{- else }}
5047
secretName: {{ template "dockermailserver.fullname" . }}-tls
48+
{{- end }}
5149
{{- end }}
5250
initContainers:
5351
- name: prep-config
@@ -78,9 +76,11 @@ spec:
7876
volumeMounts:
7977
- name: config
8078
mountPath: /tmp/docker-mailserver
79+
{{ if .Values.pod.dockermailserver.ssl_type }}
8180
- name: ssl-cert
8281
mountPath: /tmp/ssl
8382
readOnly: true
83+
{{- end }}
8484
- name: data
8585
mountPath: /var/mail
8686
subPath: mail

charts/docker-mailserver/templates/psp-rainloop.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ apiVersion: rbac.authorization.k8s.io/v1
259259
kind: RoleBinding
260260
metadata:
261261
name: rb-docker-mailserver-rainloop
262-
namespace: docker-mailserver
262+
namespace: {{ .Release.Namespace }}
263263
roleRef:
264264
apiGroup: rbac.authorization.k8s.io
265265
kind: ClusterRole

charts/docker-mailserver/templates/psp.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ apiVersion: rbac.authorization.k8s.io/v1
259259
kind: RoleBinding
260260
metadata:
261261
name: rb-docker-mailserver
262-
namespace: docker-mailserver
262+
namespace: {{ .Release.Namespace }}
263263
roleRef:
264264
apiGroup: rbac.authorization.k8s.io
265265
kind: ClusterRole

0 commit comments

Comments
 (0)