pomerium/internal
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
..
atomicutil atomicutil: use atomicutil.Value wherever possible (#3517) 2022-07-28 15:38:38 -06:00
authenticateflow core/identity: dynamic authenticator registration (#5105) 2024-05-07 16:45:39 -06:00
autocert core/lint: upgrade golangci-lint, replace interface{} with any (#5099) 2024-05-02 14:33:52 -06:00
chanutil fileutil: update watcher to use fsnotify and polling (#3663) 2022-10-19 09:13:08 -06:00
contextkeys xds: only tag contexts used for UpdateRecords (#2269) 2021-06-04 14:01:25 -04:00
controlplane core/lint: upgrade golangci-lint, replace interface{} with any (#5099) 2024-05-02 14:33:52 -06:00
databroker health-check: building config from databroker source (#5104) 2024-05-06 14:47:20 -04:00
deterministicecdsa core/ci: update linting (#4844) 2023-12-14 09:07:54 -08:00
enabler core/lint: upgrade golangci-lint, replace interface{} with any (#5099) 2024-05-02 14:33:52 -06:00
encoding core/lint: upgrade golangci-lint, replace interface{} with any (#5099) 2024-05-02 14:33:52 -06:00
errgrouputil core/go: use max procs (#4766) 2023-12-07 09:14:57 -07:00
events core/events: fix flaky test (#4700) 2023-11-02 11:28:28 -06:00
fileutil core/ci: update linting (#4844) 2023-12-14 09:07:54 -08:00
handlers core/lint: upgrade golangci-lint, replace interface{} with any (#5099) 2024-05-02 14:33:52 -06:00
hashutil core/lint: upgrade golangci-lint, replace interface{} with any (#5099) 2024-05-02 14:33:52 -06:00
httputil core/lint: upgrade golangci-lint, replace interface{} with any (#5099) 2024-05-02 14:33:52 -06:00
log core/lint: upgrade golangci-lint, replace interface{} with any (#5099) 2024-05-02 14:33:52 -06:00
middleware core/lint: upgrade golangci-lint, replace interface{} with any (#5099) 2024-05-02 14:33:52 -06:00
registry core/redis: remove comment (#4843) 2023-12-07 15:55:02 -07:00
retry core/zero: fix ticker usage (#4969) 2024-03-06 14:28:21 -07:00
scheduler feature/databroker: user data and session refactor project (#926) 2020-06-19 07:52:44 -06:00
sessions core/lint: upgrade golangci-lint, replace interface{} with any (#5099) 2024-05-02 14:33:52 -06:00
sets zero/telemetry: calculate DAU and MAU (#4810) 2023-12-11 13:37:01 -05:00
signal log context (#2107) 2021-04-22 10:58:13 -04:00
syncutil config: generate cookie secret if not set in all-in-one mode (#3742) 2022-11-11 14:14:30 -07:00
telemetry Envoy resource monitoring & overload manager configuration (#5106) 2024-05-28 16:57:09 -04:00
tests/xdserr config: remove source, remove deadcode, fix linting issues (#4118) 2023-04-21 17:25:11 -06:00
testutil core/lint: upgrade golangci-lint, replace interface{} with any (#5099) 2024-05-02 14:33:52 -06:00
tripper config: remove source, remove deadcode, fix linting issues (#4118) 2023-04-21 17:25:11 -06:00
urlutil core/lint: upgrade golangci-lint, replace interface{} with any (#5099) 2024-05-02 14:33:52 -06:00
version dev: update linter (#1728) 2020-12-30 09:02:57 -08:00
zero Add new configurable bootstrap writers (#2405) (#5114) 2024-05-31 12:26:17 -04:00