From 5289eb3f03e125bccbe5f3963df4be3b87290b0f Mon Sep 17 00:00:00 2001 From: fabiankramm Date: Wed, 26 May 2021 15:13:47 +0200 Subject: [PATCH 1/3] docs: update conformance readme --- conformance/v1.20/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conformance/v1.20/README.md b/conformance/v1.20/README.md index 5aac5b14d..bda4aea5a 100644 --- a/conformance/v1.20/README.md +++ b/conformance/v1.20/README.md @@ -45,10 +45,10 @@ syncer: - --disable-sync-resources=ingresses ``` -Now create the vcluster +Now create the vcluster with the [vcluster cli](https://github.com/loft-sh/vcluster/releases) (at least version v0.3.0-alpha.1 or newer): ``` # Create the vcluster -vcluster create vcluster -n vcluster -f values.yaml +vcluster create vcluster -n vcluster --chart-version v0.3.0-alpha.1 -f values.yaml # Connect to the vcluster vcluster connect vcluster -n vcluster From e5572648b6c7e8f7dd9fced76435049ad8c580b8 Mon Sep 17 00:00:00 2001 From: fabiankramm Date: Wed, 26 May 2021 15:35:59 +0200 Subject: [PATCH 2/3] chore: add affinity, nodeSelector & tolerations --- chart/templates/statefulset.yaml | 6 ++++++ chart/values.yaml | 9 +++++++++ docs/pages/operator/external-datastore.mdx | 8 +++++--- 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/chart/templates/statefulset.yaml b/chart/templates/statefulset.yaml index 9412c1124..36b80bbd0 100644 --- a/chart/templates/statefulset.yaml +++ b/chart/templates/statefulset.yaml @@ -38,6 +38,12 @@ spec: release: {{ .Release.Name }} spec: terminationGracePeriodSeconds: 10 + nodeSelector: +{{ toYaml .Values.nodeSelector | indent 8 }} + affinity: +{{ toYaml .Values.affinity | indent 8 }} + tolerations: +{{ toYaml .Values.tolerations | indent 8 }} {{- if .Values.serviceAccount.name }} serviceAccountName: {{ .Values.serviceAccount.name }} {{- else }} diff --git a/chart/values.yaml b/chart/values.yaml index 614562c4b..437984e36 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -69,6 +69,15 @@ rbac: # The amount of replicas to run the statefulset with replicas: 1 +# NodeSelector used to schedule the vcluster +nodeSelector: {} + +# Affinity to apply to the vcluster statefulset +affinity: {} + +# Tolerations to apply to the vcluster statefulset +tolerations: [] + # Service configurations service: type: ClusterIP diff --git a/docs/pages/operator/external-datastore.mdx b/docs/pages/operator/external-datastore.mdx index 5b642a36a..2f5402e9b 100644 --- a/docs/pages/operator/external-datastore.mdx +++ b/docs/pages/operator/external-datastore.mdx @@ -38,13 +38,15 @@ As mentioned, the format of the value passed to the `K3S_DATASTORE_ENDPOINT` env { label: 'Postgresql', value: 'postgresql', }, ]}> - + In its most common form, the `K3S_DATASTORE_ENDPOINT` environment variable for etcd has the following format: -`https://etcd-host-1:2379,https://etcd-host-2:2379,https://etcd-host-3:2379` +``` +https://etcd-host-1:2379,https://etcd-host-2:2379,https://etcd-host-3:2379 +``` The above assumes a typical three node etcd cluster. The environment variable can accept one more comma separated etcd URLs. - + From 7d6a14e3619aecf7a460ac06c5f6946f8afc8cc3 Mon Sep 17 00:00:00 2001 From: fabiankramm Date: Wed, 26 May 2021 16:22:21 +0200 Subject: [PATCH 3/3] docs: update conformance readme --- conformance/v1.20/README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/conformance/v1.20/README.md b/conformance/v1.20/README.md index bda4aea5a..a853056c8 100644 --- a/conformance/v1.20/README.md +++ b/conformance/v1.20/README.md @@ -32,6 +32,9 @@ Create a file called `values.yaml` with the following contents: ```yaml vcluster: image: rancher/k3s:v1.20.6-k3s1 +# Tolerate everything as the test will taint some nodes +tolerations: +- operator: "Exists" rbac: clusterRole: create: true