use super::*;
pub use kubeadmconfig::KubeadmConfigSpec;
pub use kubeadmconfig::KubeadmConfigTemplate;
pub use kubeadmconfig::KubeadmConfigTemplateSpec;
mod kubeadmconfig;
#[skip_serializing_none]
#[derive(Clone, Debug, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct InitConfiguration {
#[serde(flatten)]
pub meta: TypeMeta,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub bootstrap_tokens: Vec<BootstrapToken>,
pub node_registration: Option<NodeRegistrationOptions>,
#[serde(rename = "localAPIEndpoint")]
pub local_api_endpoint: Option<APIEndpoint>, }
#[skip_serializing_none]
#[derive(Clone, Debug, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ClusterConfiguration {
#[serde(flatten)]
pub meta: TypeMeta,
pub etcd: Option<Etcd>,
pub networking: Option<Networking>,
pub kubernetes_version: Option<String>,
pub control_plane_endpoint: Option<String>,
pub api_server: Option<APIServer>,
pub controller_manager: Option<ControlPlaneComponent>,
pub scheduler: Option<ControlPlaneComponent>,
pub dns: Option<DNS>,
pub certificates_dir: Option<String>,
pub image_repository: Option<String>,
#[serde(default, skip_serializing_if = "BTreeMap::is_empty")]
pub feature_gates: BTreeMap<String, bool>,
pub cluster_name: Option<String>, }
#[skip_serializing_none]
#[derive(Clone, Debug, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct JoinConfiguration {
#[serde(flatten)]
pub meta: TypeMeta,
pub node_registration: Option<NodeRegistrationOptions>,
pub ca_cert_path: Option<String>,
pub discovery: Option<Discovery>,
pub control_plane: Option<JoinControlPlane>, }
#[skip_serializing_none]
#[derive(Clone, Debug, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct BootstrapToken {
pub token: String, pub description: Option<String>, pub ttl: Option<i64>, pub expires: Option<metav1::Time>, #[serde(default, skip_serializing_if = "Vec::is_empty")]
pub usages: Vec<String>, #[serde(default, skip_serializing_if = "Vec::is_empty")]
pub groups: Vec<String>, }
#[skip_serializing_none]
#[derive(Clone, Debug, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct NodeRegistrationOptions {
pub name: Option<String>,
pub cri_socket: Option<String>,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub taints: Vec<corev1::Taint>,
#[serde(default, skip_serializing_if = "BTreeMap::is_empty")]
pub kubelet_extra_args: BTreeMap<String, String>,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub ignore_preflight_errors: Vec<String>, }
#[skip_serializing_none]
#[derive(Clone, Debug, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct APIEndpoint {
pub advertise_address: Option<String>,
pub bind_port: Option<i32>, }
#[skip_serializing_none]
#[derive(Clone, Debug, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct Etcd {
pub local: Option<LocalEtcd>,
pub external: Option<ExternalEtcd>, }
#[skip_serializing_none]
#[derive(Clone, Debug, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct LocalEtcd {
#[serde(flatten)]
pub image_meta: ImageMeta,
pub data_dir: Option<String>,
#[serde(default, skip_serializing_if = "BTreeMap::is_empty")]
pub extra_args: BTreeMap<String, String>,
#[serde(
rename = "serverCertSANs",
default,
skip_serializing_if = "Vec::is_empty"
)]
pub server_cert_sans: Vec<String>, #[serde(
rename = "peerCertSANs",
default,
skip_serializing_if = "Vec::is_empty"
)]
pub peer_cert_sans: Vec<String>, }
#[skip_serializing_none]
#[derive(Clone, Debug, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ExternalEtcd {
pub endpoints: Vec<String>,
pub ca_file: String,
pub cert_file: String,
pub key_file: String, }
#[skip_serializing_none]
#[derive(Clone, Debug, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ImageMeta {
pub image_repository: Option<String>,
pub image_tag: Option<String>,
}
#[skip_serializing_none]
#[derive(Clone, Debug, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct Networking {
pub service_subnet: Option<String>, pub pod_subnet: Option<String>, pub dns_domain: Option<String>, }
#[skip_serializing_none]
#[derive(Clone, Debug, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ControlPlaneComponent {
#[serde(default, skip_serializing_if = "BTreeMap::is_empty")]
pub extra_args: BTreeMap<String, String>,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub extra_volumes: Vec<HostPathMount>, }
#[skip_serializing_none]
#[derive(Clone, Debug, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct APIServer {
#[serde(flatten)]
pub control_plane: ControlPlaneComponent,
#[serde(rename = "certSANs", default, skip_serializing_if = "Vec::is_empty")]
pub cert_sans: Vec<String>,
pub timeout_for_control_plane: Option<i64>, }
#[skip_serializing_none]
#[derive(Clone, Debug, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct DNS {
#[serde(flatten)]
pub image_meta: ImageMeta, }
#[skip_serializing_none]
#[derive(Clone, Debug, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct Discovery {
pub bootstrap_token: Option<BootstrapTokenDiscovery>,
pub file: Option<FileDiscovery>,
pub tls_bootstrap_token: Option<String>,
pub timeout: Option<i64>, }
#[skip_serializing_none]
#[derive(Clone, Debug, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct JoinControlPlane {
#[serde(rename = "localAPIEndpoint")]
pub local_api_endpoint: Option<APIEndpoint>, }
#[skip_serializing_none]
#[derive(Clone, Debug, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct HostPathMount {
pub name: String, pub host_path: String, pub mount_path: String, pub read_only: Option<bool>, pub path_type: Option<String>, }
#[skip_serializing_none]
#[derive(Clone, Debug, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct FileDiscovery {
pub kube_config_path: String, }
#[skip_serializing_none]
#[derive(Clone, Debug, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct BootstrapTokenDiscovery {
pub token: String,
pub api_server_endpoint: Option<String>,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub ca_cert_hashes: Vec<String>,
#[serde(rename = "unsafeSkipCAVerification")]
pub unsafe_skip_ca_verification: Option<bool>, }