pomerium/internal/zero
Joe Kralicky de603f87de
Add new configurable bootstrap writers (#2405) (#5114)
* Add new configurable bootstrap writers (#2405)

This PR adds the ability to configure different backends to use for
storing modifications to the zero bootstrap config. The two currently
implemented backends allow writing changes to a file or to a Kubernetes
secret. Backend selection is determined by the scheme in a URI passed to
the flag '--config-writeback-uri'.

In a Kubernetes environment, where the bootstrap config is mounted into
the pod from a secret, this option allows Pomerium to write changes back
to the secret, as writes to the mounted secret file on disk are not
persisted.

* Use env vars for bootstrap config filepath/writeback uri

* linter pass and code cleanup

* Add new config writer options mechanism

This moves the encryption cipher parameter out of the WriteConfig()
method in the ConfigWriter interface and into a new ConfigWriterOptions
struct. Options (e.g. cipher) can be applied to an existing ConfigWriter
to allow customizing implementation-specific behavior.

* Code cleanup/lint fixes

* Move vendored k8s code into separate package, and add license header and package comment
2024-05-31 12:26:17 -04:00
..
analytics zero/telemetry: add reporter (#4855) 2023-12-20 14:53:06 -05:00
api zero/healthchecks: add checks for ability to save bootstrap parameter and bundle status reporting (#5064) 2024-04-11 10:47:52 -04:00
apierror core/ci: fix linting issues (#4856) 2023-12-14 10:47:13 -07:00
bootstrap Add new configurable bootstrap writers (#2405) (#5114) 2024-05-31 12:26:17 -04:00
cmd Add new configurable bootstrap writers (#2405) (#5114) 2024-05-31 12:26:17 -04:00
connect-mux core/lint: upgrade golangci-lint, replace interface{} with any (#5099) 2024-05-02 14:33:52 -06:00
controller Add new configurable bootstrap writers (#2405) (#5114) 2024-05-31 12:26:17 -04:00
grpcconn zero: add user-agent to requests (#5078) 2024-04-19 11:33:43 -04:00
healthcheck health-checks: zero route availability improvements (#5111) 2024-05-17 16:47:27 -04:00
leaser zero: add service accounts support (#5031) 2024-03-20 17:03:03 -04:00
reconciler core/lint: upgrade golangci-lint, replace interface{} with any (#5099) 2024-05-02 14:33:52 -06:00
reporter zero/telemetry: add reporter (#4855) 2023-12-20 14:53:06 -05:00
token core/lint: upgrade golangci-lint, replace interface{} with any (#5099) 2024-05-02 14:33:52 -06:00