gravitational / planet

Installable Kubernetes delivered in containers
Apache License 2.0
51 stars 18 forks source link

Optional environment file #809

Closed bernardjkim closed 3 years ago

bernardjkim commented 3 years ago

Description

This PR defines an optional environment file at /etc/optional-environment. The KUBE_ADMISSION_PLUGINS variable can be specified in this file and will be read by the kube-apiserver. Specified plugins will be enabled along with the default admission plugins.

Example:

Create an env file with custom admission plugins.

// optional-envrionment
KUBE_ADMISSION_PLUGINS=ImagePolicyWebhook,...

Create custom Planet image and copy env file to /etc/optional-environment file path.

// Dockerfile
FROM <planet-image>:<version>
COPY optional-environment /etc/optional-environment
...

This mechanism can be used for future custom configuration options when creating custom Planet images.

Linked tickets and PRs