Documentation ¶
Index ¶
- Variables
- func GetClient() (*kubernetes.Clientset, error)
- func GetDeploymentClient(kind string) (*v1.Deployment, error)
- func GetIngressClient(kind string) (*networkingv1.Ingress, error)
- func GetServiceClient(kind string) (*corev1.Service, error)
- func New(filename string)
- func RemoveDir(buildDir, serviceDir string) error
- func Validate(localFile, remoteFile string) (bool, error)
- func WriteTemplate(to, from string, T any) error
- type ConfigMapManifest
- type Container
- type Data
- type DeploymentManifest
- type DeploymentSpec
- type Document
- type EnvFrom
- type EnvVar
- type HTTPIngressPath
- type HTTPIngressRuleValue
- type IngressBackend
- type IngressManifest
- type IngressRule
- type IngressRuleValue
- type IngressServiceBackend
- type IngressSpec
- type LabelSelector
- type Manifest
- type Metadata
- type NFSVolumeSource
- type PodSpec
- type Resources
- type ServiceBackendPort
- type ServiceManifest
- type ServicePort
- type ServiceSpec
- type Template
- type Volume
- type VolumeMount
Constants ¶
This section is empty.
Variables ¶
View Source
var ConfigMapEnvVars []EnvVar
The `deployment` validator needs access to these env vars so it can plug them into its template. This needs to happen because the current Deployment has the env vars embedded but the new Deployment will access them via a `ConfigMap`.
Functions ¶
func GetClient ¶
func GetClient() (*kubernetes.Clientset, error)
func GetDeploymentClient ¶
func GetDeploymentClient(kind string) (*v1.Deployment, error)
func GetIngressClient ¶
func GetIngressClient(kind string) (*networkingv1.Ingress, error)
func WriteTemplate ¶
Types ¶
type ConfigMapManifest ¶
type ConfigMapManifest struct { APIVersion string `json:"apiVersion"` Kind string `json:"kind"` Metadata Metadata `json:"metadata"` Data Data `json:"data"` }
func (ConfigMapManifest) Write ¶
func (m ConfigMapManifest) Write()
type Container ¶
type Container struct { Name string `json:"name,omitempty"` Image string `json:"image,omitempty"` ImagePullPolicy string `json:"imagePullPolicy,omitempty"` Env []EnvVar `json:"env,omitempty"` EnvFrom []EnvFrom `json:"envFrom,omitempty"` Ports []v1.ContainerPort `json:"ports,omitempty"` Resources Resources `json:"resources,omitempty"` VolumeMounts []VolumeMount `json:"volumeMounts,omitempty"` }
type DeploymentManifest ¶
type DeploymentManifest struct { APIVersion string `json:"apiVersion"` Kind string `json:"kind"` Metadata `json:"metadata"` Spec DeploymentSpec `json:"spec"` }
func (DeploymentManifest) Write ¶
func (m DeploymentManifest) Write()
type DeploymentSpec ¶
type DeploymentSpec struct { Replicas int `json:"replicas,omitempty"` Selector LabelSelector `json:"selector,omitempty"` Template Template `json:"template,omitempty"` }
type HTTPIngressPath ¶
type HTTPIngressPath struct { Path string `json:"path,omitempty"` PathType string `json:"pathType,omitempty"` Backend IngressBackend `json:"backend,omitempty"` }
type HTTPIngressRuleValue ¶
type HTTPIngressRuleValue struct {
Paths []HTTPIngressPath `json:"paths,omitempty"`
}
type IngressBackend ¶
type IngressBackend struct {
Service IngressServiceBackend `json:"service,omitempty"`
}
type IngressManifest ¶
type IngressManifest struct { APIVersion string `json:"apiVersion"` Kind string `json:"kind"` Metadata `json:"metadata"` Spec IngressSpec `json:"spec"` }
func (IngressManifest) Write ¶
func (m IngressManifest) Write()
type IngressRule ¶
type IngressRule struct {
IngressRuleValue `json:",inline,omitempty"`
}
type IngressRuleValue ¶
type IngressRuleValue struct {
HTTP HTTPIngressRuleValue `json:"http,omitempty"`
}
type IngressServiceBackend ¶
type IngressServiceBackend struct { Name string `json:"name,omitempty"` Port ServiceBackendPort `json:"port,omitempty"` }
type IngressSpec ¶
type IngressSpec struct {
Rules []IngressRule `json:"rules,omitempty"`
}
type LabelSelector ¶
type LabelSelector struct {
MatchLabels Data `json:"matchLabels,omitempty"`
}
type Manifest ¶
type Manifest interface { ConfigMapManifest | DeploymentManifest | IngressManifest | ServiceManifest Write() }
type NFSVolumeSource ¶
type Resources ¶
type Resources struct { Limits v1.ResourceList `json:"limits,omitempty"` Requests v1.ResourceList `json:"requests,omitempty"` }
type ServiceBackendPort ¶
type ServiceManifest ¶
type ServiceManifest struct { APIVersion string `json:"apiVersion"` Kind string `json:"kind"` Metadata `json:"metadata"` Spec ServiceSpec `json:"spec"` }
func (ServiceManifest) Write ¶
func (m ServiceManifest) Write()
type ServicePort ¶
type ServicePort struct { Port int TargetPort intstr.IntOrString Protocol string }
type ServiceSpec ¶
type ServiceSpec struct { Ports []ServicePort Selector Data Type string }
type Volume ¶
type Volume struct { Name string `json:"name,omitempty"` NFS *NFSVolumeSource `json:"nfs,omitempty"` }
type VolumeMount ¶
Click to show internal directories.
Click to hide internal directories.