diff --git a/.goreleaser.yml b/.goreleaser.yml index f0074fe..9be5f74 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -8,11 +8,17 @@ builds: - linux goarch: - amd64 + - arm + - arm64 + - "386" release: # don't autopublish draft: true +sign: + artifacts: checksum + archive: format: binary @@ -36,11 +42,22 @@ nfpm: description: Discover and continuously backup Kubernetes objets as yaml files in git maintainer: Benjamin Pineau license: MIT + bindir: /usr/bin vendor: Benjamin Pineau formats: - deb - rpm dependencies: - git - replacements: - amd64: x86_64 + config_files: + "./assets/katafygio.yaml": "/etc/katafygio/katafygio.yaml" + overrides: + rpm: + replacements: + amd64: x86_64 + 386: i686 + name_template: "{{ .ProjectName }}-{{ .Version }}-{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}" + deb: + replacements: + 386: i386 + name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}" diff --git a/README.md b/README.md index be8c0c8..3e1ca70 100644 --- a/README.md +++ b/README.md @@ -78,8 +78,9 @@ Flags: ## Config file and env variables -All settings can be passed by command line options, or environment variable, or in a yaml -configuration file (thanks to Viper and Cobra libs). The environment are the same as cli options, +All settings can be passed by command line options, or environment variable, or in +[a yaml configuration file](https://github.com/bpineau/katafygio/blob/master/assets/katafygio.yaml) +(thanks to Viper and Cobra libs). The environment are the same as cli options, in uppercase, prefixed by "KF", and with underscore instead of dashs. ie.: ``` diff --git a/assets/katafygio.yaml b/assets/katafygio.yaml new file mode 100644 index 0000000..a8052b4 --- /dev/null +++ b/assets/katafygio.yaml @@ -0,0 +1,44 @@ +## Katafygio configuration file + +# To provide alternate api-server URL or config to reach the cluster: +#api-server: http://127.0.0.1:8080 +#kube-config: /etc/kubernetes/config + +log: + level: "info" + output: "stderr" + #server: "localhost:514" # mandatory if log-output: "syslog" + +# Where to save the yaml dumps +local-dir: /var/cache/katafygio + +# Remote url is optional. If provided, Katafygio will push there. +#git-url: https://user:token@github.com/myorg/myrepos.git + +# Port to listen for http health check probes. 0 to disable. +healthcheck-port: 0 + +# How often should Katafygio full resync. Only needed to catch possibly +# missed events: events are handled in real-time. 0 to disable. +resync-interval: 900 + +# To only include objects matching a kubernetes selector: +#filter: "vendor=foo,app=bar" + +# Example exclusions by object kind. E.g.: keep secrets confidential, +# don't dump pods or replicaset they are all managed by deployments +# or daemonsets (which are already dumped), endpoints (managed by services, +# already dumped), and noisy stuff (events, nodes...). +#exclude-kind: +# - secret +# - pod +# - replicaset +# - node +# - event +# - endpoints + +# Example exclusion for specific objects: +#exclude-object: +# - configmap:kube-system/datadog-leader-elector +# - deployment:default/testdeploy +