Skip to content

Commit

Permalink
Merge pull request #35 from FabianKramm/main
Browse files Browse the repository at this point in the history
NodeSelector, Affinity & Tolerations
  • Loading branch information
FabianKramm authored May 26, 2021
2 parents a303bef + 7d6a14e commit 55eaeae
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 5 deletions.
6 changes: 6 additions & 0 deletions chart/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
9 changes: 9 additions & 0 deletions chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
7 changes: 5 additions & 2 deletions conformance/v1.20/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -45,10 +48,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
Expand Down
8 changes: 5 additions & 3 deletions docs/pages/operator/external-datastore.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,15 @@ As mentioned, the format of the value passed to the `K3S_DATASTORE_ENDPOINT` env
{ label: 'Postgresql', value: 'postgresql', },
]}>
<TabItem value="etcd">

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.

</TabItem>
<TabItem value="mysql">

Expand Down

0 comments on commit 55eaeae

Please sign in to comment.