Skip to content

Commit 7b0af9e

Browse files
authored
Merge pull request #69 from bpineau/image_improvments
Image & chart improvements
2 parents bcc8625 + bd3e223 commit 7b0af9e

File tree

8 files changed

+32
-21
lines changed

8 files changed

+32
-21
lines changed

Dockerfile

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ RUN go get -u github.com/Masterminds/glide
55
RUN make deps
66
RUN make build
77

8-
FROM alpine:3.7
8+
FROM alpine:3.8
99
RUN apk upgrade --no-cache && \
10-
apk --no-cache add ca-certificates git openssh-client
10+
apk --no-cache add ca-certificates git openssh-client tini
1111
RUN install -d -o nobody -g nobody /var/lib/katafygio/data
1212
COPY --from=builder /go/src/github.com/bpineau/katafygio/katafygio /usr/bin/
1313
VOLUME /var/lib/katafygio
1414
USER nobody
15-
ENTRYPOINT ["/usr/bin/katafygio"]
15+
ENTRYPOINT ["/sbin/tini", "--", "/usr/bin/katafygio"]

Makefile

-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ lint:
2424
--enable=megacheck \
2525
--enable=unparam \
2626
--enable=misspell \
27-
--enable=gas \
2827
--enable=goimports \
2928
./...
3029

assets/Dockerfile.goreleaser

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
FROM alpine:3.7
1+
FROM alpine:3.8
22
RUN apk upgrade --no-cache && \
3-
apk --no-cache add ca-certificates git openssh-client
3+
apk --no-cache add ca-certificates git openssh-client tini
44
RUN install -d -o nobody -g nobody /var/lib/katafygio/data
55
COPY katafygio /usr/bin/
66
VOLUME /var/lib/katafygio
77
USER nobody
8-
ENTRYPOINT ["/usr/bin/katafygio"]
8+
ENTRYPOINT ["/sbin/tini", "--", "/usr/bin/katafygio"]

assets/helm-chart/katafygio/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
apiVersion: v1
2-
appVersion: 0.7.2
2+
appVersion: 0.7.3
33
description: Continuously backup Kubernetes objets as YAML files in git
44
name: katafygio
55
home: https://github.com/bpineau/katafygio

assets/helm-chart/katafygio/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ The following table lists the configurable parameters of the Katafygio chart and
4949
|-------------------------|-------------------------------------------------------------|--------------------------------------|
5050
| `replicaCount` | Desired number of pods | `1` |
5151
| `image.repository` | Katafygio container image name | `bpineau/katafygio` |
52-
| `image.tag` | Katafygio container image tag | `v0.7.1` |
52+
| `image.tag` | Katafygio container image tag | `v0.7.3` |
5353
| `image.pullPolicy` | Katafygio container image pull policy | `IfNotPresent` |
5454
| `localDir` | Container's local path where Katafygio will dump and commit | `/tmp/kf-dump` |
5555
| `gitUrl` | Optional remote repository where changes will be pushed | `nil` |

assets/helm-chart/katafygio/templates/deployment.yaml

+11-10
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,12 @@ spec:
6161
containerPort: {{ .Values.healthcheckPort }}
6262
protocol: TCP
6363
livenessProbe:
64+
{{ toYaml .Values.probesDelays.liveness | indent 12 }}
6465
httpGet:
6566
path: /health
6667
port: http
6768
readinessProbe:
69+
{{ toYaml .Values.probesDelays.readiness | indent 12 }}
6870
httpGet:
6971
path: /health
7072
port: http
@@ -76,13 +78,20 @@ spec:
7678
{{- end }}
7779
resources:
7880
{{ toYaml .Values.resources | indent 12 }}
79-
{{- if and .Values.gitSshKey .Values.gitUrl }}
8081
volumes:
82+
{{- if and .Values.gitSshKey .Values.gitUrl }}
8183
- name: katafygio-gitssh
8284
secret:
8385
secretName: {{ template "katafygio.fullname" . }}
8486
defaultMode: 256
85-
{{- end }}
87+
{{- end }}
88+
- name: katafygio-data
89+
{{- if .Values.persistence.enabled }}
90+
persistentVolumeClaim:
91+
claimName: {{ .Values.persistence.existingClaim | default (include "katafygio.fullname" .) }}
92+
{{- else }}
93+
emptyDir: {}
94+
{{- end -}}
8695
{{- with .Values.nodeSelector }}
8796
nodeSelector:
8897
{{ toYaml . | indent 8 }}
@@ -95,11 +104,3 @@ spec:
95104
tolerations:
96105
{{ toYaml . | indent 8 }}
97106
{{- end }}
98-
volumes:
99-
- name: katafygio-data
100-
{{- if .Values.persistence.enabled }}
101-
persistentVolumeClaim:
102-
claimName: {{ .Values.persistence.existingClaim | default (include "katafygio.fullname" .) }}
103-
{{- else }}
104-
emptyDir: {}
105-
{{- end -}}

assets/helm-chart/katafygio/values.yaml

+12-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ serviceAccount:
8383

8484
image:
8585
repository: bpineau/katafygio
86-
tag: v0.7.2
86+
tag: v0.7.3
8787
pullPolicy: IfNotPresent
8888

8989
# resources define the deployment's cpu and memory resources.
@@ -98,6 +98,17 @@ resources: {}
9898
# cpu: 100m
9999
# memory: 128Mi
100100

101+
# liveness probes may need some tuning due to initial clone, which may be
102+
# very slow on large repos (healtcheck handle is registered after clone).
103+
# both liveness and readiness probes consumes the same health endpoint.
104+
probesDelays:
105+
liveness:
106+
initialDelaySeconds: 60
107+
periodSeconds: 10
108+
timeoutSeconds: 10
109+
readiness:
110+
timeoutSeconds: 10
111+
101112
replicaCount: 1
102113

103114
nodeSelector: {}

cmd/version.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package cmd
33
import "github.com/spf13/cobra"
44

55
var (
6-
version = "0.7.1"
6+
version = "0.7.3"
77

88
versionCmd = &cobra.Command{
99
Use: "version",

0 commit comments

Comments
 (0)