@@ -42,11 +42,14 @@ func generateKubeadmConfig(isControlPlane bool, bootstrapToken string, cluster *
4242 // Set default values. If they are not set, these two properties are added with an
4343 // empty string and the CoreOS ignition postprocesser fails with "could not find expected key"
4444 if clusterConfigurationCopy .CertificatesDir == "" {
45- clusterConfigurationCopy .CertificatesDir = "/etc/kubernetes/pki"
45+ clusterConfigurationCopy .CertificatesDir = kubeadmv1beta1 . DefaultCertificatesDir
4646 }
4747 if string (clusterConfigurationCopy .DNS .Type ) == "" {
4848 clusterConfigurationCopy .DNS .Type = kubeadmv1beta1 .CoreDNS
4949 }
50+ if clusterConfigurationCopy .ImageRepository == "" {
51+ clusterConfigurationCopy .ImageRepository = kubeadmv1beta1 .DefaultImageRepository
52+ }
5053 kubeadm .SetClusterConfigurationOptions (
5154 clusterConfigurationCopy ,
5255 kubeadm .WithKubernetesVersion (machine .Spec .Versions .ControlPlane ),
@@ -104,7 +107,7 @@ func generateKubeadmConfig(isControlPlane bool, bootstrapToken string, cluster *
104107 joinConfigurationCopy := machineProviderSpec .KubeadmConfiguration .Join
105108 // Set default values. If they are not set, these two properties are added with an
106109 // empty string and the CoreOS ignition postprocesser fails with "could not find expected key"
107- joinConfigurationCopy .CACertPath = "/etc/kubernetes/pki/ca.crt"
110+ joinConfigurationCopy .CACertPath = kubeadmv1beta1 . DefaultCACertPath
108111 kubeadm .SetJoinConfigurationOptions (
109112 & joinConfigurationCopy ,
110113 kubeadm .WithBootstrapTokenDiscovery (
@@ -138,7 +141,7 @@ func generateKubeadmConfig(isControlPlane bool, bootstrapToken string, cluster *
138141 joinConfigurationCopy := machineProviderSpec .KubeadmConfiguration .Join
139142 // Set default values. If they are not set, these two properties are added with an
140143 // empty string and the CoreOS ignition postprocesser fails with "could not find expected key"
141- joinConfigurationCopy .CACertPath = "/etc/kubernetes/pki/ca.crt"
144+ joinConfigurationCopy .CACertPath = kubeadmv1beta1 . DefaultCACertPath
142145 kubeadm .SetJoinConfigurationOptions (
143146 & joinConfigurationCopy ,
144147 kubeadm .WithBootstrapTokenDiscovery (
0 commit comments