// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.

// Code generated by hack/docgen tool. DO NOT EDIT.

package v1alpha1

import (
	"github.com/siderolabs/talos/pkg/machinery/config/encoder"
)

func (Config) Doc() *encoder.Doc {
	doc := &encoder.Doc{
		Type:        "Config",
		Comments:    [3]string{"" /* encoder.HeadComment */, "Config defines the v1alpha1.Config Talos machine configuration document." /* encoder.LineComment */, "" /* encoder.FootComment */},
		Description: "Config defines the v1alpha1.Config Talos machine configuration document.",
		Fields: []encoder.Doc{
			{
				Name:        "version",
				Type:        "string",
				Note:        "",
				Description: "Indicates the schema used to decode the contents.",
				Comments:    [3]string{"" /* encoder.HeadComment */, "Indicates the schema used to decode the contents." /* encoder.LineComment */, "" /* encoder.FootComment */},
				Values: []string{
					"v1alpha1",
				},
			},
			{
				Name:        "debug",
				Type:        "bool",
				Note:        "",
				Description: "Enable verbose logging to the console.\nAll system containers logs will flow into serial console.\n\n**Note:** To avoid breaking Talos bootstrap flow enable this option only if serial console can handle high message throughput.",
				Comments:    [3]string{"" /* encoder.HeadComment */, "Enable verbose logging to the console." /* encoder.LineComment */, "" /* encoder.FootComment */},
				Values: []string{
					"true",
					"yes",
					"false",
					"no",
				},
			},
			{},
			{
				Name:        "machine",
				Type:        "MachineConfig",
				Note:        "",
				Description: "Provides machine specific configuration options.",
				Comments:    [3]string{"" /* encoder.HeadComment */, "Provides machine specific configuration options." /* encoder.LineComment */, "" /* encoder.FootComment */},
			},
			{
				Name:        "cluster",
				Type:        "ClusterConfig",
				Note:        "",
				Description: "Provides cluster specific configuration options.",
				Comments:    [3]string{"" /* encoder.HeadComment */, "Provides cluster specific configuration options." /* encoder.LineComment */, "" /* encoder.FootComment */},
			},
		},
	}

	doc.AddExample("", configExample())

	return doc
}

func (MachineConfig) Doc() *encoder.Doc {
	doc := &encoder.Doc{
		Type:        "MachineConfig",
		Comments:    [3]string{"" /* encoder.HeadComment */, "MachineConfig represents the machine-specific config values." /* encoder.LineComment */, "" /* encoder.FootComment */},
		Description: "MachineConfig represents the machine-specific config values.",
		AppearsIn: []encoder.Appearance{
			{
				TypeName:  "Config",
				FieldName: "machine",
			},
		},
		Fields: []encoder.Doc{
			{
				Name:        "type",
				Type:        "string",
				Note:        "",
				Description: "Defines the role of the machine within the cluster.\n\n**Control Plane**\n\nControl Plane node type designates the node as a control plane member.\nThis means it will host etcd along with the Kubernetes controlplane components such as API Server, Controller Manager, Scheduler.\n\n**Worker**\n\nWorker node type designates the node as a worker node.\nThis means it will be an available compute node for scheduling workloads.\n\nThis node type was previously known as \"join\"; that value is still supported but deprecated.",
				Comments:    [3]string{"" /* encoder.HeadComment */, "Defines the role of the machine within the cluster." /* encoder.LineComment */, "" /* encoder.FootComment */},
				Values: []string{
					"controlplane",
					"worker",
				},
			},
			{
				Name:        "token",
				Type:        "string",
				Note:        "Warning: It is important to ensure that this token is correct since a machine's certificate has a short TTL by default.\n",
				Description: "The `token` is used by a machine to join the PKI of the cluster.\nUsing this token, a machine will create a certificate signing request (CSR), and request a certificate that will be used as its' identity.",
				Comments:    [3]string{"" /* encoder.HeadComment */, "The `token` is used by a machine to join the PKI of the cluster." /* encoder.LineComment */, "" /* encoder.FootComment */},
			},
			{
				Name:        "ca",
				Type:        "PEMEncodedCertificateAndKey",
				Note:        "",
				Description: "The root certificate authority of the PKI.\nIt is composed of a base64 encoded `crt` and `key`.",
				Comments:    [3]string{"" /* encoder.HeadComment */, "The root certificate authority of the PKI." /* encoder.LineComment */, "" /* encoder.FootComment */},
			},
			{
				Name:        "acceptedCAs",
				Type:        "[]PEMEncodedCertificate",
				Note:        "",
				Description: "The certificates issued by certificate authorities are accepted in addition to issuing 'ca'.\nIt is composed of a base64 encoded `crt``.",
				Comments:    [3]string{"" /* encoder.HeadComment */, "The certificates issued by certificate authorities are accepted in addition to issuing 'ca'." /* encoder.LineComment */, "" /* encoder.FootComment */},
			},
			{
				Name:        "certSANs",
				Type:        "[]string",
				Note:        "",
				Description: "Extra certificate subject alternative names for the machine's certificate.\nBy default, all non-loopback interface IPs are automatically added to the certificate's SANs.",
				Comments:    [3]string{"" /* encoder.HeadComment */, "Extra certificate subject alternative names for the machine's certificate." /* encoder.LineComment */, "" /* encoder.FootComment */},
			},
			{},
			{},
			{},
			{},
			{},
			{},
			{},
			{},
			{},
			{},
			{},
			{},
			{},
			{
				Name:        "features",
				Type:        "FeaturesConfig",
				Note:        "",
				Description: "Features describe individual Talos features that can be switched on or off.",
				Comments:    [3]string{"" /* encoder.HeadComment */, "Features describe individual Talos features that can be switched on or off." /* encoder.LineComment */, "" /* encoder.FootComment */},
			},
			{},
			{
				Name:        "logging",
				Type:        "LoggingConfig",
				Note:        "",
				Description: "Configures the logging system.",
				Comments:    [3]string{"" /* encoder.HeadComment */, "Configures the logging system." /* encoder.LineComment */, "" /* encoder.FootComment */},
			},
			{},
			{
				Name:        "seccompProfiles",
				Type:        "[]MachineSeccompProfile",
				Note:        "",
				Description: "Configures the seccomp profiles for the machine.",
				Comments:    [3]string{"" /* encoder.HeadComment */, "Configures the seccomp profiles for the machine." /* encoder.LineComment */, "" /* encoder.FootComment */},
			},
			{},
			{},
			{},
			{},
		},
	}

	doc.AddExample("", machineConfigExample())

	doc.Fields[1].AddExample("example token", "328hom.uqjzh6jnn2eie9oi")
	doc.Fields[2].AddExample("machine CA example", pemEncodedCertificateExample())
	doc.Fields[4].AddExample("Uncomment this to enable SANs.", []string{"10.0.0.10", "172.16.0.10", "192.168.0.10"})
	doc.Fields[18].AddExample("", machineFeaturesExample())
	doc.Fields[20].AddExample("", machineLoggingExample1())
	doc.Fields[20].AddExample("", machineLoggingExample2())
	doc.Fields[22].AddExample("", machineSeccompExample())

	return doc
}

func (MachineSeccompProfile) Doc() *encoder.Doc {
	doc := &encoder.Doc{
		Type:        "MachineSeccompProfile",
		Comments:    [3]string{"" /* encoder.HeadComment */, "MachineSeccompProfile defines seccomp profiles for the machine." /* encoder.LineComment */, "" /* encoder.FootComment */},
		Description: "MachineSeccompProfile defines seccomp profiles for the machine.",
		AppearsIn: []encoder.Appearance{
			{
				TypeName:  "MachineConfig",
				FieldName: "seccompProfiles",
			},
		},
		Fields: []encoder.Doc{
			{
				Name:        "name",
				Type:        "string",
				Note:        "",
				Description: "The `name` field is used to provide the file name of the seccomp profile.",
				Comments:    [3]string{"" /* encoder.HeadComment */, "The `name` field is used to provide the file name of the seccomp profile." /* encoder.LineComment */, "" /* encoder.FootComment */},
			},
			{
				Name:        "value",
				Type:        "Unstructured",
				Note:        "",
				Description: "The `value` field is used to provide the seccomp profile.",
				Comments:    [3]string{"" /* encoder.HeadComment */, "The `value` field is used to provide the seccomp profile." /* encoder.LineComment */, "" /* encoder.FootComment */},
			},
		},
	}

	doc.AddExample("", machineSeccompExample())

	return doc
}

func (ClusterConfig) Doc() *encoder.Doc {
	doc := &encoder.Doc{
		Type:        "ClusterConfig",
		Comments:    [3]string{"" /* encoder.HeadComment */, "ClusterConfig represents the cluster-wide config values." /* encoder.LineComment */, "" /* encoder.FootComment */},
		Description: "ClusterConfig represents the cluster-wide config values.",
		AppearsIn: []encoder.Appearance{
			{
				TypeName:  "Config",
				FieldName: "cluster",
			},
		},
		Fields: []encoder.Doc{
			{},
			{},
			{},
			{},
			{},
			{
				Name:        "token",
				Type:        "string",
				Note:        "",
				Description: "The [bootstrap token](https://kubernetes.io/docs/reference/access-authn-authz/bootstrap-tokens/) used to join the cluster.",
				Comments:    [3]string{"" /* encoder.HeadComment */, "The [bootstrap token](https://kubernetes.io/docs/reference/access-authn-authz/bootstrap-tokens/) used to join the cluster." /* encoder.LineComment */, "" /* encoder.FootComment */},
			},
			{},
			{},
			{},
			{},
			{},
			{},
			{},
			{},
			{},
			{},
			{},
			{
				Name:        "etcd",
				Type:        "EtcdConfig",
				Note:        "",
				Description: "Etcd specific configuration options.",
				Comments:    [3]string{"" /* encoder.HeadComment */, "Etcd specific configuration options." /* encoder.LineComment */, "" /* encoder.FootComment */},
			},
			{},
			{
				Name:        "externalCloudProvider",
				Type:        "ExternalCloudProviderConfig",
				Note:        "",
				Description: "External cloud provider configuration.",
				Comments:    [3]string{"" /* encoder.HeadComment */, "External cloud provider configuration." /* encoder.LineComment */, "" /* encoder.FootComment */},
			},
			{},
			{},
			{},
			{
				Name:        "adminKubeconfig",
				Type:        "AdminKubeconfigConfig",
				Note:        "",
				Description: "Settings for admin kubeconfig generation.\nCertificate lifetime can be configured.",
				Comments:    [3]string{"" /* encoder.HeadComment */, "Settings for admin kubeconfig generation." /* encoder.LineComment */, "" /* encoder.FootComment */},
			},
			{},
			{},
		},
	}

	doc.Fields[5].AddExample("Bootstrap token example (do not use in production!).", "wlzjyw.bei2zfylhs2by0wd")
	doc.Fields[17].AddExample("", clusterEtcdExample())
	doc.Fields[19].AddExample("", clusterExternalCloudProviderConfigExample())
	doc.Fields[23].AddExample("", clusterAdminKubeconfigExample())

	return doc
}

func (Endpoint) Doc() *encoder.Doc {
	doc := &encoder.Doc{
		Type:        "Endpoint",
		Comments:    [3]string{"" /* encoder.HeadComment */, "Endpoint represents the endpoint URL parsed out of the machine config." /* encoder.LineComment */, "" /* encoder.FootComment */},
		Description: "Endpoint represents the endpoint URL parsed out of the machine config.",
		AppearsIn: []encoder.Appearance{
			{
				TypeName:  "LoggingDestination",
				FieldName: "endpoint",
			},
		},
		Fields: []encoder.Doc{
			{},
		},
	}

	return doc
}

func (EtcdConfig) Doc() *encoder.Doc {
	doc := &encoder.Doc{
		Type:        "EtcdConfig",
		Comments:    [3]string{"" /* encoder.HeadComment */, "EtcdConfig represents the etcd configuration options." /* encoder.LineComment */, "" /* encoder.FootComment */},
		Description: "EtcdConfig represents the etcd configuration options.",
		AppearsIn: []encoder.Appearance{
			{
				TypeName:  "ClusterConfig",
				FieldName: "etcd",
			},
		},
		Fields: []encoder.Doc{
			{
				Name:        "image",
				Type:        "string",
				Note:        "",
				Description: "The container image used to create the etcd service.",
				Comments:    [3]string{"" /* encoder.HeadComment */, "The container image used to create the etcd service." /* encoder.LineComment */, "" /* encoder.FootComment */},
			},
			{
				Name:        "ca",
				Type:        "PEMEncodedCertificateAndKey",
				Note:        "",
				Description: "The `ca` is the root certificate authority of the PKI.\nIt is composed of a base64 encoded `crt` and `key`.",
				Comments:    [3]string{"" /* encoder.HeadComment */, "The `ca` is the root certificate authority of the PKI." /* encoder.LineComment */, "" /* encoder.FootComment */},
			},
			{
				Name:        "extraArgs",
				Type:        "Args",
				Note:        "",
				Description: "Extra arguments to supply to etcd.\nNote that the following args are not allowed:\n\n- `name`\n- `data-dir`\n- `initial-cluster-state`\n- `listen-peer-urls`\n- `listen-client-urls`\n- `cert-file`\n- `key-file`\n- `trusted-ca-file`\n- `peer-client-cert-auth`\n- `peer-cert-file`\n- `peer-trusted-ca-file`\n- `peer-key-file`",
				Comments:    [3]string{"" /* encoder.HeadComment */, "Extra arguments to supply to etcd." /* encoder.LineComment */, "" /* encoder.FootComment */},
			},
			{},
			{
				Name:        "advertisedSubnets",
				Type:        "[]string",
				Note:        "",
				Description: "The `advertisedSubnets` field configures the networks to pick etcd advertised IP from.\n\nIPs can be excluded from the list by using negative match with `!`, e.g `!10.0.0.0/8`.\nNegative subnet matches should be specified last to filter out IPs picked by positive matches.\nIf not specified, advertised IP is selected as the first routable address of the node.",
				Comments:    [3]string{"" /* encoder.HeadComment */, "The `advertisedSubnets` field configures the networks to pick etcd advertised IP from." /* encoder.LineComment */, "" /* encoder.FootComment */},
			},
			{
				Name:        "listenSubnets",
				Type:        "[]string",
				Note:        "",
				Description: "The `listenSubnets` field configures the networks for the etcd to listen for peer and client connections.\n\nIf `listenSubnets` is not set, but `advertisedSubnets` is set, `listenSubnets` defaults to\n`advertisedSubnets`.\n\nIf neither `advertisedSubnets` nor `listenSubnets` is set, `listenSubnets` defaults to listen on all addresses.\n\nIPs can be excluded from the list by using negative match with `!`, e.g `!10.0.0.0/8`.\nNegative subnet matches should be specified last to filter out IPs picked by positive matches.\nIf not specified, advertised IP is selected as the first routable address of the node.",
				Comments:    [3]string{"" /* encoder.HeadComment */, "The `listenSubnets` field configures the networks for the etcd to listen for peer and client connections." /* encoder.LineComment */, "" /* encoder.FootComment */},
			},
		},
	}

	doc.AddExample("", clusterEtcdExample())

	doc.Fields[0].AddExample("", clusterEtcdImageExample())
	doc.Fields[1].AddExample("", pemEncodedCertificateExample())
	doc.Fields[4].AddExample("", clusterEtcdAdvertisedSubnetsExample())

	return doc
}

func (ExternalCloudProviderConfig) Doc() *encoder.Doc {
	doc := &encoder.Doc{
		Type:        "ExternalCloudProviderConfig",
		Comments:    [3]string{"" /* encoder.HeadComment */, "ExternalCloudProviderConfig contains external cloud provider configuration." /* encoder.LineComment */, "" /* encoder.FootComment */},
		Description: "ExternalCloudProviderConfig contains external cloud provider configuration.",
		AppearsIn: []encoder.Appearance{
			{
				TypeName:  "ClusterConfig",
				FieldName: "externalCloudProvider",
			},
		},
		Fields: []encoder.Doc{
			{
				Name:        "enabled",
				Type:        "bool",
				Note:        "",
				Description: "Enable external cloud provider.",
				Comments:    [3]string{"" /* encoder.HeadComment */, "Enable external cloud provider." /* encoder.LineComment */, "" /* encoder.FootComment */},
				Values: []string{
					"true",
					"yes",
					"false",
					"no",
				},
			},
			{
				Name:        "manifests",
				Type:        "[]string",
				Note:        "",
				Description: "A list of urls that point to additional manifests for an external cloud provider.\nThese will get automatically deployed as part of the bootstrap.",
				Comments:    [3]string{"" /* encoder.HeadComment */, "A list of urls that point to additional manifests for an external cloud provider." /* encoder.LineComment */, "" /* encoder.FootComment */},
			},
		},
	}

	doc.AddExample("", clusterExternalCloudProviderConfigExample())

	doc.Fields[1].AddExample("", []string{
		"https://raw.githubusercontent.com/kubernetes/cloud-provider-aws/v1.20.0-alpha.0/manifests/rbac.yaml",
		"https://raw.githubusercontent.com/kubernetes/cloud-provider-aws/v1.20.0-alpha.0/manifests/aws-cloud-controller-manager-daemonset.yaml",
	})

	return doc
}

func (AdminKubeconfigConfig) Doc() *encoder.Doc {
	doc := &encoder.Doc{
		Type:        "AdminKubeconfigConfig",
		Comments:    [3]string{"" /* encoder.HeadComment */, "AdminKubeconfigConfig contains admin kubeconfig settings." /* encoder.LineComment */, "" /* encoder.FootComment */},
		Description: "AdminKubeconfigConfig contains admin kubeconfig settings.",
		AppearsIn: []encoder.Appearance{
			{
				TypeName:  "ClusterConfig",
				FieldName: "adminKubeconfig",
			},
		},
		Fields: []encoder.Doc{
			{
				Name:        "certLifetime",
				Type:        "Duration",
				Note:        "",
				Description: "Admin kubeconfig certificate lifetime (default is 1 year).\nField format accepts any Go time.Duration format ('1h' for one hour, '10m' for ten minutes).",
				Comments:    [3]string{"" /* encoder.HeadComment */, "Admin kubeconfig certificate lifetime (default is 1 year)." /* encoder.LineComment */, "" /* encoder.FootComment */},
			},
		},
	}

	doc.AddExample("", clusterAdminKubeconfigExample())

	return doc
}

func (FeaturesConfig) Doc() *encoder.Doc {
	doc := &encoder.Doc{
		Type:        "FeaturesConfig",
		Comments:    [3]string{"" /* encoder.HeadComment */, "FeaturesConfig describes individual Talos features that can be switched on or off." /* encoder.LineComment */, "" /* encoder.FootComment */},
		Description: "FeaturesConfig describes individual Talos features that can be switched on or off.",
		AppearsIn: []encoder.Appearance{
			{
				TypeName:  "MachineConfig",
				FieldName: "features",
			},
		},
		Fields: []encoder.Doc{
			{},
			{},
			{},
			{},
			{
				Name:        "diskQuotaSupport",
				Type:        "bool",
				Note:        "",
				Description: "Enable XFS project quota support for EPHEMERAL partition and user disks.\nAlso enables kubelet tracking of ephemeral disk usage in the kubelet via quota.",
				Comments:    [3]string{"" /* encoder.HeadComment */, "Enable XFS project quota support for EPHEMERAL partition and user disks." /* encoder.LineComment */, "" /* encoder.FootComment */},
			},
			{},
			{},
			{},
			{
				Name:        "nodeAddressSortAlgorithm",
				Type:        "string",
				Note:        "",
				Description: "Select the node address sort algorithm.\nThe 'v1' algorithm sorts addresses by the address itself.\nThe 'v2' algorithm prefers more specific prefixes.\nIf unset, defaults to 'v1'.",
				Comments:    [3]string{"" /* encoder.HeadComment */, "Select the node address sort algorithm." /* encoder.LineComment */, "" /* encoder.FootComment */},
			},
		},
	}

	doc.AddExample("", machineFeaturesExample())

	return doc
}

func (LoggingConfig) Doc() *encoder.Doc {
	doc := &encoder.Doc{
		Type:        "LoggingConfig",
		Comments:    [3]string{"" /* encoder.HeadComment */, "LoggingConfig struct configures Talos logging." /* encoder.LineComment */, "" /* encoder.FootComment */},
		Description: "LoggingConfig struct configures Talos logging.",
		AppearsIn: []encoder.Appearance{
			{
				TypeName:  "MachineConfig",
				FieldName: "logging",
			},
		},
		Fields: []encoder.Doc{
			{
				Name:        "destinations",
				Type:        "[]LoggingDestination",
				Note:        "",
				Description: "Logging destination.",
				Comments:    [3]string{"" /* encoder.HeadComment */, "Logging destination." /* encoder.LineComment */, "" /* encoder.FootComment */},
			},
		},
	}

	doc.AddExample("", machineLoggingExample1())

	doc.AddExample("", machineLoggingExample2())

	return doc
}

func (LoggingDestination) Doc() *encoder.Doc {
	doc := &encoder.Doc{
		Type:        "LoggingDestination",
		Comments:    [3]string{"" /* encoder.HeadComment */, "LoggingDestination struct configures Talos logging destination." /* encoder.LineComment */, "" /* encoder.FootComment */},
		Description: "LoggingDestination struct configures Talos logging destination.",
		AppearsIn: []encoder.Appearance{
			{
				TypeName:  "LoggingConfig",
				FieldName: "destinations",
			},
		},
		Fields: []encoder.Doc{
			{
				Name:        "endpoint",
				Type:        "Endpoint",
				Note:        "",
				Description: "Where to send logs. Supported protocols are \"tcp\" and \"udp\".",
				Comments:    [3]string{"" /* encoder.HeadComment */, "Where to send logs. Supported protocols are \"tcp\" and \"udp\"." /* encoder.LineComment */, "" /* encoder.FootComment */},
			},
			{
				Name:        "format",
				Type:        "string",
				Note:        "",
				Description: "Logs format.",
				Comments:    [3]string{"" /* encoder.HeadComment */, "Logs format." /* encoder.LineComment */, "" /* encoder.FootComment */},
				Values: []string{
					"json_lines",
				},
			},
			{
				Name:        "extraTags",
				Type:        "map[string]string",
				Note:        "",
				Description: "Extra tags (key-value) pairs to attach to every log message sent.",
				Comments:    [3]string{"" /* encoder.HeadComment */, "Extra tags (key-value) pairs to attach to every log message sent." /* encoder.LineComment */, "" /* encoder.FootComment */},
			},
		},
	}

	return doc
}

// GetFileDoc returns documentation for the file ./v1alpha1_types_doc.go.
func GetFileDoc() *encoder.FileDoc {
	return &encoder.FileDoc{
		Name:        "v1alpha1",
		Description: "Package v1alpha1 contains definition of the `v1alpha1` configuration document.\n\nEven though the machine configuration in Talos Linux is multi-document, at the moment\nthis configuration document contains most of the configuration options.\n\nIt is expected that new configuration options will be added as new documents, and existing ones\nmigrated to their own documents.\n",
		Structs: []*encoder.Doc{
			Config{}.Doc(),
			MachineConfig{}.Doc(),
			MachineSeccompProfile{}.Doc(),
			ClusterConfig{}.Doc(),
			Endpoint{}.Doc(),
			EtcdConfig{}.Doc(),
			ExternalCloudProviderConfig{}.Doc(),
			AdminKubeconfigConfig{}.Doc(),
			FeaturesConfig{}.Doc(),
			LoggingConfig{}.Doc(),
			LoggingDestination{}.Doc(),
		},
	}
}
