Skip to content

Commit

Permalink
Merge branch 'master' into feature/base64
Browse files Browse the repository at this point in the history
  • Loading branch information
martin-helmich authored Apr 2, 2019
2 parents e887ea1 + 3da21d1 commit 3c45662
Show file tree
Hide file tree
Showing 4,064 changed files with 233 additions and 2,130,554 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/.idea
/kubernetes-secret-generator
/dist
35 changes: 0 additions & 35 deletions .gitlab-ci.yml

This file was deleted.

35 changes: 35 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
before:
hooks:
- go vet ./...
- go test -v ./...
builds:
-
env:
- CGO_ENABLED=0
- GO111MODULE=on
goos:
- linux
goarch:
- amd64
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ .Tag }}-next"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
dockers:
-
image_templates:
- quay.io/mittwald/kubernetes-secret-generator:latest
- quay.io/mittwald/kubernetes-secret-generator:stable
- quay.io/mittwald/kubernetes-secret-generator:{{ .Tag }}
- quay.io/mittwald/kubernetes-secret-generator:{{ .Tag }}-{{ .Env.GO_VERSION }}
binaries:
- kubernetes-secret-generator
goos: linux
goarch: amd64
goarm: ''
40 changes: 33 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,37 @@
language: go

go:
- 1.6
- 1.7
- 1.8
- '1.12'

before_script:
- sudo sysctl -w net.ipv4.ip_forward=1

install: true
services:
- docker

env:
global:
- GO111MODULE=on
- CGO_ENABLED=0
- GO_VERSION=1.12
- secure: aa2utqHdo2htOo5T42p7XGT43W95L8kavDICUp16ssEs6BMz/LTfrOn9AB30ZlpfmduzpnEC78+YsbCsoP/k//Z/GmrW0WLOxdWKEgYLnCZvqpI3k1FFvMilxlGaloGl5SMbw1v7f6mpeYmF4lWr7aFsONVu8ivqCZoRJK7QQf8E0175ZHpm6Xjzs1TZUTPT6GGPuWymVhE1MZqJYFwfPSE2xgsv7I4X7s4OLado4zfkxKynt+bV9+Vb960+nAY3oLVK9BYCmAh93uoIX5jveox0io+jrPMXKZRkwpW0jI3TuNnE8UTNKGm27Qj2huQVhFeFy+tGR37L6WDpuT47tD2V3WBo51RcpvZKlJD3HqPb1l7yW5EtLLa3K6lqa+uYbFXEDqMVvyuZhgyc2/rG6HlDf2bfM+/0njEV6XEUH2mLNiV8Viuab40WwZwrq+r5T8HxOZuUg+EShqC1en0VdjSXMWX5VHLlHog9qYe4UoBQw4A9s9DnfAgjTeEZ1wuH1uKoaaUQ+gA2UoZ9ywZxPmNJnq1phTQvQ+LnBiTbqen1C/ugKgkeE1U36hd21N5yjjYXqEZDoNxCuAc0GaucK5TzeJgL2/MJ0x5HetCmHB5T92BG6+2UjqZFfEnDjxszmPa5tXCJUnL4wa6OzgoFVwsez7HfA3SqDfSjf/Rn9s4=
script:
- "go vet $(go list ./... | grep -v vendor)"
- "go test -v $(go list ./... | grep -v vendor)"
- "go build"
- bash <(wget -qO- https://git.io/goreleaser) --snapshot --skip-publish --rm-dist

before_deploy:
- if [[ "${TRAVIS_BRANCH}" == "master" ]] && [[ "${TRAVIS_PULL_REQUEST}" == "false" ]]; then docker login -u "${DOCKER_LOGIN_NAME}" -p "${DOCKER_LOGIN_PASSWORD}" "${DOCKER_LOGIN_URL}"; fi
- export FULL_IMAGE="${DOCKER_LOGIN_URL}/mittwald/kubernetes-secret-generator"
deploy:
- provider: script
skip_cleanup: true
script: bash <(wget -qO- https://git.io/goreleaser) --snapshot --skip-publish --rm-dist && docker push "${FULL_IMAGE}:latest"
on:
tags: false
branch: master
condition: $TRAVIS_OS_NAME = linux
- provider: script
skip_cleanup: true
script: curl -sL https://git.io/goreleaser | bash -s -- --rm-dist
on:
tags: true
condition: $TRAVIS_OS_NAME = linux
11 changes: 5 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
FROM scratch
MAINTAINER Martin Helmich <[email protected]>

COPY kubernetes-secret-generator /kubernetes-secret-generator

CMD ["/kubernetes-secret-generator", "-logtostderr"]
FROM scratch
LABEL MAINTAINER="Martin Helmich <[email protected]>"
COPY kubernetes-secret-generator /kubernetes-secret-generator
ENTRYPOINT ["/kubernetes-secret-generator"]
CMD ["-logtostderr"]
13 changes: 10 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@ $ kubectl apply -f https://raw.githubusercontent.com/mittwald/kubernetes-secret-
## Usage

Add the annotation `secret-generator.v1.mittwald.de/autogenerate` to any Kubernetes
secret object. The value of the annotation can be a field name within the secret; the
SecretGeneratorController will pick up this annotation and add a field (`password` in
the example below) to the secret with a randomly generated string value.
secret object. The value of the annotation can be a field name
(or dot separated list of field names) within the secret; the
SecretGeneratorController will pick up this annotation and add a field [or fields]
(`password` in the example below) to the secret with a randomly generated string value.

```yaml
apiVersion: v1
Expand All @@ -40,3 +41,9 @@ data:
```
$ kubectl annotate secrets --all secret-generator.v1.mittwald.de/regenerate=true
```

- Regenerate only certain fields
```
$ kubectl annotate secrets --all secret-generator.v1.mittwald.de/regenerate=password1.password2
```
Loading

0 comments on commit 3c45662

Please sign in to comment.