diff --git a/charts/vcluster/Chart.yaml b/charts/vcluster/Chart.yaml index 9c8261c1..4265069d 100644 --- a/charts/vcluster/Chart.yaml +++ b/charts/vcluster/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: vcluster description: Virtual Kubernetes Cluster type: application -version: 0.5.2 +version: 0.5.4 appVersion: 0.1.0 keywords: - vcluster @@ -15,5 +15,5 @@ maintainers: email: sre@bedag.ch dependencies: - name: common - version: 2.2.4 + version: 2.14.1 repository: https://charts.bitnami.com/bitnami diff --git a/charts/vcluster/README.md b/charts/vcluster/README.md index 383f69c6..bd6fa6b5 100644 --- a/charts/vcluster/README.md +++ b/charts/vcluster/README.md @@ -2,7 +2,7 @@ __This Chart is under active development! We try to improve documentation and values consistency over time__ -![Version: 0.5.2](https://img.shields.io/badge/Version-0.5.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) +![Version: 0.5.4](https://img.shields.io/badge/Version-0.5.4-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) Virtual Kubernetes Cluster @@ -18,7 +18,7 @@ Virtual Kubernetes Cluster | Repository | Name | Version | |------------|------|---------| -| https://charts.bitnami.com/bitnami | common | 2.2.4 | +| https://charts.bitnami.com/bitnami | common | 2.14.1 | # Major Changes diff --git a/charts/vcluster/manifests/kubernetes/coredns.yaml b/charts/vcluster/manifests/kubernetes/coredns.yaml index 7c903a2e..98933954 100644 --- a/charts/vcluster/manifests/kubernetes/coredns.yaml +++ b/charts/vcluster/manifests/kubernetes/coredns.yaml @@ -135,22 +135,15 @@ spec: {{- end }} priorityClassName: {{ $kubernetes.coredns.priorityClassName }} serviceAccountName: coredns + {{- with $kubernetes.coredns.affinity }} affinity: - podAntiAffinity: - preferredDuringSchedulingIgnoredDuringExecution: - - weight: 100 - podAffinityTerm: - labelSelector: - matchExpressions: - - key: k8s-app - operator: In - values: ["kube-dns"] - topologyKey: kubernetes.io/hostname - {{- with $kubernetes.coredns.tolerations }} + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with $kubernetes.coredns.tolerations }} tolerations: {{- toYaml . | nindent 8 }} {{- end }} - {{- with $kubernetes.coredns.nodeSelector }} + {{- with $kubernetes.coredns.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} {{- end }} diff --git a/charts/vcluster/templates/components/autoscaler/deployment.yaml b/charts/vcluster/templates/components/autoscaler/deployment.yaml index 82d3d38b..878a1042 100644 --- a/charts/vcluster/templates/components/autoscaler/deployment.yaml +++ b/charts/vcluster/templates/components/autoscaler/deployment.yaml @@ -28,9 +28,9 @@ spec: {{- include "autoscaler.selectorLabels" . | nindent 6 }} template: metadata: - annotations: + annotations: {{- include "pkg.components.pod_annotations" (dict "annotations" $manifest.podAnnotations "ctx" $) | nindent 8 }} - labels: + labels: {{- include "pkg.components.pod_labels" (dict "labels" $manifest.podLabels "ctx" $) | nindent 8 }} {{- include "autoscaler.selectorLabels" . | nindent 8 }} spec: @@ -89,7 +89,7 @@ spec: {{- with $manifest.volumeMounts }} {{- toYaml . | nindent 10 }} {{- end }} - {{- with (include "pkg.components.nodeselector" (dict "nodeselector" $manifest.nodeSelector "ctx" $)) }} + {{- with (include "pkg.components.nodeselector" (dict "nodeSelector" $manifest.nodeSelector "ctx" $)) }} nodeSelector: {{- . | nindent 8 }} {{- end }} {{- with (include "pkg.components.affinity" (dict "affinity" $manifest.affinity "ctx" $)) }} diff --git a/charts/vcluster/templates/components/kubernetes/admin/deployment.yaml b/charts/vcluster/templates/components/kubernetes/admin/deployment.yaml index 2513c10d..bcb7e276 100644 --- a/charts/vcluster/templates/components/kubernetes/admin/deployment.yaml +++ b/charts/vcluster/templates/components/kubernetes/admin/deployment.yaml @@ -34,7 +34,7 @@ spec: annotations: {{- include "pkg.components.pod_annotations" (dict "annotations" $kubernetes.admin.podAnnotations "ctx" $) | nindent 8 }} spec: - {{- with (include "pkg.components.nodeselector" (dict "nodeselector" $kubernetes.admin.nodeSelector "ctx" $)) }} + {{- with (include "pkg.components.nodeselector" (dict "nodeSelector" $kubernetes.admin.nodeSelector "ctx" $)) }} nodeSelector: {{- . | nindent 8 }} {{- end }} {{- with (include "pkg.components.tolerations" (dict "tolerations" $kubernetes.admin.tolerations "ctx" $)) }} diff --git a/charts/vcluster/templates/components/kubernetes/apiserver/deployment.yaml b/charts/vcluster/templates/components/kubernetes/apiserver/deployment.yaml index 612c0afe..ad80d905 100644 --- a/charts/vcluster/templates/components/kubernetes/apiserver/deployment.yaml +++ b/charts/vcluster/templates/components/kubernetes/apiserver/deployment.yaml @@ -37,7 +37,7 @@ spec: checksum/config: {{ include (print $.Template.BasePath "/components/kubernetes/apiserver/config.yaml" ) . | sha256sum }} {{- include "pkg.components.pod_annotations" (dict "annotations" $kubernetes.apiServer.podAnnotations "ctx" $) | nindent 8 }} spec: - {{- with (include "pkg.components.nodeselector" (dict "nodeselector" $kubernetes.apiServer.nodeSelector "ctx" $)) }} + {{- with (include "pkg.components.nodeselector" (dict "nodeSelector" $kubernetes.apiServer.nodeSelector "ctx" $)) }} nodeSelector: {{- . | nindent 8 }} {{- end }} {{- with (include "pkg.components.tolerations" (dict "tolerations" $kubernetes.apiServer.tolerations "ctx" $)) }} @@ -168,7 +168,7 @@ spec: {{- end }} {{- if (eq $kubernetes.konnectivity.server.mode "GRPC") }} - mountPath: /run/konnectivity-server - name: konnectivity-uds + name: konnectivity-uds {{- end }} {{- end }} {{- with $kubernetes.apiServer.volumeMounts }} diff --git a/charts/vcluster/templates/components/kubernetes/controller-manager/deployment.yaml b/charts/vcluster/templates/components/kubernetes/controller-manager/deployment.yaml index e38b5455..1eb3a027 100644 --- a/charts/vcluster/templates/components/kubernetes/controller-manager/deployment.yaml +++ b/charts/vcluster/templates/components/kubernetes/controller-manager/deployment.yaml @@ -36,7 +36,7 @@ spec: annotations: {{- include "pkg.components.pod_annotations" (dict "annotations" $kubernetes.controllerManager.podAnnotations "ctx" $) | nindent 8 }} spec: - {{- with (include "pkg.components.nodeselector" (dict "nodeselector" $kubernetes.controllerManager.nodeSelector "ctx" $)) }} + {{- with (include "pkg.components.nodeselector" (dict "nodeSelector" $kubernetes.controllerManager.nodeSelector "ctx" $)) }} nodeSelector: {{- . | nindent 8 }} {{- end }} {{- with (include "pkg.components.tolerations" (dict "tolerations" $kubernetes.controllerManager.tolerations "ctx" $)) }} diff --git a/charts/vcluster/templates/components/kubernetes/etcd/backup-job.yaml b/charts/vcluster/templates/components/kubernetes/etcd/backup-job.yaml index 1af55e54..e25f97e8 100644 --- a/charts/vcluster/templates/components/kubernetes/etcd/backup-job.yaml +++ b/charts/vcluster/templates/components/kubernetes/etcd/backup-job.yaml @@ -45,7 +45,7 @@ spec: annotations: {{- include "pkg.components.pod_annotations" (dict "annotations" $kubernetes.etcd.backup.podAnnotations "ctx" $) | nindent 12 }} spec: - {{- with (include "pkg.components.nodeselector" (dict "nodeselector" $kubernetes.etcd.backup.nodeSelector "ctx" $)) }} + {{- with (include "pkg.components.nodeselector" (dict "nodeSelector" $kubernetes.etcd.backup.nodeSelector "ctx" $)) }} nodeSelector: {{- . | nindent 10 }} {{- end }} {{- with (include "pkg.components.tolerations" (dict "tolerations" $kubernetes.etcd.backup.tolerations "ctx" $)) }} @@ -96,7 +96,7 @@ spec: envFrom: {{- toYaml . | nindent 12 }} {{- end }} - env: + env: {{- if $kubernetes.etcd.backup.injectProxy }} {{- include "pkg.common.env.w-proxy" $ | nindent 12 }} {{- else }} @@ -109,7 +109,7 @@ spec: - name: ETCDCTL_CERT value: /pki/etcd/peer/tls.crt - name: ETCDCTL_KEY - value: /pki/etcd/peer/tls.key + value: /pki/etcd/peer/tls.key - name: ETCDCTL_ENDPOINTS value: {{ $fullName }}-etcd:{{ $kubernetes.etcd.ports.client }} {{- with $kubernetes.etcd.backup.envs }} @@ -151,7 +151,7 @@ spec: secretName: {{ $fullName }}-pki-etcd-server name: pki-etcd-certs-server - name: snapshots - persistentVolumeClaim: + persistentVolumeClaim: claimName: {{ $kubernetes.etcd.backup.persistence.existingClaim | default (printf "%s-etcd-backup" $fullName) }} {{- with $kubernetes.etcd.backup.volumes }} {{- toYaml . | nindent 10 }} diff --git a/charts/vcluster/templates/components/kubernetes/etcd/statefulset.yaml b/charts/vcluster/templates/components/kubernetes/etcd/statefulset.yaml index 3b993288..7a5743f9 100644 --- a/charts/vcluster/templates/components/kubernetes/etcd/statefulset.yaml +++ b/charts/vcluster/templates/components/kubernetes/etcd/statefulset.yaml @@ -8,7 +8,7 @@ apiVersion: apps/v1 kind: StatefulSet metadata: name: {{ $fullName }}-etcd - labels: + labels: {{- include "kubernetes.labels" $ | nindent 4 }} {{ include "pkg.common.labels.component" $ }}: {{ $component_name }} {{- with (include "pkg.components.labels" (dict "labels" $kubernetes.etcd.labels "ctx" $)) }} @@ -43,7 +43,7 @@ spec: annotations: {{- include "pkg.components.pod_annotations" (dict "annotations" $kubernetes.etcd.podAnnotations "ctx" $) | nindent 8 }} spec: - {{- with (include "pkg.components.nodeselector" (dict "nodeselector" $kubernetes.etcd.nodeSelector "ctx" $)) }} + {{- with (include "pkg.components.nodeselector" (dict "nodeSelector" $kubernetes.etcd.nodeSelector "ctx" $)) }} nodeSelector: {{- . | nindent 8 }} {{- end }} {{- with (include "pkg.components.tolerations" (dict "tolerations" $kubernetes.etcd.tolerations "ctx" $)) }} @@ -109,7 +109,7 @@ spec: envFrom: {{- toYaml . | nindent 8 }} {{- end }} - env: + env: {{- if $kubernetes.etcd.injectProxy }} {{- include "pkg.common.env.w-proxy" $ | nindent 8 }} {{- else }} @@ -191,7 +191,7 @@ spec: {{- end }} {{- if and $kubernetes.etcd.backup.enabled $kubernetes.etcd.backup.persistence.mountOnETCD }} - name: snapshots - persistentVolumeClaim: + persistentVolumeClaim: claimName: {{ $kubernetes.etcd.backup.persistence.existingClaim | default (printf "%s-etcd-backup" $fullName) }} {{- end }} {{- with $kubernetes.etcd.volumes }} diff --git a/charts/vcluster/templates/components/kubernetes/konnectivity/deployment.yaml b/charts/vcluster/templates/components/kubernetes/konnectivity/deployment.yaml index d00cbe1d..de473015 100644 --- a/charts/vcluster/templates/components/kubernetes/konnectivity/deployment.yaml +++ b/charts/vcluster/templates/components/kubernetes/konnectivity/deployment.yaml @@ -35,7 +35,7 @@ spec: annotations: {{- include "pkg.components.pod_annotations" (dict "annotations" $kubernetes.konnectivity.server.podAnnotations "ctx" $) | nindent 8 }} spec: - {{- with (include "pkg.components.nodeselector" (dict "nodeselector" $kubernetes.konnectivity.server.nodeSelector "ctx" $)) }} + {{- with (include "pkg.components.nodeselector" (dict "nodeSelector" $kubernetes.konnectivity.server.nodeSelector "ctx" $)) }} nodeSelector: {{- . | nindent 8 }} {{- end }} {{- with (include "pkg.components.tolerations" (dict "tolerations" $kubernetes.konnectivity.server.tolerations "ctx" $)) }} diff --git a/charts/vcluster/templates/components/kubernetes/scheduler/deployment.yaml b/charts/vcluster/templates/components/kubernetes/scheduler/deployment.yaml index a5ffbad5..616ceafb 100644 --- a/charts/vcluster/templates/components/kubernetes/scheduler/deployment.yaml +++ b/charts/vcluster/templates/components/kubernetes/scheduler/deployment.yaml @@ -35,7 +35,7 @@ spec: annotations: {{- include "pkg.components.pod_annotations" (dict "annotations" $kubernetes.scheduler.podAnnotations "ctx" $) | nindent 8 }} spec: - {{- with (include "pkg.components.nodeselector" (dict "nodeselector" $kubernetes.scheduler.nodeSelector "ctx" $)) }} + {{- with (include "pkg.components.nodeselector" (dict "nodeSelector" $kubernetes.scheduler.nodeSelector "ctx" $)) }} nodeSelector: {{- . | nindent 8 }} {{- end }} {{- with (include "pkg.components.tolerations" (dict "tolerations" $kubernetes.scheduler.tolerations "ctx" $)) }} @@ -112,7 +112,7 @@ spec: envFrom: {{- toYaml . | nindent 8 }} {{- end }} - env: + env: {{- if $kubernetes.scheduler.injectProxy }} {{- include "pkg.common.env.w-proxy" $ | nindent 8 }} {{- else }} diff --git a/charts/vcluster/templates/components/machine-controller/deployment.yaml b/charts/vcluster/templates/components/machine-controller/deployment.yaml index 05f524cf..679aa33e 100644 --- a/charts/vcluster/templates/components/machine-controller/deployment.yaml +++ b/charts/vcluster/templates/components/machine-controller/deployment.yaml @@ -57,12 +57,12 @@ spec: {{- end }} image: {{ include "pkg.images.registry.convert" (dict "image" .image "tag_overwrite" $machine.version "ctx" $) }} imagePullPolicy: {{ include "pkg.images.registry.pullpolicy" (dict "policy" .image.pullPolicy "ctx" $) }} - env: + env: {{- if .injectProxy }} {{- include "pkg.common.env.w-proxy" $ | nindent 10 }} {{- else }} {{- include "pkg.common.env" $ | nindent 10 }} - {{- end }} + {{- end }} {{- with .envs }} {{- include "pkg.utils.envs" (dict "envs" . "ctx" $) | nindent 10 }} {{- end }} @@ -114,12 +114,12 @@ spec: - name: webhook image: {{ include "pkg.images.registry.convert" (dict "image" .image "tag_overwrite" $machine.version "ctx" $) }} imagePullPolicy: {{ include "pkg.images.registry.pullpolicy" (dict "policy" .image.pullPolicy "ctx" $) }} - env: + env: {{- if .injectProxy }} {{- include "pkg.common.env.w-proxy" $ | nindent 10 }} {{- else }} {{- include "pkg.common.env" $ | nindent 10 }} - {{- end }} + {{- end }} {{- with .envs }} {{- include "pkg.utils.envs" (dict "envs" . "ctx" $) | nindent 10 }} {{- end }} @@ -162,7 +162,7 @@ spec: {{- end }} {{- end }} {{- end }} - {{- with (include "pkg.components.nodeselector" (dict "nodeselector" $machine.nodeSelector "ctx" $)) }} + {{- with (include "pkg.components.nodeselector" (dict "nodeSelector" $machine.nodeSelector "ctx" $)) }} nodeSelector: {{- . | nindent 8 }} {{- end }} {{- with (include "pkg.components.affinity" (dict "affinity" $machine.affinity "ctx" $)) }} diff --git a/charts/vcluster/templates/components/operating-system-manager/deployment.yaml b/charts/vcluster/templates/components/operating-system-manager/deployment.yaml index 406b4206..0504aa38 100644 --- a/charts/vcluster/templates/components/operating-system-manager/deployment.yaml +++ b/charts/vcluster/templates/components/operating-system-manager/deployment.yaml @@ -56,12 +56,12 @@ spec: {{- end }} image: {{ include "pkg.images.registry.convert" (dict "image" .image "tag_overwrite" $osm.version "ctx" $) }} imagePullPolicy: {{ include "pkg.images.registry.pullpolicy" (dict "policy" .image.pullPolicy "ctx" $) }} - env: + env: {{- if .injectProxy }} {{- include "pkg.common.env.w-proxy" $ | nindent 10 }} {{- else }} {{- include "pkg.common.env" $ | nindent 10 }} - {{- end }} + {{- end }} {{- with .envs }} {{- include "pkg.utils.envs" (dict "envs" . "ctx" $) | nindent 10 }} {{- end }} @@ -157,7 +157,7 @@ spec: {{- end }} {{- end }} {{- end }} - {{- with (include "pkg.components.nodeselector" (dict "nodeselector" $osm.nodeSelector "ctx" $)) }} + {{- with (include "pkg.components.nodeselector" (dict "nodeSelector" $osm.nodeSelector "ctx" $)) }} nodeSelector: {{- . | nindent 8 }} {{- end }} {{- with (include "pkg.components.affinity" (dict "affinity" $osm.affinity "ctx" $)) }} diff --git a/charts/vcluster/templates/lifecycle/setup.yaml b/charts/vcluster/templates/lifecycle/setup.yaml index 9cb2c6f3..0a9d19be 100644 --- a/charts/vcluster/templates/lifecycle/setup.yaml +++ b/charts/vcluster/templates/lifecycle/setup.yaml @@ -26,7 +26,7 @@ spec: annotations: {{- include "pkg.components.pod_annotations" (dict "annotations" $manifest.podAnnotations "ctx" $) | nindent 8 }} spec: - {{- with (include "pkg.components.nodeselector" (dict "nodeselector" $manifest.nodeSelector "ctx" $)) }} + {{- with (include "pkg.components.nodeselector" (dict "nodeSelector" $manifest.nodeSelector "ctx" $)) }} nodeSelector: {{- . | nindent 8 }} {{- end }} {{- with (include "pkg.components.tolerations" (dict "tolerations" $manifest.tolerations "ctx" $)) }} @@ -87,7 +87,7 @@ spec: {{- include "pkg.common.env.w-proxy" $ | nindent 8 }} {{- else }} {{- include "pkg.common.env" $ | nindent 8 }} - {{- end }} + {{- end }} {{- include "pkg.utils.xdg-env" $ | nindent 8 }} - name: KUBECONFIG value: "/etc/kubernetes/admin.conf"