-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from luanphantiki/master
add vault's k8s authentication support
- Loading branch information
Showing
6 changed files
with
127 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
FROM golang:1.16 AS builder | ||
|
||
ENV GO111MODULE=on \ | ||
CGO_ENABLED=0 \ | ||
GOOS=linux \ | ||
GOARCH=amd64 | ||
|
||
RUN mkdir /build | ||
WORKDIR /build | ||
|
||
COPY . . | ||
|
||
RUN go mod download | ||
RUN go build \ | ||
-a \ | ||
-trimpath \ | ||
-ldflags "-s -w -extldflags '-static'" \ | ||
-tags 'osusergo netgo static_build' \ | ||
-o ../vault_raft_snapshot_agent \ | ||
./main.go | ||
|
||
FROM alpine | ||
WORKDIR / | ||
COPY --from=builder /vault_raft_snapshot_agent . | ||
COPY snapshot.json /etc/vault.d/snapshot.json | ||
ENTRYPOINT ["/vault_raft_snapshot_agent"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"addr":"http://vaul-addr:8200", | ||
"retain":72, | ||
"frequency":"3600s", | ||
"role_id": "<vault app role id>", | ||
"secret_id":"<vault app secret id", | ||
"vault_auth_method": "", | ||
"vault_auth_role": "", | ||
"vault_auth_path": "", | ||
"aws_storage":{ | ||
"access_key_id":"<s3 access id>", | ||
"secret_access_key":"<s3 acess key>", | ||
"s3_region":"<s3 region>", | ||
"s3_bucket":"<s3 bucket", | ||
"s3_endpoint":"<s3 endpoint>", | ||
"s3_force_path_style":true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters