Skip to content

Commit 4ac519f

Browse files
committed
chore: rename HELM_VALUES to VCLUSTER_YAML
1 parent ebbfa1e commit 4ac519f

File tree

7 files changed

+48
-13
lines changed

7 files changed

+48
-13
lines changed

.github/workflows/e2e.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ jobs:
114114
export CLUSTER_NAME=vcluster-k3s
115115
export CLUSTER_NAMESPACE=vcluster-k3s
116116
export CHART_VERSION=0.20.0-beta.12
117-
export HELM_VALUES=$(cat ./test/e2e/k3s-values.yaml | sed -z 's/\n/\\n/g')
117+
export VCLUSTER_YAML=$(cat ./test/e2e/k3s-values.yaml | sed -z 's/\n/\\n/g')
118118
kubectl create namespace ${CLUSTER_NAMESPACE}
119119
cat templates/cluster-template.yaml | ./bin/envsubst | kubectl apply -n ${CLUSTER_NAMESPACE} -f -
120120
@@ -131,7 +131,7 @@ jobs:
131131
export CLUSTER_NAMESPACE=vcluster-k0s
132132
export CHART_VERSION=0.20.0-beta.12
133133
export CHART_NAME=vcluster
134-
export HELM_VALUES=$(cat ./test/e2e/k0s-values.yaml | sed -z 's/\n/\\n/g')
134+
export VCLUSTER_YAML=$(cat ./test/e2e/k0s-values.yaml | sed -z 's/\n/\\n/g')
135135
kubectl create namespace ${CLUSTER_NAMESPACE}
136136
cat templates/cluster-template.yaml | ./bin/envsubst | kubectl apply -n ${CLUSTER_NAMESPACE} -f -
137137
@@ -148,7 +148,7 @@ jobs:
148148
export CLUSTER_NAMESPACE=vcluster-k8s
149149
export CHART_VERSION=0.20.0-beta.12
150150
export CHART_NAME=vcluster
151-
export HELM_VALUES=$(cat ./test/e2e/k8s-values.yaml | sed -z 's/\n/\\n/g')
151+
export VCLUSTER_YAML=$(cat ./test/e2e/k8s-values.yaml | sed -z 's/\n/\\n/g')
152152
kubectl create namespace ${CLUSTER_NAMESPACE}
153153
cat templates/cluster-template.yaml | ./bin/envsubst | kubectl apply -n ${CLUSTER_NAMESPACE} -f -
154154
@@ -165,7 +165,7 @@ jobs:
165165
export CLUSTER_NAMESPACE=vcluster-eks
166166
export CHART_VERSION=0.20.0-beta.12
167167
export CHART_NAME=vcluster
168-
export HELM_VALUES=$(cat ./test/e2e/eks-values.yaml | sed -z 's/\n/\\n/g')
168+
export VCLUSTER_YAML=$(cat ./test/e2e/eks-values.yaml | sed -z 's/\n/\\n/g')
169169
kubectl create namespace ${CLUSTER_NAMESPACE}
170170
cat templates/cluster-template.yaml | ./bin/envsubst | kubectl apply -n ${CLUSTER_NAMESPACE} -f -
171171

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ clusterctl init --infrastructure vcluster
2121

2222
Next you will generate a manifest file for a vcluster instance and create it in the management cluster.
2323
Cluster instance is configured using clusterctl parameters and environment variables - CHART_NAME, CHART_REPO, CHART_VERSION, VCLUSTER_HOST and VCLUSTER_PORT.
24-
In the example commands below, the HELM_VALUES variable will be populated with the contents of the `values.yaml` file.
24+
In the example commands below, the VCLUSTER_YAML variable will be populated with the contents of the `values.yaml` file.
2525
```shell
2626
export CLUSTER_NAME=vcluster
2727
export CLUSTER_NAMESPACE=vcluster
28-
export HELM_VALUES=""
28+
export VCLUSTER_YAML=""
2929
# Uncomment if you want to use vcluster values
30-
# export HELM_VALUES=$(cat devvalues.yaml | awk '{printf "%s\\n", $0}')
30+
# export VCLUSTER_YAML=$(cat devvalues.yaml | awk '{printf "%s\\n", $0}')
3131
kubectl create namespace ${CLUSTER_NAMESPACE}
3232
clusterctl generate cluster ${CLUSTER_NAME} \
3333
--infrastructure vcluster \
@@ -161,13 +161,13 @@ go run -mod vendor main.go
161161

162162
Next, in a separate terminal you will generate a manifest file for a vcluster instance.
163163
Cluster instance is configured from a template file using environment variables - CLUSTER_NAME, CHART_NAME, CHART_REPO, CHART_VERSION, VCLUSTER_HOST and VCLUSTER_PORT. Only the CHART_VERSION and CLUSTER_NAME variables are mandatory.
164-
In the example commands below, the HELM_VALUES variable will be populated with the contents of the `devvalues.yaml` file, don't forget to re-run the `export HELM_VALUES...` command when the `devvalues.yaml` changes.
164+
In the example commands below, the VCLUSTER_YAML variable will be populated with the contents of the `devvalues.yaml` file, don't forget to re-run the `export VCLUSTER_YAML...` command when the `devvalues.yaml` changes.
165165
```shell
166166
export CLUSTER_NAME=test
167167
export CLUSTER_NAMESPACE=test
168168
export CHART_VERSION=0.20.0
169169
export CHART_NAME=vcluster
170-
export HELM_VALUES=$(cat devvalues.yaml | awk '{printf "%s\\n", $0}')
170+
export VCLUSTER_YAML=$(cat devvalues.yaml | awk '{printf "%s\\n", $0}')
171171
kubectl create namespace ${CLUSTER_NAMESPACE}
172172
cat templates/cluster-template.yaml | ./bin/envsubst | kubectl apply -n ${CLUSTER_NAMESPACE} -f -
173173
```
@@ -192,7 +192,7 @@ export CHART_VERSION=0.20.0
192192

193193
## Specifying custom values for virtual clusters
194194

195-
Depending on your needs, you might want to let CAPVC create a virtual cluster accordingly by e.g. settings those values in a corresponding file that is fed to the `HELM_VALUES` environment variable.
195+
Depending on your needs, you might want to let CAPVC create a virtual cluster accordingly by e.g. settings those values in a corresponding file that is fed to the `VCLUSTER_YAML` environment variable.
196196

197197
Example:
198198

@@ -208,7 +208,7 @@ controlPlane:
208208
enabled: true
209209
EOF
210210
211-
export HELM_VALUES=$(cat /tmp/values.yaml | awk '{printf "%s\\n", $0}')
211+
export VCLUSTER_YAML=$(cat /tmp/values.yaml | awk '{printf "%s\\n", $0}')
212212
```
213213

214214
For all possible values please see the [official docs](https://www.vcluster.com/docs/vcluster/configure/vcluster-yaml/).
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: controller-manager
5+
namespace: system
6+
spec:
7+
template:
8+
spec:
9+
containers:
10+
# Change the value of image field below to your controller image URL
11+
- image: docker.io/loftsh/cluster-api-provider-vcluster:main
12+
name: manager
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: controller-manager
5+
namespace: system
6+
spec:
7+
template:
8+
spec:
9+
containers:
10+
- name: manager
11+
imagePullPolicy: Always
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
apiVersion: rbac.authorization.k8s.io/v1
2+
kind: ClusterRoleBinding
3+
metadata:
4+
name: manager-rolebinding
5+
roleRef:
6+
apiGroup: rbac.authorization.k8s.io
7+
kind: ClusterRole
8+
name: ${CLUSTER_ROLE:=cluster-admin}
9+
subjects:
10+
- kind: ServiceAccount
11+
name: controller-manager
12+
namespace: system

docs/quick-start.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ Next we will create our virtual cluster within our `kind` cluster.
6262
```shell
6363
export CLUSTER_NAME=kind
6464
export CLUSTER_NAMESPACE=vcluster
65-
export HELM_VALUES=""
65+
export VCLUSTER_YAML=""
6666

6767
kubectl create namespace ${CLUSTER_NAMESPACE}
6868
clusterctl generate cluster ${CLUSTER_NAME} \

templates/cluster-template.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ metadata:
1818
name: ${CLUSTER_NAME}
1919
spec:
2020
helmRelease:
21-
values: "${HELM_VALUES:=}"
21+
values: "${VCLUSTER_YAML:=}"
2222
chart:
2323
name: ${CHART_NAME:=vcluster}
2424
repo: ${CHART_REPO:=https://charts.loft.sh}

0 commit comments

Comments
 (0)