Skip to content

Commit

Permalink
[operator] Introduce Gardener control plane configuration options to …
Browse files Browse the repository at this point in the history
…`Garden` API (gardener#8234)

* Add Gardener API

* Move admission plugin name constants into separate package

This is to avoid importing too many transitively dependent packages when just wanting to know the admission plugin names.

* Validation

* Rename fields for better reusability

drop `Kube` prefix

* Run `make generate`

* Address PR review feedback
  • Loading branch information
rfranzke authored Jul 19, 2023
1 parent 6d5d601 commit 0075369
Show file tree
Hide file tree
Showing 76 changed files with 3,517 additions and 1,874 deletions.
295 changes: 295 additions & 0 deletions charts/gardener/operator/templates/customresouredefintion.yaml

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions cmd/gardener-apiserver/app/gardener_apiserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import (
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
utilerrors "k8s.io/apimachinery/pkg/util/errors"
"k8s.io/apimachinery/pkg/util/sets"
"k8s.io/apiserver/pkg/admission"
openapinamer "k8s.io/apiserver/pkg/endpoints/openapi"
"k8s.io/apiserver/pkg/quota/v1/generic"
Expand Down Expand Up @@ -69,6 +70,7 @@ import (
"github.com/gardener/gardener/pkg/features"
"github.com/gardener/gardener/pkg/logger"
"github.com/gardener/gardener/pkg/openapi"
plugin "github.com/gardener/gardener/plugin/pkg"
)

// NewCommandStartGardenerAPIServer creates a *cobra.Command object with default parameters.
Expand Down Expand Up @@ -141,8 +143,8 @@ func NewOptions() *Options {
schema.GroupKind{Group: gardencorev1beta1.GroupName},
)
apiserver.RegisterAllAdmissionPlugins(o.Recommended.Admission.Plugins)
o.Recommended.Admission.DefaultOffPlugins = apiserver.DefaultOffPlugins
o.Recommended.Admission.RecommendedPluginOrder = apiserver.AllOrderedPlugins
o.Recommended.Admission.DefaultOffPlugins = sets.NewString(plugin.AllPluginNames()...).Difference(plugin.DefaultOnPlugins())
o.Recommended.Admission.RecommendedPluginOrder = plugin.AllPluginNames()

return o
}
Expand Down
186 changes: 93 additions & 93 deletions docs/api-reference/core.md
Original file line number Diff line number Diff line change
Expand Up @@ -1968,6 +1968,95 @@ ShootStateSpec
</tr>
</tbody>
</table>
<h3 id="core.gardener.cloud/v1beta1.APIServerLogging">APIServerLogging
</h3>
<p>
(<em>Appears on:</em>
<a href="#core.gardener.cloud/v1beta1.KubeAPIServerConfig">KubeAPIServerConfig</a>)
</p>
<p>
<p>APIServerLogging contains configuration for the logs level and http access logs</p>
</p>
<table>
<thead>
<tr>
<th>Field</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<code>verbosity</code></br>
<em>
int32
</em>
</td>
<td>
<em>(Optional)</em>
<p>Verbosity is the kube-apiserver log verbosity level
Defaults to 2.</p>
</td>
</tr>
<tr>
<td>
<code>httpAccessVerbosity</code></br>
<em>
int32
</em>
</td>
<td>
<em>(Optional)</em>
<p>HTTPAccessVerbosity is the kube-apiserver access logs level</p>
</td>
</tr>
</tbody>
</table>
<h3 id="core.gardener.cloud/v1beta1.APIServerRequests">APIServerRequests
</h3>
<p>
(<em>Appears on:</em>
<a href="#core.gardener.cloud/v1beta1.KubeAPIServerConfig">KubeAPIServerConfig</a>)
</p>
<p>
<p>APIServerRequests contains configuration for request-specific settings for the kube-apiserver.</p>
</p>
<table>
<thead>
<tr>
<th>Field</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<code>maxNonMutatingInflight</code></br>
<em>
int32
</em>
</td>
<td>
<em>(Optional)</em>
<p>MaxNonMutatingInflight is the maximum number of non-mutating requests in flight at a given time. When the server
exceeds this, it rejects requests.</p>
</td>
</tr>
<tr>
<td>
<code>maxMutatingInflight</code></br>
<em>
int32
</em>
</td>
<td>
<em>(Optional)</em>
<p>MaxMutatingInflight is the maximum number of mutating requests in flight at a given time. When the server
exceeds this, it rejects requests.</p>
</td>
</tr>
</tbody>
</table>
<h3 id="core.gardener.cloud/v1beta1.Addon">Addon
</h3>
<p>
Expand Down Expand Up @@ -5038,8 +5127,8 @@ cache size flags will have no effect, except when setting it to 0 (which disable
<td>
<code>requests</code></br>
<em>
<a href="#core.gardener.cloud/v1beta1.KubeAPIServerRequests">
KubeAPIServerRequests
<a href="#core.gardener.cloud/v1beta1.APIServerRequests">
APIServerRequests
</a>
</em>
</td>
Expand Down Expand Up @@ -5081,8 +5170,8 @@ Defaults to 1h.</p>
<td>
<code>logging</code></br>
<em>
<a href="#core.gardener.cloud/v1beta1.KubeAPIServerLogging">
KubeAPIServerLogging
<a href="#core.gardener.cloud/v1beta1.APIServerLogging">
APIServerLogging
</a>
</em>
</td>
Expand Down Expand Up @@ -5123,95 +5212,6 @@ Defaults to 300.</p>
</tr>
</tbody>
</table>
<h3 id="core.gardener.cloud/v1beta1.KubeAPIServerLogging">KubeAPIServerLogging
</h3>
<p>
(<em>Appears on:</em>
<a href="#core.gardener.cloud/v1beta1.KubeAPIServerConfig">KubeAPIServerConfig</a>)
</p>
<p>
<p>KubeAPIServerLogging contains configuration for the logs level and http access logs</p>
</p>
<table>
<thead>
<tr>
<th>Field</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<code>verbosity</code></br>
<em>
int32
</em>
</td>
<td>
<em>(Optional)</em>
<p>Verbosity is the kube-apiserver log verbosity level
Defaults to 2.</p>
</td>
</tr>
<tr>
<td>
<code>httpAccessVerbosity</code></br>
<em>
int32
</em>
</td>
<td>
<em>(Optional)</em>
<p>HTTPAccessVerbosity is the kube-apiserver access logs level</p>
</td>
</tr>
</tbody>
</table>
<h3 id="core.gardener.cloud/v1beta1.KubeAPIServerRequests">KubeAPIServerRequests
</h3>
<p>
(<em>Appears on:</em>
<a href="#core.gardener.cloud/v1beta1.KubeAPIServerConfig">KubeAPIServerConfig</a>)
</p>
<p>
<p>KubeAPIServerRequests contains configuration for request-specific settings for the kube-apiserver.</p>
</p>
<table>
<thead>
<tr>
<th>Field</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<code>maxNonMutatingInflight</code></br>
<em>
int32
</em>
</td>
<td>
<em>(Optional)</em>
<p>MaxNonMutatingInflight is the maximum number of non-mutating requests in flight at a given time. When the server
exceeds this, it rejects requests.</p>
</td>
</tr>
<tr>
<td>
<code>maxMutatingInflight</code></br>
<em>
int32
</em>
</td>
<td>
<em>(Optional)</em>
<p>MaxMutatingInflight is the maximum number of mutating requests in flight at a given time. When the server
exceeds this, it rejects requests.</p>
</td>
</tr>
</tbody>
</table>
<h3 id="core.gardener.cloud/v1beta1.KubeControllerManagerConfig">KubeControllerManagerConfig
</h3>
<p>
Expand Down
Loading

0 comments on commit 0075369

Please sign in to comment.