From 92ab769d90feb7462e99de5f9e40eb87aa0a51f5 Mon Sep 17 00:00:00 2001 From: Max Smythe Date: Mon, 15 Aug 2022 18:30:40 -0700 Subject: [PATCH 1/2] Add --host as a command line flag Signed-off-by: Max Smythe --- main.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main.go b/main.go index 9485689ae3a..23e76796ab4 100644 --- a/main.go +++ b/main.go @@ -97,6 +97,7 @@ var ( healthAddr = flag.String("health-addr", ":9090", "The address to which the health endpoint binds.") metricsAddr = flag.String("metrics-addr", "0", "The address the metric endpoint binds to.") port = flag.Int("port", 443, "port for the server. defaulted to 443 if unspecified ") + host = flag.String("host", "", "the host address the webhook server listens on. defaults to all addresses.") certDir = flag.String("cert-dir", "/certs", "The directory where certs are stored, defaults to /certs") disableCertRotation = flag.Bool("disable-cert-rotation", false, "disable automatic generation and rotation of webhook TLS certificates/keys") enableProfile = flag.Bool("enable-pprof", false, "enable pprof profiling") @@ -178,6 +179,7 @@ func main() { MetricsBindAddress: *metricsAddr, LeaderElection: false, Port: *port, + Host: *host, CertDir: *certDir, HealthProbeBindAddress: *healthAddr, MapperProvider: func(c *rest.Config) (meta.RESTMapper, error) { From ec9df0c72be383d70b57b96c66c7562fcf2d9ad1 Mon Sep 17 00:00:00 2001 From: Max Smythe Date: Tue, 23 Aug 2022 15:02:14 -0700 Subject: [PATCH 2/2] Add --help flag usage to customize startup docs Signed-off-by: Max Smythe --- website/docs/customize-startup.md | 8 ++++++++ .../versioned_docs/version-v3.8.x/customize-startup.md | 8 ++++++++ .../versioned_docs/version-v3.9.x/customize-startup.md | 8 ++++++++ 3 files changed, 24 insertions(+) diff --git a/website/docs/customize-startup.md b/website/docs/customize-startup.md index b88d759eff1..9fe4fad10b9 100644 --- a/website/docs/customize-startup.md +++ b/website/docs/customize-startup.md @@ -52,3 +52,11 @@ The `--mutation-annotations` flag adds the following two annotations to mutated | --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `gatekeeper.sh/mutation-id` | The UUID of the mutation. | | `gatekeeper.sh/mutations` | A list of comma-separated mutations in the format of `//:` that are applied to the object. | + +## Other Configuration Options + +For the complete list of configuration flags for your specific version of Gatekeeper, run the Gatekeeper binary with the `--help` flag. For example: + +`docker run openpolicyagent/gatekeeper:v3.10.0-beta.0 --help` + +To ensure you are seeing all relevant flags, be sure the image tag (`:3.10.0-beta.0` above) corresponds with the version of Gatekeeper you are running. diff --git a/website/versioned_docs/version-v3.8.x/customize-startup.md b/website/versioned_docs/version-v3.8.x/customize-startup.md index b88d759eff1..9fe4fad10b9 100644 --- a/website/versioned_docs/version-v3.8.x/customize-startup.md +++ b/website/versioned_docs/version-v3.8.x/customize-startup.md @@ -52,3 +52,11 @@ The `--mutation-annotations` flag adds the following two annotations to mutated | --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `gatekeeper.sh/mutation-id` | The UUID of the mutation. | | `gatekeeper.sh/mutations` | A list of comma-separated mutations in the format of `//:` that are applied to the object. | + +## Other Configuration Options + +For the complete list of configuration flags for your specific version of Gatekeeper, run the Gatekeeper binary with the `--help` flag. For example: + +`docker run openpolicyagent/gatekeeper:v3.10.0-beta.0 --help` + +To ensure you are seeing all relevant flags, be sure the image tag (`:3.10.0-beta.0` above) corresponds with the version of Gatekeeper you are running. diff --git a/website/versioned_docs/version-v3.9.x/customize-startup.md b/website/versioned_docs/version-v3.9.x/customize-startup.md index b88d759eff1..9fe4fad10b9 100644 --- a/website/versioned_docs/version-v3.9.x/customize-startup.md +++ b/website/versioned_docs/version-v3.9.x/customize-startup.md @@ -52,3 +52,11 @@ The `--mutation-annotations` flag adds the following two annotations to mutated | --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `gatekeeper.sh/mutation-id` | The UUID of the mutation. | | `gatekeeper.sh/mutations` | A list of comma-separated mutations in the format of `//:` that are applied to the object. | + +## Other Configuration Options + +For the complete list of configuration flags for your specific version of Gatekeeper, run the Gatekeeper binary with the `--help` flag. For example: + +`docker run openpolicyagent/gatekeeper:v3.10.0-beta.0 --help` + +To ensure you are seeing all relevant flags, be sure the image tag (`:3.10.0-beta.0` above) corresponds with the version of Gatekeeper you are running.