Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could. I took a look and port is missing as well.

IMO we should also be careful about not documenting every flag, since they are also self-documented via the --help command, but rather highlight the most interesting flags that users might not know to search for.

Since host and port are fairly common customizations, should they qualify here?

Copy link
Copy Markdown
Member

@sozercan sozercan Aug 19, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with you for gator but for gatekeeper it's not self-documenting as we don't ship gatekeeper as a binary and it's not something that users would use directly from their terminal.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

docker run openpolicyagent/gatekeeper:v3.10.0-beta.0 --help prints out flags. Would it be better to document that as a way of getting the full list of options?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

docker run openpolicyagent/gatekeeper:v3.10.0-beta.0 --help prints out flags. Would it be better to document that as a way of getting the full list of options?

+1 on adding this to the customize-startup doc

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added

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")
Expand Down Expand Up @@ -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) {
Expand Down
8 changes: 8 additions & 0 deletions website/docs/customize-startup.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 `<MutationType>/<MutationNamespace>/<MutationName>:<MutationGeneration>` 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.
8 changes: 8 additions & 0 deletions website/versioned_docs/version-v3.8.x/customize-startup.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 `<MutationType>/<MutationNamespace>/<MutationName>:<MutationGeneration>` 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.
8 changes: 8 additions & 0 deletions website/versioned_docs/version-v3.9.x/customize-startup.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 `<MutationType>/<MutationNamespace>/<MutationName>:<MutationGeneration>` 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.