// 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 k8s

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

func (ResourcesConfig) Doc() *encoder.Doc {
	doc := &encoder.Doc{
		Type:        "ResourcesConfig",
		Comments:    [3]string{"" /* encoder.HeadComment */, "ResourcesConfig represents the pod resources." /* encoder.LineComment */, "" /* encoder.FootComment */},
		Description: "ResourcesConfig represents the pod resources.",
		AppearsIn: []encoder.Appearance{
			{
				TypeName:  "KubeControllerManagerConfigV1Alpha1",
				FieldName: "resources",
			},
			{
				TypeName:  "KubeSchedulerConfigV1Alpha1",
				FieldName: "resources",
			},
		},
		Fields: []encoder.Doc{
			{
				Name:        "requests",
				Type:        "Unstructured",
				Note:        "",
				Description: "Requests configures the reserved cpu/memory resources.",
				Comments:    [3]string{"" /* encoder.HeadComment */, "Requests configures the reserved cpu/memory resources." /* encoder.LineComment */, "" /* encoder.FootComment */},
			},
			{
				Name:        "limits",
				Type:        "Unstructured",
				Note:        "",
				Description: "Limits configures the maximum cpu/memory limits a pod can use.",
				Comments:    [3]string{"" /* encoder.HeadComment */, "Limits configures the maximum cpu/memory limits a pod can use." /* encoder.LineComment */, "" /* encoder.FootComment */},
			},
		},
	}

	doc.Fields[0].AddExample("resources requests.", resourcesConfigRequestsExample())
	doc.Fields[1].AddExample("resources limits.", resourcesConfigLimitsExample())

	return doc
}

func (KubeControllerManagerConfigV1Alpha1) Doc() *encoder.Doc {
	doc := &encoder.Doc{
		Type:        "KubeControllerManagerConfig",
		Comments:    [3]string{"" /* encoder.HeadComment */, "KubeControllerManagerConfig configures kube-controller-manager controlplane static pod." /* encoder.LineComment */, "" /* encoder.FootComment */},
		Description: "KubeControllerManagerConfig configures kube-controller-manager controlplane static pod.",
		Fields: []encoder.Doc{
			{
				Type:   "Meta",
				Inline: true,
			},
			{
				Name:        "enabled",
				Type:        "bool",
				Note:        "",
				Description: "By default, kube-controller-manager static pod is enabled.\nSet to false to disable the kube-controller-manager (assuming it runs on other controlplane node).",
				Comments:    [3]string{"" /* encoder.HeadComment */, "By default, kube-controller-manager static pod is enabled." /* encoder.LineComment */, "" /* encoder.FootComment */},
			},
			{
				Name:        "image",
				Type:        "string",
				Note:        "",
				Description: "The container image used to run the kube-controller-manager component.\n\nThe image reference should contain the tag, even if it is pinned by digest.",
				Comments:    [3]string{"" /* encoder.HeadComment */, "The container image used to run the kube-controller-manager component." /* encoder.LineComment */, "" /* encoder.FootComment */},
			},
			{
				Name:        "extraArgs",
				Type:        "Args",
				Note:        "",
				Description: "Extra command line arguments to supply to the kube-controller-manager.",
				Comments:    [3]string{"" /* encoder.HeadComment */, "Extra command line arguments to supply to the kube-controller-manager." /* encoder.LineComment */, "" /* encoder.FootComment */},
			},
			{
				Name:        "env",
				Type:        "map[string]string",
				Note:        "",
				Description: "The `env` field allows for the addition of environment variables for the kube-controller-manager.",
				Comments:    [3]string{"" /* encoder.HeadComment */, "The `env` field allows for the addition of environment variables for the kube-controller-manager." /* encoder.LineComment */, "" /* encoder.FootComment */},
			},
			{
				Name:        "resources",
				Type:        "ResourcesConfig",
				Note:        "",
				Description: "Configure the kube-controller-manager resources.",
				Comments:    [3]string{"" /* encoder.HeadComment */, "Configure the kube-controller-manager resources." /* encoder.LineComment */, "" /* encoder.FootComment */},
			},
		},
	}

	doc.AddExample("", exampleKubeControllerManagerConfigV1Alpha1())

	return doc
}

func (KubeEtcdEncryptionConfigV1Alpha1) Doc() *encoder.Doc {
	doc := &encoder.Doc{
		Type:        "KubeEtcdEncryptionConfig",
		Comments:    [3]string{"" /* encoder.HeadComment */, "KubeEtcdEncryptionConfig configures kube-apiserver etcd encryption rules." /* encoder.LineComment */, "" /* encoder.FootComment */},
		Description: "KubeEtcdEncryptionConfig configures kube-apiserver etcd encryption rules.",
		Fields: []encoder.Doc{
			{
				Type:   "Meta",
				Inline: true,
			},
			{
				Name:        "config",
				Type:        "Unstructured",
				Note:        "",
				Description: "Kubernetes API server [encryption of secret data at rest](https://kubernetes.io/docs/tasks/administer-cluster/encrypt-data/).\nKey value should be exact contents of the configuration file, excluding the apiVersion and kind fields.",
				Comments:    [3]string{"" /* encoder.HeadComment */, "Kubernetes API server [encryption of secret data at rest](https://kubernetes.io/docs/tasks/administer-cluster/encrypt-data/)." /* encoder.LineComment */, "" /* encoder.FootComment */},
			},
		},
	}

	doc.AddExample("", exampleKubeEtcdEncryptionConfigV1Alpha1())

	return doc
}

func (KubeSchedulerConfigV1Alpha1) Doc() *encoder.Doc {
	doc := &encoder.Doc{
		Type:        "KubeSchedulerConfig",
		Comments:    [3]string{"" /* encoder.HeadComment */, "KubeSchedulerConfig configures kube-scheduler controlplane static pod." /* encoder.LineComment */, "" /* encoder.FootComment */},
		Description: "KubeSchedulerConfig configures kube-scheduler controlplane static pod.",
		Fields: []encoder.Doc{
			{
				Type:   "Meta",
				Inline: true,
			},
			{
				Name:        "enabled",
				Type:        "bool",
				Note:        "",
				Description: "By default, kube-scheduler static pod is enabled.\nSet to false to disable the kube-scheduler (assuming it runs on other controlplane node).",
				Comments:    [3]string{"" /* encoder.HeadComment */, "By default, kube-scheduler static pod is enabled." /* encoder.LineComment */, "" /* encoder.FootComment */},
			},
			{
				Name:        "image",
				Type:        "string",
				Note:        "",
				Description: "The container image used to run the kube-scheduler component.\n\nThe image reference should contain the tag, even if it is pinned by digest.",
				Comments:    [3]string{"" /* encoder.HeadComment */, "The container image used to run the kube-scheduler component." /* encoder.LineComment */, "" /* encoder.FootComment */},
			},
			{
				Name:        "config",
				Type:        "Unstructured",
				Note:        "",
				Description: "Provide configuration for the kube-scheduler static pod.\n\nThere is no need  to specify kind and apiVersion fields (they will be set automatically),\nbut the rest of the configuration should be provided as is.\n\nSee https://kubernetes.io/docs/reference/scheduling/config/ for the details of the configuration schema.",
				Comments:    [3]string{"" /* encoder.HeadComment */, "Provide configuration for the kube-scheduler static pod." /* encoder.LineComment */, "" /* encoder.FootComment */},
			},
			{
				Name:        "extraArgs",
				Type:        "Args",
				Note:        "",
				Description: "Extra command line arguments to supply to the kube-scheduler.\n\nIt is preferable to use `config` field to provide configuration overrides.",
				Comments:    [3]string{"" /* encoder.HeadComment */, "Extra command line arguments to supply to the kube-scheduler." /* encoder.LineComment */, "" /* encoder.FootComment */},
			},
			{
				Name:        "env",
				Type:        "map[string]string",
				Note:        "",
				Description: "The `env` field allows for the addition of environment variables for the kube-scheduler.",
				Comments:    [3]string{"" /* encoder.HeadComment */, "The `env` field allows for the addition of environment variables for the kube-scheduler." /* encoder.LineComment */, "" /* encoder.FootComment */},
			},
			{
				Name:        "resources",
				Type:        "ResourcesConfig",
				Note:        "",
				Description: "Configure the kube-scheduler resources.",
				Comments:    [3]string{"" /* encoder.HeadComment */, "Configure the kube-scheduler resources." /* encoder.LineComment */, "" /* encoder.FootComment */},
			},
		},
	}

	doc.AddExample("", exampleKubeSchedulerConfigV1Alpha1())

	return doc
}

// GetFileDoc returns documentation for the file k8s_doc.go.
func GetFileDoc() *encoder.FileDoc {
	return &encoder.FileDoc{
		Name:        "k8s",
		Description: "",
		Structs: []*encoder.Doc{
			ResourcesConfig{}.Doc(),
			KubeControllerManagerConfigV1Alpha1{}.Doc(),
			KubeEtcdEncryptionConfigV1Alpha1{}.Doc(),
			KubeSchedulerConfigV1Alpha1{}.Doc(),
		},
	}
}
