secretreceiver

command module
v0.0.0-...-037ba61 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 6, 2023 License: MIT Imports: 5 Imported by: 0

README

Secret Receiver

Go Test Coverage Status

This microservice was created to act as a CRUD for secret in Kubernetes. To be used to automated secret renew in Kubernetes.

Environment variables

ENCODING_REQUEST is used to accepted only encoded requests.

Others Environment variables

export PORT=8080

export APP_NAME=secretreceiver

export LOG_LEVEL=INFO

Deploy it in Kubernetes

Create Secret file:

kubectl create secret generic secretreceiver --from-literal=encodedrequest=LONGHASH --dry-run -o yaml > k8s-secret.yaml

Configure Ingress in k8s-deployment.yaml (line 62) change secretreceiver.example.local to use your own domain.

Deploy it:

kubectl apply -f k8s-secret.yaml
kubectl apply -f k8s-deployment.yaml

How to create secrets in Secret Receiver

Use secretpublisher command line tool to send encoded requests to Secret Receiver.

Development

Test and coverage

Run the tests

TESTRUN=true go test ./... -coverprofile=coverage.out

go tool cover -html=coverage.out

Install golangci-lint and run lint:

golangci-lint run

Docker Build

docker build .

References

Golang Spell

The project was initialized using Golang Spell.

Architectural Model

The Architectural Model adopted to structure the application is based on The Clean Architecture. Further details can be found here: The Clean Architecture and in the Clean Architecture Book.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
gateway

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL