Skip to content

Commit

Permalink
Merge pull request #69 from bpineau/image_improvments
Browse files Browse the repository at this point in the history
Image & chart improvements
  • Loading branch information
bpineau committed Dec 16, 2018
2 parents bcc8625 + bd3e223 commit 7b0af9e
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 21 deletions.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ RUN go get -u github.com/Masterminds/glide
RUN make deps
RUN make build

FROM alpine:3.7
FROM alpine:3.8
RUN apk upgrade --no-cache && \
apk --no-cache add ca-certificates git openssh-client
apk --no-cache add ca-certificates git openssh-client tini
RUN install -d -o nobody -g nobody /var/lib/katafygio/data
COPY --from=builder /go/src/github.com/bpineau/katafygio/katafygio /usr/bin/
VOLUME /var/lib/katafygio
USER nobody
ENTRYPOINT ["/usr/bin/katafygio"]
ENTRYPOINT ["/sbin/tini", "--", "/usr/bin/katafygio"]
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ lint:
--enable=megacheck \
--enable=unparam \
--enable=misspell \
--enable=gas \
--enable=goimports \
./...

Expand Down
6 changes: 3 additions & 3 deletions assets/Dockerfile.goreleaser
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM alpine:3.7
FROM alpine:3.8
RUN apk upgrade --no-cache && \
apk --no-cache add ca-certificates git openssh-client
apk --no-cache add ca-certificates git openssh-client tini
RUN install -d -o nobody -g nobody /var/lib/katafygio/data
COPY katafygio /usr/bin/
VOLUME /var/lib/katafygio
USER nobody
ENTRYPOINT ["/usr/bin/katafygio"]
ENTRYPOINT ["/sbin/tini", "--", "/usr/bin/katafygio"]
2 changes: 1 addition & 1 deletion assets/helm-chart/katafygio/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: v1
appVersion: 0.7.2
appVersion: 0.7.3
description: Continuously backup Kubernetes objets as YAML files in git
name: katafygio
home: https://github.com/bpineau/katafygio
Expand Down
2 changes: 1 addition & 1 deletion assets/helm-chart/katafygio/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ The following table lists the configurable parameters of the Katafygio chart and
|-------------------------|-------------------------------------------------------------|--------------------------------------|
| `replicaCount` | Desired number of pods | `1` |
| `image.repository` | Katafygio container image name | `bpineau/katafygio` |
| `image.tag` | Katafygio container image tag | `v0.7.1` |
| `image.tag` | Katafygio container image tag | `v0.7.3` |
| `image.pullPolicy` | Katafygio container image pull policy | `IfNotPresent` |
| `localDir` | Container's local path where Katafygio will dump and commit | `/tmp/kf-dump` |
| `gitUrl` | Optional remote repository where changes will be pushed | `nil` |
Expand Down
21 changes: 11 additions & 10 deletions assets/helm-chart/katafygio/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,12 @@ spec:
containerPort: {{ .Values.healthcheckPort }}
protocol: TCP
livenessProbe:
{{ toYaml .Values.probesDelays.liveness | indent 12 }}
httpGet:
path: /health
port: http
readinessProbe:
{{ toYaml .Values.probesDelays.readiness | indent 12 }}
httpGet:
path: /health
port: http
Expand All @@ -76,13 +78,20 @@ spec:
{{- end }}
resources:
{{ toYaml .Values.resources | indent 12 }}
{{- if and .Values.gitSshKey .Values.gitUrl }}
volumes:
{{- if and .Values.gitSshKey .Values.gitUrl }}
- name: katafygio-gitssh
secret:
secretName: {{ template "katafygio.fullname" . }}
defaultMode: 256
{{- end }}
{{- end }}
- name: katafygio-data
{{- if .Values.persistence.enabled }}
persistentVolumeClaim:
claimName: {{ .Values.persistence.existingClaim | default (include "katafygio.fullname" .) }}
{{- else }}
emptyDir: {}
{{- end -}}
{{- with .Values.nodeSelector }}
nodeSelector:
{{ toYaml . | indent 8 }}
Expand All @@ -95,11 +104,3 @@ spec:
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}
volumes:
- name: katafygio-data
{{- if .Values.persistence.enabled }}
persistentVolumeClaim:
claimName: {{ .Values.persistence.existingClaim | default (include "katafygio.fullname" .) }}
{{- else }}
emptyDir: {}
{{- end -}}
13 changes: 12 additions & 1 deletion assets/helm-chart/katafygio/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ serviceAccount:

image:
repository: bpineau/katafygio
tag: v0.7.2
tag: v0.7.3
pullPolicy: IfNotPresent

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

# liveness probes may need some tuning due to initial clone, which may be
# very slow on large repos (healtcheck handle is registered after clone).
# both liveness and readiness probes consumes the same health endpoint.
probesDelays:
liveness:
initialDelaySeconds: 60
periodSeconds: 10
timeoutSeconds: 10
readiness:
timeoutSeconds: 10

replicaCount: 1

nodeSelector: {}
Expand Down
2 changes: 1 addition & 1 deletion cmd/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package cmd
import "github.com/spf13/cobra"

var (
version = "0.7.1"
version = "0.7.3"

versionCmd = &cobra.Command{
Use: "version",
Expand Down

0 comments on commit 7b0af9e

Please sign in to comment.