Skip to content

Commit f06e99b

Browse files
authored
Merge pull request kosmos-io#499 from qiuwei68/feature_hostports
feat: add kosmos-hostports configmap template
2 parents bbe8125 + 70c5563 commit f06e99b

File tree

1 file changed

+29
-1
lines changed

1 file changed

+29
-1
lines changed

deploy/virtual-cluster-operator.yml

+29-1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ metadata:
4141
namespace: kosmos-system
4242
type: Opaque
4343
data:
44+
# kubeconfig from outside cluster
4445
kubeconfig: __kubeconfig__
4546

4647
---
@@ -272,18 +273,23 @@ spec:
272273
labels:
273274
app: virtual-cluster-operator
274275
spec:
276+
# Enter the name of the node where the virtual cluster operator is deployed
277+
nodeName: nodeName
275278
serviceAccountName: virtual-cluster-operator
276279
containers:
277280
- name: virtual-cluster-operator
281+
# Change a valid image address
278282
image: ghcr.io/kosmos-io/virtual-cluster-operator:__VERSION__
279283
imagePullPolicy: IfNotPresent
280284
env:
281285
- name: IMAGE_REPOSITIRY
282286
value: ghcr.io/kosmos-io
283287
- name: IMAGE_VERSION
284288
value: v1.25.7
289+
# Enter the ip address of a master node
285290
- name: EXECTOR_HOST_MASTER_NODE_IP
286291
value: 192.168.0.1
292+
# WEB_USER and WEB_PASS for generate token that can be used to access the node-agent
287293
- name: WEB_USER
288294
valueFrom:
289295
secretKeyRef:
@@ -405,4 +411,26 @@ metadata:
405411
type: kubernetes.io/basic-auth
406412
data:
407413
username: {{ .USERNAME }}
408-
password: {{ .PASSWORD }}
414+
password: {{ .PASSWORD }}
415+
---
416+
apiVersion: v1
417+
kind: ConfigMap
418+
metadata:
419+
name: kosmos-hostports
420+
namespace: kosmos-system
421+
data:
422+
config.yaml: |
423+
# ports allocate for virtual cluster api server,from 33001, increment by 1 for each virtual cluster.Be careful not to use ports that are already in use
424+
portsPool:
425+
- 33001
426+
- 33002
427+
- 33003
428+
- 33004
429+
- 33005
430+
- 33006
431+
- 33007
432+
- 33008
433+
- 33009
434+
- 33010
435+
# when port is allocate from pool,it will be used for virtual cluster api server,and the port will be released after virtual cluster is deleted
436+
clusterPorts:

0 commit comments

Comments
 (0)