diff --git a/website/content/_global_md_links.mdx b/website/content/_global_md_links.mdx index 32aae12..e9f33aa 100644 --- a/website/content/_global_md_links.mdx +++ b/website/content/_global_md_links.mdx @@ -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" diff --git a/website/content/docs/helm-chart/0 - Components.mdx b/website/content/docs/helm-chart/0 - Components.mdx index e6ee409..069d8d0 100644 --- a/website/content/docs/helm-chart/0 - Components.mdx +++ b/website/content/docs/helm-chart/0 - Components.mdx @@ -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 diff --git a/website/content/docs/helm-chart/1 - Permissions.mdx b/website/content/docs/helm-chart/1 - Permissions.mdx index 9956219..466f57b 100644 --- a/website/content/docs/helm-chart/1 - Permissions.mdx +++ b/website/content/docs/helm-chart/1 - Permissions.mdx @@ -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 @@ -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: ::: @@ -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 diff --git a/website/content/docs/helm-chart/Values/16 - configMap.mdx b/website/content/docs/helm-chart/Values/16 - configMap.mdx index 14a5a75..6a9d7bd 100644 --- a/website/content/docs/helm-chart/Values/16 - configMap.mdx +++ b/website/content/docs/helm-chart/Values/16 - configMap.mdx @@ -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 diff --git a/website/content/docs/helm-chart/Values/3 - includedResources.mdx b/website/content/docs/helm-chart/Values/3 - includedResources.mdx index 30c3644..4ba0182 100644 --- a/website/content/docs/helm-chart/Values/3 - includedResources.mdx +++ b/website/content/docs/helm-chart/Values/3 - includedResources.mdx @@ -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: @@ -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). - ::: diff --git a/website/content/docs/helm-chart/Values/4 - fullnameOverride.mdx b/website/content/docs/helm-chart/Values/4 - fullnameOverride.mdx index ea29d30..0a887d4 100644 --- a/website/content/docs/helm-chart/Values/4 - fullnameOverride.mdx +++ b/website/content/docs/helm-chart/Values/4 - fullnameOverride.mdx @@ -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: @@ -15,3 +15,5 @@ fullnameOverride: "" ``` ::: + +If a value for `fullnameOverride` is set the Helm Chart diff --git a/website/content/docs/helm-chart/Values/6 - constrainedDownscaler.mdx b/website/content/docs/helm-chart/Values/6 - constrainedDownscaler.mdx index da11d8a..1d19893 100644 --- a/website/content/docs/helm-chart/Values/6 - constrainedDownscaler.mdx +++ b/website/content/docs/helm-chart/Values/6 - constrainedDownscaler.mdx @@ -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: @@ -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. diff --git a/website/content/docs/helm-chart/Values/7 - constrainedNamespaces.mdx b/website/content/docs/helm-chart/Values/7 - constrainedNamespaces.mdx index ed0d42c..5835d38 100644 --- a/website/content/docs/helm-chart/Values/7 - constrainedNamespaces.mdx +++ b/website/content/docs/helm-chart/Values/7 - constrainedNamespaces.mdx @@ -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: diff --git a/website/content/docs/helm-chart/Values/8 - serviceAccount.mdx b/website/content/docs/helm-chart/Values/8 - serviceAccount.mdx index 26bcc42..4afa626 100644 --- a/website/content/docs/helm-chart/Values/8 - serviceAccount.mdx +++ b/website/content/docs/helm-chart/Values/8 - serviceAccount.mdx @@ -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: diff --git a/website/content/docs/helm-chart/Values/index.mdx b/website/content/docs/helm-chart/Values/index.mdx new file mode 100644 index 0000000..5d833ff --- /dev/null +++ b/website/content/docs/helm-chart/Values/index.mdx @@ -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. + + diff --git a/website/content/docs/helm-chart/index.mdx b/website/content/docs/helm-chart/index.mdx new file mode 100644 index 0000000..e3fccad --- /dev/null +++ b/website/content/docs/helm-chart/index.mdx @@ -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. + + diff --git a/website/content/guides/getting-started/0 - Installation.mdx b/website/content/guides/getting-started/0 - Installation.mdx index a9ef256..dd35823 100644 --- a/website/content/guides/getting-started/0 - Installation.mdx +++ b/website/content/guides/getting-started/0 - Installation.mdx @@ -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]. ::: diff --git a/website/content/guides/Getting Started.mdx b/website/content/guides/getting-started/index.mdx similarity index 72% rename from website/content/guides/Getting Started.mdx rename to website/content/guides/getting-started/index.mdx index d9b93a3..1a605f8 100644 --- a/website/content/guides/Getting Started.mdx +++ b/website/content/guides/getting-started/index.mdx @@ -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: diff --git a/website/sidebars.ts b/website/sidebars.ts index 76f09fc..1cdf5b9 100644 --- a/website/sidebars.ts +++ b/website/sidebars.ts @@ -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", }, ], };