Skip to content

Commit

Permalink
feat[vcluster]: allow installation of online manifests, disable autos…
Browse files Browse the repository at this point in the history
…caler as default

Signed-off-by: Adrian Berger <[email protected]>
  • Loading branch information
adberger committed Dec 16, 2024
1 parent c2a9d36 commit 2f03aba
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 40 deletions.
2 changes: 1 addition & 1 deletion charts/vcluster/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: vcluster
description: Virtual Kubernetes Cluster
type: application
version: 0.7.1
version: 0.8.0
appVersion: 0.1.0
keywords:
- vcluster
Expand Down
12 changes: 5 additions & 7 deletions charts/vcluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

__This Chart is under active development! We try to improve documentation and values consistency over time__

![Version: 0.7.1](https://img.shields.io/badge/Version-0.7.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)
![Version: 0.8.0](https://img.shields.io/badge/Version-0.8.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)

Virtual Kubernetes Cluster

Expand Down Expand Up @@ -164,10 +164,8 @@ We use a lifecycle Job/Cronjob to manage certain configurations within the vclus
| lifecycle.setup.schedule | string | `"0 0 1 */6 *"` | Cronjob Schedule |
| lifecycle.setup.successfulJobsHistoryLimit | int | `3` | Cronjob successful jobs history limit |
| lifecycle.setup.ttlSecondsAfterFinished | int | `120` | ttlSecondsAfterFinished for setup |
| lifecycle.vcluster.cleanupScript | string | `nil` | Additional configuration script for the vcluster during cleanup (supports templating) |
| lifecycle.vcluster.extraManifests | object | See values.yaml | These manifests will be applied inside the vcluster (supports templating) |
| lifecycle.vcluster.extraManifestsOnInstall | object | See values.yaml | These manifests will be applied inside the vcluster, but only on $.Release.Install and wont be touched again (supports templating) |
| lifecycle.vcluster.setupScript | string | `nil` | Additional configuration script for the vcluster during reconciler (supports templating) |
| lifecycle.vcluster.extraOnlineManifests | list | `[]` | List of URLs which will be applied inside the vcluster (supports templating) |
| lifecycle.vcluster.extraOnlineManifestsOnInstall | list | `[]` | List of URLs which will be applied inside the vcluster, but only on $.Release.Install and wont be touched again (supports templating) |

## Machine Values

Expand Down Expand Up @@ -844,7 +842,7 @@ Available Values for the [Autsocaler component](#autoscaler).
---
| Key | Type | Default | Description |
|-----|------|---------|-------------|
| autoscaler.enabled | bool | `true` | Enable autsocaler component |
| autoscaler.enabled | bool | `false` | Enable autsocaler component |
| autoscaler.expanderPriorities | object | `{}` | The expanderPriorities is used if `extraArgs.expander` contains `priority` and expanderPriorities is also set with the priorities. If `args.expander` contains `priority`, then expanderPriorities is used to define cluster-autoscaler-priority-expander priorities. See: https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/expander/priority/readme.md |
| autoscaler.priorityConfigMapAnnotations | object | `{}` | Annotations to add to `cluster-autoscaler-priority-expander` ConfigMap. |

Expand All @@ -856,7 +854,7 @@ Available Values for the [Autsocaler component](#autoscaler).
| autoscaler.affinity | object | `{}` | Affinity |
| autoscaler.annotations | object | `{}` | Annotations for Workload |
| autoscaler.args | object | `{"leader-elect":true,"logtostderr":true,"scale-down-enabled":true,"stderrthreshold":"info","v":4}` | Additional container arguments. Refer to https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md#what-are-the-parameters-to-ca for the full list of cluster autoscaler parameters and their default values. Everything after the first _ will be ignored allowing the use of multi-string arguments. |
| autoscaler.enabled | bool | `true` | Enable autsocaler component |
| autoscaler.enabled | bool | `false` | Enable autsocaler component |
| autoscaler.envs | object | `{"CAPI_GROUP":"cluster.k8s.io"}` | Extra environment variables (`key: value` style, allows templating) |
| autoscaler.envsFrom | list | `[]` | Extra environment variables from |
| autoscaler.expanderPriorities | object | `{}` | The expanderPriorities is used if `extraArgs.expander` contains `priority` and expanderPriorities is also set with the priorities. If `args.expander` contains `priority`, then expanderPriorities is used to define cluster-autoscaler-priority-expander priorities. See: https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/expander/priority/readme.md |
Expand Down
8 changes: 4 additions & 4 deletions charts/vcluster/addons/scripts/configure-vcluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -147,11 +147,11 @@ fi
# Additional Manifests
# ------------------------------------------------------------------------------
{{- if $.Release.IsInstall }}
{{- with $lifecycle.vcluster.extraManifestsOnInstall }}
kubectl apply{{- range $key, $value := . }} -f /manifests/{{ $key }} {{- end }}
{{- range $lifecycle.vcluster.extraOnlineManifests }}
kubectl apply -f {{ . | quote }}
{{- end }}
{{- end }}

{{- with $lifecycle.vcluster.extraManifests }}
kubectl apply{{- range $key, $value := . }} -f /manifests/{{ $key }} {{- end }}
{{- range $lifecycle.vcluster.extraOnlineManifestsOnInstall }}
kubectl apply -f {{ . | quote }}
{{- end }}
33 changes: 5 additions & 28 deletions charts/vcluster/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -234,34 +234,11 @@ lifecycle:

# Additional customization for interactions with the vcluster cluster
vcluster:
# -- List of URLs which will be applied inside the vcluster (supports templating)
extraOnlineManifests: []

# -- Additional configuration script for the vcluster during reconciler (supports templating)
setupScript:
# echo "I am a script which runs on the vcluster"

# -- Additional configuration script for the vcluster during cleanup (supports templating)
cleanupScript:
# echo "I am a script which runs on the vcluster"

# -- These manifests will be applied inside the vcluster (supports templating)
# @default -- See values.yaml
extraManifests: {}
# -- Filename of the manifest
# namespace.yaml:
# apiVersion: v1
# kind: Namespace
# metadata:
# name: example

# -- These manifests will be applied inside the vcluster, but only on $.Release.Install and wont be touched again (supports templating)
# @default -- See values.yaml
extraManifestsOnInstall: {}
# -- Filename of the manifest
# namespace.yaml:
# apiVersion: v1
# kind: Namespace
# metadata:
# name: example
# -- List of URLs which will be applied inside the vcluster, but only on $.Release.Install and wont be touched again (supports templating)
extraOnlineManifestsOnInstall: []

# ArgoCD Lifecycle configuration
argocd:
Expand Down Expand Up @@ -2102,7 +2079,7 @@ kubernetes:
# ----------------------------
autoscaler:
# -- Enable autsocaler component
enabled: true
enabled: false
## Priorities Expander
# -- The expanderPriorities is used if `extraArgs.expander` contains `priority` and expanderPriorities is also set with the priorities.
# If `args.expander` contains `priority`, then expanderPriorities is used to define cluster-autoscaler-priority-expander priorities.
Expand Down

0 comments on commit 2f03aba

Please sign in to comment.