Skip to content

Commit

Permalink
changed index structure
Browse files Browse the repository at this point in the history
  • Loading branch information
JTaeuber committed Oct 30, 2024
1 parent 75e1480 commit 2912755
Show file tree
Hide file tree
Showing 14 changed files with 73 additions and 207 deletions.
1 change: 1 addition & 0 deletions website/content/_global_md_links.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

{/* Documentation links */}
[docs-helm-chart]: /GoKubeDownscaler/docs/helm-chart "Helm Chart Docs"
[docs-helm-values]: /GoKubeDownscaler/docs/helm-chart/Values "Helm Chart Values"
[docs-helm-components]: /GoKubeDownscaler/docs/helm-chart/components "Helm Components"
[docs-helm-permissions]: /GoKubeDownscaler/docs/helm-chart/permissions "Permissions"

Expand Down
2 changes: 1 addition & 1 deletion website/content/docs/helm-chart/0 - Components.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ id: components

# Components

The GoKubeDownscaler Helm Chart can create the following Kubernetes Objects:
The following Kubernetes Objects can be created with our Helm Chart:

## Deployment

Expand Down
187 changes: 17 additions & 170 deletions website/content/docs/helm-chart/1 - Permissions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ The GoKubeDownscaler needs certain permissions to scale workloads.

If [constrainedDownscaler][constrainedDownscaler] is set to true the Helm Chart will create roles for each namespace defined in [constrainedNamespaces][constrainedNamespaces].

Otherwise it will always create a cluster role.

::::info
Otherwise it will always create a cluster role with the needed permissions.

## Default Permissions

Expand Down Expand Up @@ -42,6 +40,8 @@ By default the GoKubeDownscaler will always have the following permissions if it
These are necessary for the GoKubeDownscaler to work properly.
## Admission Controller Permissions
:::note
If you are using a clusterwide installation of the GoKubeDownscaler it will also have:
:::
Expand Down Expand Up @@ -104,173 +104,20 @@ If you are using a clusterwide installation of the GoKubeDownscaler it will also
{/* TODO Explain why these are added. */}
::::
Otherwise the GoKubeDownscaler assigns permissions depending on the resources defined in [includedResources][includedResources].
This will add the following permissions:
## Deployments
```yaml
- apiGroups:
- apps
resources:
- deployments
verbs:
- get
- watch
- list
- update
- patch
```
## Statefulsets
## Workload Permissions
```yaml
- apiGroups:
- apps
resources:
- statefulsets
verbs:
- get
- watch
- list
- update
- patch
```
The Helm Chart assigns get, watch, list, update and patch permissions for the workloads defined in [includedResources][includedResources].
## Daemonsets
These resources can be:
```yaml
- apiGroups:
- apps
resources:
- daemonsets
verbs:
- get
- watch
- list
- update
- patch
```
## Rollouts
```yaml
- apiGroups:
- argoproj.io
resources:
- rollouts
verbs:
- get
- watch
- list
- update
- patch
```
## HorizontalPodAutoscalers
```yaml
- apiGroups:
- autoscaling
resources:
- horizontalpodautoscalers
verbs:
- get
- watch
- list
- update
- patch
```
## Jobs
```yaml
- apiGroups:
- batch
resources:
- jobs
verbs:
- get
- watch
- list
- update
- patch
```
## Cronjobs
```yaml
- apiGroups:
- batch
resources:
- cronjobs
verbs:
- get
- watch
- list
- update
- patch
```
## Scaledobjects
```yaml
- apiGroups:
- keda.sh
resources:
- scaledobjects
verbs:
- get
- watch
- list
- update
- patch
```
## Stacks
```yaml
- apiGroups:
- zalando.org
resources:
- stacks
verbs:
- get
- watch
- list
- update
- patch
```
## Prometheuses
```yaml
- apiGroups:
- monitoring.coreos.com
resources:
- prometheuses
verbs:
- get
- watch
- list
- update
- patch
```
## PodDisruptionBudgets
```yaml
- apiGroups:
- policy
resources:
- poddisruptionbudgets
verbs:
- get
- watch
- list
- update
- patch
```
- Deployments
- Statefulsets
- Daemonsets
- Rollouts
- HorizontalPodAutoscalers
- Jobs
- Cronjobs
- ScaledObjects
- Stacks
- PodDisruptionBudgets
- Prometheuses
2 changes: 1 addition & 1 deletion website/content/docs/helm-chart/Values/16 - configMap.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ id: configMap

`configMap` contains the two fields `name` and `extraConfig`:

- `name` is the name of the configmap for the GoKubeDownscaler.
- `name` defines the name of the configmap for the GoKubeDownscaler.
- `extraConfig` adds additional specified environment variables to the ConfigMap.

:::info
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ includedResources:
:::
If you add a resource to this list the Helm Chart will create a set of [permissions][docs-helm-permissions] and assign them to the role for the GoKubeDownscaler.
For every resource in this list the Helm Chart will create a set of [permissions][docs-helm-permissions] and assign them to the role for the GoKubeDownscaler.
Supported resources are:
Expand Down Expand Up @@ -52,6 +52,4 @@ includedResources:
- prometheuses
```
You can also find these as comments in the [values.yaml](https://github.com/caas-team/GoKubeDownscaler/blob/main/deployments/chart/values.yaml#L10-L21).
:::
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ id: fullnameOverride

# fullnameOverride

Overrides the full names of the created Kubernetes resources with the provided name if set.
`fullnameOverride` overrides the full names of the created Kubernetes resources with the provided name if set.

:::info
The default value for `fullnameOverride` is:
Expand All @@ -15,3 +15,5 @@ fullnameOverride: ""
```
:::
If a value for `fullnameOverride` is set the Helm Chart
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ id: constrainedDownscaler

# constrainedDownscaler

Sets the go-kube-downscaler to a constrained state if true, meaning that it does not run clusterwide but restricted to a list of namespaces. These namespaces are listed in [constrainedNamespaces](#constrainedNamespaces).
`constrainedDownscaler` sets the GoKubeDownscaler to a constrained state if true, meaning that it does not run clusterwide but restricted to a list of namespaces.

:::info
The default value for `constrainedDownscaler` is:
Expand All @@ -15,3 +15,13 @@ constrainedDownscaler: false
```
:::
The namespaces the GoKubeDownscaler is constrained to are listed in [constrainedNamespaces][constrainedNamespaces].
:::warning
[constrainedNamespaces][constrainedNamespaces] cannot be empty if `constrainedDownscaler` is set to true!
:::

It will also create roles in each of these namespaces instead of a clusterrole for the needed [permissions][docs-helm-permissions].

This feature is very useful if you don't have the necessary rights to make a clusterwide installation.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ id: constrainedNamespaces

# constrainedNamespaces

A list of namespaces the go-kube-downscaler is going to operate on when constrained.
`constrainedNamespaces` is a list of namespaces the GoKubeDownscaler is going to operate on when constrained.\
You can constrain the GoKubeDownscaler with the [constrainedDownscaler][constrainedDownscaler] parameter.

:::info
The default value for `constrainedNamespaces` is:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ id: serviceAccount

# serviceAccount

Specifies whether a new ServiceAccount is supposed to be created and if not, what the name of the ServiceAccount to use is.
`serviceAccount` contains the two fields `create` and `name`:

- `create` is a boolean value indicating if a new ServiceAccount is supposed to be created.
- `name` is the name of the ServiceAccount the GoKubeDownscaler is supposed to use.

:::info
The default values for `serviceAccount` are:
Expand Down
12 changes: 12 additions & 0 deletions website/content/docs/helm-chart/Values/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
title: Values
id: values
---

# Values

import DocCardList from "@theme/DocCardList";

These are the values for the Helm Chart defined in the values.yaml file.

<DocCardList />
14 changes: 14 additions & 0 deletions website/content/docs/helm-chart/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
title: Helm Chart
id: helm-chart
---

import DocCardList from "@theme/DocCardList";

# Helm Chart

In order to make the installation of the GoKubeDownscaler as easy as possible we provide a fully customizable Helm Chart.

On the following pages you find out everything you need about it.

<DocCardList />
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@ helm install go-kube-downscaler caas-team/go-kube-downscaler
Now the GoKubeDownscaler should be properly installed.

:::tip
You can find out how to customize your installation of the GoKubeDownscaler [here][docs-helm-chart].
You can find out how to customize your installation of the GoKubeDownscaler [here][docs-helm-values].
:::
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ import DocCardList from "@theme/DocCardList";

# Basic configuration

These are some basic example configurations and usecases:
These are some basic example configurations and use cases:

<DocCardList />
30 changes: 4 additions & 26 deletions website/sidebars.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,36 +3,14 @@ import type { SidebarsConfig } from "@docusaurus/plugin-content-docs";
const sidebars: SidebarsConfig = {
DocsSidebar: [
{
type: "category",
label: "Helm Chart",
link: {
type: "generated-index",
title: "Helm Chart",
description: "Documentation about contents of the Helm chart.",
slug: "/docs/helm-chart",
},
items: [
{
type: "autogenerated",
dirName: "docs/helm-chart",
},
],
type: "autogenerated",
dirName: "docs",
},
],
GuidesSidebar: [
{
type: "category",
label: "Getting Started",
link: {
type: "doc",
id: "guides/getting-started",
},
items: [
{
type: "autogenerated",
dirName: "guides/getting-started",
},
],
type: "autogenerated",
dirName: "guides",
},
],
};
Expand Down

0 comments on commit 2912755

Please sign in to comment.