Skip to content

Commit 2a765be

Browse files
Support custom port for powervs cluster apiserver (#1251)
Signed-off-by: Prajyot-Parab <[email protected]>
1 parent 4279f6b commit 2a765be

File tree

5 files changed

+25
-15
lines changed

5 files changed

+25
-15
lines changed

docs/book/src/topics/powervs/creating-a-cluster.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,11 @@ following the steps below.
7777
IBMPOWERVS_COMPUTE_PROCTYPE
7878
```
7979

80+
Additional parameters for modifying PowerVS Cluster API server port
81+
```
82+
API_SERVER_PORT
83+
```
84+
8085
3. Check the state of the provisioned cluster and machine objects within the local management cluster
8186

8287
Clusters

templates/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,8 @@ IBMPOWERVS_COMPUTE_PROCESSORS
5050
IBMPOWERVS_COMPUTE_SYSTYPE
5151
IBMPOWERVS_COMPUTE_PROCTYPE
5252
```
53+
54+
### Additional parameters for modifying PowerVS Cluster API server port
55+
```
56+
API_SERVER_PORT
57+
```

templates/cluster-template-powervs-cloud-provider.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ spec:
3535
name: "${IBMPOWERVS_NETWORK_NAME}"
3636
controlPlaneEndpoint:
3737
host: "${IBMPOWERVS_VIP_EXTERNAL}"
38-
port: 6443
38+
port: ${API_SERVER_PORT:=6443}
3939
---
4040
kind: KubeadmControlPlane
4141
apiVersion: controlplane.cluster.x-k8s.io/v1beta1
@@ -57,7 +57,7 @@ spec:
5757
- "${IBMPOWERVS_VIP_EXTERNAL}"
5858
extraArgs:
5959
cloud-provider: external
60-
controlPlaneEndpoint: ${IBMPOWERVS_VIP}:6443
60+
controlPlaneEndpoint: ${IBMPOWERVS_VIP}:${API_SERVER_PORT:=6443}
6161
controllerManager:
6262
extraArgs:
6363
cloud-provider: external
@@ -72,7 +72,7 @@ spec:
7272
joinConfiguration:
7373
discovery:
7474
bootstrapToken:
75-
apiServerEndpoint: ${IBMPOWERVS_VIP}:6443
75+
apiServerEndpoint: ${IBMPOWERVS_VIP}:${API_SERVER_PORT:=6443}
7676
token: ""
7777
caCertHashes: [ ]
7878
unsafeSkipCAVerification: false
@@ -106,7 +106,7 @@ spec:
106106
- name: vip_arp
107107
value: "true"
108108
- name: port
109-
value: "6443"
109+
value: "${API_SERVER_PORT:=6443}"
110110
- name: vip_interface
111111
value: env2
112112
- name: vip_cidr
@@ -226,7 +226,7 @@ spec:
226226
joinConfiguration:
227227
discovery:
228228
bootstrapToken:
229-
apiServerEndpoint: ${IBMPOWERVS_VIP}:6443
229+
apiServerEndpoint: ${IBMPOWERVS_VIP}:${API_SERVER_PORT:=6443}
230230
token: ""
231231
caCertHashes: []
232232
unsafeSkipCAVerification: false

templates/cluster-template-powervs.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ spec:
3434
name: "${IBMPOWERVS_NETWORK_NAME}"
3535
controlPlaneEndpoint:
3636
host: "${IBMPOWERVS_VIP_EXTERNAL}"
37-
port: 6443
37+
port: ${API_SERVER_PORT:=6443}
3838
---
3939
kind: KubeadmControlPlane
4040
apiVersion: controlplane.cluster.x-k8s.io/v1beta1
@@ -54,7 +54,7 @@ spec:
5454
certSANs:
5555
- "${IBMPOWERVS_VIP}"
5656
- "${IBMPOWERVS_VIP_EXTERNAL}"
57-
controlPlaneEndpoint: ${IBMPOWERVS_VIP}:6443
57+
controlPlaneEndpoint: ${IBMPOWERVS_VIP}:${API_SERVER_PORT:=6443}
5858
controllerManager:
5959
extraArgs:
6060
enable-hostpath-provisioner: "true"
@@ -69,7 +69,7 @@ spec:
6969
joinConfiguration:
7070
discovery:
7171
bootstrapToken:
72-
apiServerEndpoint: ${IBMPOWERVS_VIP}:6443
72+
apiServerEndpoint: ${IBMPOWERVS_VIP}:${API_SERVER_PORT:=6443}
7373
token: ""
7474
caCertHashes: [ ]
7575
unsafeSkipCAVerification: false
@@ -104,7 +104,7 @@ spec:
104104
- name: vip_arp
105105
value: "true"
106106
- name: port
107-
value: "6443"
107+
value: "${API_SERVER_PORT:=6443}"
108108
- name: vip_interface
109109
value: env2
110110
- name: vip_cidr
@@ -223,7 +223,7 @@ spec:
223223
joinConfiguration:
224224
discovery:
225225
bootstrapToken:
226-
apiServerEndpoint: ${IBMPOWERVS_VIP}:6443
226+
apiServerEndpoint: ${IBMPOWERVS_VIP}:${API_SERVER_PORT:=6443}
227227
token: ""
228228
caCertHashes: []
229229
unsafeSkipCAVerification: false

templates/cluster-template-simple-powervs-clusterclass.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ spec:
6969
spec:
7070
controlPlaneEndpoint:
7171
host: "${IBMPOWERVS_VIP_EXTERNAL}"
72-
port: 6443
72+
port: ${API_SERVER_PORT:=6443}
7373
network:
7474
name: "${IBMPOWERVS_NETWORK_NAME}"
7575
serviceInstanceID: "${IBMPOWERVS_SERVICE_INSTANCE_ID}"
@@ -89,7 +89,7 @@ spec:
8989
- "${IBMPOWERVS_VIP_EXTERNAL}"
9090
extraArgs:
9191
cloud-provider: external
92-
controlPlaneEndpoint: ${IBMPOWERVS_VIP}:6443
92+
controlPlaneEndpoint: ${IBMPOWERVS_VIP}:${API_SERVER_PORT:=6443}
9393
controllerManager:
9494
extraArgs:
9595
cloud-provider: external
@@ -110,7 +110,7 @@ spec:
110110
- name: vip_arp
111111
value: "true"
112112
- name: port
113-
value: "6443"
113+
value: "${API_SERVER_PORT:=6443}"
114114
- name: vip_interface
115115
value: env2
116116
- name: vip_cidr
@@ -168,7 +168,7 @@ spec:
168168
joinConfiguration:
169169
discovery:
170170
bootstrapToken:
171-
apiServerEndpoint: 192.168.167.85:6443
171+
apiServerEndpoint: 192.168.167.85:${API_SERVER_PORT:=6443}
172172
caCertHashes: []
173173
token: ""
174174
unsafeSkipCAVerification: false
@@ -199,7 +199,7 @@ spec:
199199
joinConfiguration:
200200
discovery:
201201
bootstrapToken:
202-
apiServerEndpoint: ${IBMPOWERVS_VIP}:6443
202+
apiServerEndpoint: ${IBMPOWERVS_VIP}:${API_SERVER_PORT:=6443}
203203
caCertHashes: []
204204
token: ""
205205
unsafeSkipCAVerification: false

0 commit comments

Comments
 (0)