Documentation ¶
Index ¶
Constants ¶
View Source
const ( KubernetesName = "kubernetes" KubernetesConfigFileName = ".melange.k8s.yaml" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type KubernetesRunnerConfig ¶
type KubernetesRunnerConfig struct { Provider string `json:"provider" yaml:"provider"` Context string `json:"context" yaml:"context"` Repo string `json:"repo" yaml:"repo"` Namespace string `json:"namespace" yaml:"namespace"` Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"` Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"` StartTimeout metav1.Duration `json:"startTimeout" yaml:"startTimeout" split_words:"true"` // This field and everything below it is ignored by the environment variable parser PodTemplate *KubernetesRunnerConfigPodTemplate `json:"podTemplate,omitempty" yaml:"podTemplate,omitempty" ignored:"true"` // contains filtered or unexported fields }
KubernetesRunnerConfig handles the configuration for the Kubernetes runner It sources from various locations, in the following order of precedence:
- The "global" config file
- Defaults
TODO: Add loaders from package config and environment
func NewKubernetesConfig ¶
func NewKubernetesConfig(opt ...KubernetesRunnerConfigOptions) (*KubernetesRunnerConfig, error)
NewKubernetesConfig returns a default Kubernetes runner config setup
type KubernetesRunnerConfigOptions ¶
type KubernetesRunnerConfigOptions func(*KubernetesRunnerConfig)
func WithKubernetesRunnerConfigBaseConfigFile ¶
func WithKubernetesRunnerConfigBaseConfigFile(path string) KubernetesRunnerConfigOptions
WithKubernetesRunnerConfigBaseConfigFile sets the path to a config file with KubernetesRunner-specific options
type KubernetesRunnerConfigPodTemplate ¶
type KubernetesRunnerConfigPodTemplate struct { ServiceAccountName string `json:"serviceAccountName,omitempty" yaml:"serviceAccountName,omitempty"` NodeSelector map[string]string `json:"nodeSelector,omitempty" yaml:"nodeSelector,omitempty"` Env []corev1.EnvVar `json:"env,omitempty" yaml:"env,omitempty"` Affinity *corev1.Affinity `json:"affinity,omitempty" yaml:"affinity,omitempty"` RuntimeClassName *string `json:"runtimeClassName,omitempty" yaml:"runtimeClassName,omitempty"` Volumes []corev1.Volume `json:"volumes,omitempty" yaml:"volumes,omitempty"` VolumeMounts []corev1.VolumeMount `json:"volumeMounts,omitempty" yaml:"volumeMounts,omitempty"` }
Click to show internal directories.
Click to hide internal directories.