File tree Expand file tree Collapse file tree 7 files changed +28
-13
lines changed Expand file tree Collapse file tree 7 files changed +28
-13
lines changed Original file line number Diff line number Diff line change 1414 name : Integration Tests
1515 runs-on : ${{ matrix.os }}
1616 env :
17+ TF_VAR_secrets_encryption : false
18+ TF_VAR_metro : " sv"
19+ TF_VAR_ccm_enabled : true
20+ TF_VAR_loadbalancer_type : " kube-vip"
1721 TF_IN_AUTOMATION : 1
1822 TF_VERSION : ${{ matrix.tf }}
1923 TF_VAR_control_plane_node_count : 0
Original file line number Diff line number Diff line change 44* .tfvars
55examples /inventory.yaml
66examples /main.retry
7+ kubeconfig
8+ metal-key
9+ metal-key.pub
Original file line number Diff line number Diff line change 11#! /bin/bash
22/usr/bin/ssh -i $ssh_private_key_path -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null root@$controller " while true; do if ! type kubeadm > /dev/null; then sleep 20; else break; fi; done"
3- sleep 360
3+ sleep 520
44/usr/bin/scp -i $ssh_private_key_path -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -q root@$controller :/etc/kubernetes/admin.conf $local_path /kubeconfig;
55
Original file line number Diff line number Diff line change @@ -108,17 +108,13 @@ EOF
108108}
109109
110110function kube_vip {
111- kubectl apply -f https://kube-vip.io/manifests/rbac.yaml
112- GATEWAY_IP=$( curl https://metadata.platformequinix.com/metadata | jq -r " .network.addresses[] | select(.public == false) | .gateway" ) ;
113- ip route add 169.254.255.1 via $GATEWAY_IP
114- ip route add 169.254.255.2 via $GATEWAY_IP
115- alias kube-vip=" docker run --network host --rm ghcr.io/kube-vip/kube-vip:v0.3.8"
116- kube-vip manifest daemonset \
111+ kubectl --kubeconfig=/etc/kubernetes/admin.conf apply -f https://kube-vip.io/manifests/rbac.yaml
112+ docker run --network host --rm ghcr.io/kube-vip/kube-vip:v0.4.0 manifest daemonset \
117113 --interface lo \
118114 --services \
119115 --bgp \
120116 --annotations metal.equinix.com \
121- --inCluster | kubectl apply -f -
117+ --inCluster | kubectl --kubeconfig=/etc/kubernetes/admin.conf apply -f -
122118}
123119
124120function ceph_pre_check {
Original file line number Diff line number Diff line change @@ -83,7 +83,7 @@ resource "null_resource" "kubeconfig" {
8383}
8484
8585data "local_file" "kubeconfig" {
86- filename = " ${ path . root } /kubeconfig"
86+ filename = abspath ( " ${ path . root } /kubeconfig" )
8787
8888 depends_on = [
8989 null_resource. kubeconfig
Original file line number Diff line number Diff line change @@ -9,6 +9,12 @@ output "controller_addresses" {
99# }
1010
1111output "kubeconfig" {
12- description = " Kubeconfig for the newly created cluster"
13- value = data. local_file . kubeconfig
14- }
12+ description = " Kubeconfig content for the newly created cluster"
13+ value = data. local_file . kubeconfig . content
14+ sensitive = true
15+ }
16+
17+ output "kubeconfig_filename" {
18+ description = " Kubeconfig file for the newly created cluster"
19+ value = data. local_file . kubeconfig . filename
20+ }
Original file line number Diff line number Diff line change @@ -10,4 +10,10 @@ output "kubernetes_api_address" {
1010output "kubernetes_kubeconfig" {
1111 description = " Kubeconfig for the newly created cluster"
1212 value = module. controllers . kubeconfig
13- }
13+ sensitive = true
14+ }
15+
16+ output "kubernetes_kubeconfig_file" {
17+ description = " Kubecobnfig file for the newly created cluster"
18+ value = module. controllers . kubeconfig_filename
19+ }
You can’t perform that action at this time.
0 commit comments