mirror of
https://github.com/edgelesssys/constellation.git
synced 2024-12-24 06:59:40 -05:00
fix qemu initialization
This commit is contained in:
parent
a09c53a700
commit
7b00005ed6
@ -239,7 +239,7 @@ func (k *KubernetesUtil) deployCilium(ctx context.Context, in SetupPodNetworkInp
|
||||
case "azure":
|
||||
return k.deployCiliumAzure(ctx, helmClient, ciliumDeployment, in.LoadBalancerEndpoint)
|
||||
case "qemu":
|
||||
return k.deployCiliumQEMU(ctx, helmClient, ciliumDeployment, in.SubnetworkPodCIDR)
|
||||
return k.deployCiliumQEMU(ctx, helmClient, ciliumDeployment, in.SubnetworkPodCIDR, in.LoadBalancerEndpoint)
|
||||
default:
|
||||
return fmt.Errorf("unsupported cloud provider %q", in.CloudProvider)
|
||||
}
|
||||
@ -347,7 +347,7 @@ func (k *KubernetesUtil) FixCilium(nodeNameK8s string, log *logger.Logger) {
|
||||
}
|
||||
}
|
||||
|
||||
func (k *KubernetesUtil) deployCiliumQEMU(ctx context.Context, helmClient *action.Install, ciliumDeployment helm.Deployment, subnetworkPodCIDR string) error {
|
||||
func (k *KubernetesUtil) deployCiliumQEMU(ctx context.Context, helmClient *action.Install, ciliumDeployment helm.Deployment, subnetworkPodCIDR, kubeAPIEndpoint string) error {
|
||||
// configure pod network CIDR
|
||||
ciliumDeployment.Values["ipam"] = map[string]interface{}{
|
||||
"operator": map[string]interface{}{
|
||||
@ -357,6 +357,9 @@ func (k *KubernetesUtil) deployCiliumQEMU(ctx context.Context, helmClient *actio
|
||||
},
|
||||
}
|
||||
|
||||
ciliumDeployment.Values["k8sServiceHost"] = kubeAPIEndpoint
|
||||
ciliumDeployment.Values["k8sServicePort"] = strconv.Itoa(constants.KubernetesPort)
|
||||
|
||||
_, err := helmClient.RunWithContext(ctx, ciliumDeployment.Chart, ciliumDeployment.Values)
|
||||
if err != nil {
|
||||
return fmt.Errorf("installing cilium: %w", err)
|
||||
|
@ -262,9 +262,11 @@ func (k *KubeWrapper) JoinCluster(ctx context.Context, args *kubeadm.BootstrapTo
|
||||
providerID = instance.ProviderID
|
||||
nodeName = instance.Name
|
||||
nodeInternalIP = instance.VPCIP
|
||||
loadbalancerEndpoint, err = k.providerMetadata.GetLoadBalancerEndpoint(ctx)
|
||||
if err != nil {
|
||||
return fmt.Errorf("retrieving loadbalancer endpoint: %w", err)
|
||||
if k.providerMetadata.SupportsLoadBalancer() {
|
||||
loadbalancerEndpoint, err = k.providerMetadata.GetLoadBalancerEndpoint(ctx)
|
||||
if err != nil {
|
||||
return fmt.Errorf("retrieving loadbalancer endpoint: %w", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
nodeName = k8sCompliantHostname(nodeName)
|
||||
|
@ -88,5 +88,24 @@ var qemuVals = map[string]interface{}{
|
||||
"enabled": true,
|
||||
"type": "wireguard",
|
||||
},
|
||||
"l7Proxy": false,
|
||||
"image": map[string]interface{}{
|
||||
"repository": "ghcr.io/3u13r/cilium",
|
||||
"suffix": "",
|
||||
"tag": "v1.12.1-edg",
|
||||
"digest": "sha256:fdac430143fe719331698b76fbe66410631a21afd3405407d56db260d2d6999b",
|
||||
"useDigest": true,
|
||||
},
|
||||
"operator": map[string]interface{}{
|
||||
"image": map[string]interface{}{
|
||||
"repository": "ghcr.io/3u13r/operator",
|
||||
"suffix": "",
|
||||
"tag": "v1.12.1-edg",
|
||||
"genericDigest": "sha256:a225d8d3976fd2a05cfa0c929cd32e60283abedf6bae51db4709df19b2fb70cb",
|
||||
"useDigest": true,
|
||||
},
|
||||
},
|
||||
"kubeProxyReplacement": "strict",
|
||||
"enableCiliumEndpointSlice": true,
|
||||
"kubeProxyReplacementHealthzBindAddr": "0.0.0.0:10256",
|
||||
"l7Proxy": false,
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user