@@ -42,11 +42,14 @@ func generateKubeadmConfig(isControlPlane bool, bootstrapToken string, cluster *
42
42
// Set default values. If they are not set, these two properties are added with an
43
43
// empty string and the CoreOS ignition postprocesser fails with "could not find expected key"
44
44
if clusterConfigurationCopy .CertificatesDir == "" {
45
- clusterConfigurationCopy .CertificatesDir = "/etc/kubernetes/pki"
45
+ clusterConfigurationCopy .CertificatesDir = kubeadmv1beta1 . DefaultCertificatesDir
46
46
}
47
47
if string (clusterConfigurationCopy .DNS .Type ) == "" {
48
48
clusterConfigurationCopy .DNS .Type = kubeadmv1beta1 .CoreDNS
49
49
}
50
+ if clusterConfigurationCopy .ImageRepository == "" {
51
+ clusterConfigurationCopy .ImageRepository = kubeadmv1beta1 .DefaultImageRepository
52
+ }
50
53
kubeadm .SetClusterConfigurationOptions (
51
54
clusterConfigurationCopy ,
52
55
kubeadm .WithKubernetesVersion (machine .Spec .Versions .ControlPlane ),
@@ -104,7 +107,7 @@ func generateKubeadmConfig(isControlPlane bool, bootstrapToken string, cluster *
104
107
joinConfigurationCopy := machineProviderSpec .KubeadmConfiguration .Join
105
108
// Set default values. If they are not set, these two properties are added with an
106
109
// 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
108
111
kubeadm .SetJoinConfigurationOptions (
109
112
& joinConfigurationCopy ,
110
113
kubeadm .WithBootstrapTokenDiscovery (
@@ -138,7 +141,7 @@ func generateKubeadmConfig(isControlPlane bool, bootstrapToken string, cluster *
138
141
joinConfigurationCopy := machineProviderSpec .KubeadmConfiguration .Join
139
142
// Set default values. If they are not set, these two properties are added with an
140
143
// 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
142
145
kubeadm .SetJoinConfigurationOptions (
143
146
& joinConfigurationCopy ,
144
147
kubeadm .WithBootstrapTokenDiscovery (
0 commit comments