Skip to content

Commit f7b5700

Browse files
authored
Merge pull request #43 from bpineau/example_configfile
Add an example configuration file and better goreleaser config
2 parents 729fc03 + bdd7ddf commit f7b5700

File tree

3 files changed

+66
-4
lines changed

3 files changed

+66
-4
lines changed

.goreleaser.yml

+19-2
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,17 @@ builds:
88
- linux
99
goarch:
1010
- amd64
11+
- arm
12+
- arm64
13+
- "386"
1114

1215
release:
1316
# don't autopublish
1417
draft: true
1518

19+
sign:
20+
artifacts: checksum
21+
1622
archive:
1723
format: binary
1824

@@ -36,11 +42,22 @@ nfpm:
3642
description: Discover and continuously backup Kubernetes objets as yaml files in git
3743
maintainer: Benjamin Pineau <[email protected]>
3844
license: MIT
45+
bindir: /usr/bin
3946
vendor: Benjamin Pineau
4047
formats:
4148
- deb
4249
- rpm
4350
dependencies:
4451
- git
45-
replacements:
46-
amd64: x86_64
52+
config_files:
53+
"./assets/katafygio.yaml": "/etc/katafygio/katafygio.yaml"
54+
overrides:
55+
rpm:
56+
replacements:
57+
amd64: x86_64
58+
386: i686
59+
name_template: "{{ .ProjectName }}-{{ .Version }}-{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}"
60+
deb:
61+
replacements:
62+
386: i386
63+
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}"

README.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,9 @@ Flags:
7878

7979
## Config file and env variables
8080

81-
All settings can be passed by command line options, or environment variable, or in a yaml
82-
configuration file (thanks to Viper and Cobra libs). The environment are the same as cli options,
81+
All settings can be passed by command line options, or environment variable, or in
82+
[a yaml configuration file](https://github.com/bpineau/katafygio/blob/master/assets/katafygio.yaml)
83+
(thanks to Viper and Cobra libs). The environment are the same as cli options,
8384
in uppercase, prefixed by "KF", and with underscore instead of dashs. ie.:
8485

8586
```

assets/katafygio.yaml

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
## Katafygio configuration file
2+
3+
# To provide alternate api-server URL or config to reach the cluster:
4+
#api-server: http://127.0.0.1:8080
5+
#kube-config: /etc/kubernetes/config
6+
7+
log:
8+
level: "info"
9+
output: "stderr"
10+
#server: "localhost:514" # mandatory if log-output: "syslog"
11+
12+
# Where to save the yaml dumps
13+
local-dir: /var/cache/katafygio
14+
15+
# Remote url is optional. If provided, Katafygio will push there.
16+
#git-url: https://user:[email protected]/myorg/myrepos.git
17+
18+
# Port to listen for http health check probes. 0 to disable.
19+
healthcheck-port: 0
20+
21+
# How often should Katafygio full resync. Only needed to catch possibly
22+
# missed events: events are handled in real-time. 0 to disable.
23+
resync-interval: 900
24+
25+
# To only include objects matching a kubernetes selector:
26+
#filter: "vendor=foo,app=bar"
27+
28+
# Example exclusions by object kind. E.g.: keep secrets confidential,
29+
# don't dump pods or replicaset they are all managed by deployments
30+
# or daemonsets (which are already dumped), endpoints (managed by services,
31+
# already dumped), and noisy stuff (events, nodes...).
32+
#exclude-kind:
33+
# - secret
34+
# - pod
35+
# - replicaset
36+
# - node
37+
# - event
38+
# - endpoints
39+
40+
# Example exclusion for specific objects:
41+
#exclude-object:
42+
# - configmap:kube-system/datadog-leader-elector
43+
# - deployment:default/testdeploy
44+

0 commit comments

Comments
 (0)