mirror of
https://github.com/rancher/k3k.git
synced 2026-08-19 04:16:16 +00:00
Services updates (LoadBalancerConfig and NodePortConfig) (#329)
* updates to services - added loadBalancerConfig - removed service-port - added logic to not expose services * Refactor cluster tests to improve readability and maintainability - Simplified service port expectations by directly accessing elements instead of using `ContainElement`. - Enhanced clarity of test assertions for `k3s-server-port` and `k3s-etcd-port` attributes. - Removed redundant code for checking service ports. * fix ports for ingress expose, update kubeconfig generate
This commit is contained in:
@@ -72,7 +72,7 @@ func (v *VirtualAgent) config(ctx context.Context) error {
|
||||
}
|
||||
|
||||
func virtualAgentData(serviceIP, token string) string {
|
||||
return fmt.Sprintf(`server: https://%s:6443
|
||||
return fmt.Sprintf(`server: https://%s
|
||||
token: %s
|
||||
with-node-id: true`, serviceIP, token)
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ func Test_virtualAgentData(t *testing.T) {
|
||||
token: "dnjklsdjnksd892389238",
|
||||
},
|
||||
expectedData: map[string]string{
|
||||
"server": "https://10.0.0.21:6443",
|
||||
"server": "https://10.0.0.21",
|
||||
"token": "dnjklsdjnksd892389238",
|
||||
"with-node-id": "true",
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user