loft-sh / cluster-api-provider-vcluster

Mozilla Public License 2.0
73 stars 21 forks source link

setting VCLUSTER_HOST stops successful provisioning #37

Closed lknite closed 11 months ago

lknite commented 1 year ago

It looks like the VCLUSTER_HOST value makes it through to the VCluster but that alone seems to stop it from provisioning:

export VCLUSTER_HOST=vc-test.root.k.home.net

vcluster.yaml:

apiVersion: infrastructure.cluster.x-k8s.io/v1alpha1
kind: VCluster
metadata:
  name: vc-test
  namespace: vc-test
spec:
  controlPlaneEndpoint:
    host: "vc-test.root.k.home.net"

Could it be that it's checking the url to see if it resolves? In my case I'm using an ingress so that url won't resolve until the ingress exists for a little bit and then gets an ip...

I'd like to use this because though I can get a cluster to provision the kubeconfig generated via 'clusterctl get kubeconfig ...' has a host of server: https://vc-test.vc-test.svc:443. I would have expected the ingress url to be used based on the cluster-api-provider-vcluster README:

lknite commented 11 months ago

I'm closing this issue because I'm no longer pursuing this technique. Instead I now use an ip address for the cluster, and use argocd application deployments which target based on an annotation containing the cluster name.