Documentation
¶
Index ¶
- func CreateFile(flag *string, filePath string, command string) error
- func ValidFileName(filePath string) error
- type Affinity
- type Capabilities
- type ClusterRole
- type ClusterRoleBinding
- type ConfigMapEnvSource
- type ConfigMapKeySelector
- type Container
- type ContainerPort
- type Containers
- type Deployment
- type DeploymentSpec
- type EnvFromSource
- type EnvVar
- type EnvVarSource
- type EphemeralContainer
- type ExecAction
- type HTTPGetAction
- type HTTPHeader
- type Help
- type HostAliases
- type LabelSelector
- type LabelSelectorRequirement
- type LifeCycle
- type LifeCycleHandler
- type Limits
- type LocalObjectReference
- type NodeAffinity
- type NodeSelector
- type NodeSelectorRequirement
- type NodeSelectorTerm
- type ObjectFieldSelector
- type ObjectMeta
- type ObjectReference
- type PersistentVolumeClaim
- type Pod
- type PodAffinity
- type PodAffinityTerm
- type PodAntiAffinity
- type PodDNSConfig
- type PodDNSConfigOption
- type PodOS
- type PodReadinessGate
- type PodSecurityContext
- type PodSpec
- type PodTemplateSpec
- type PolicyRule
- type PrefferedSchedulingTerm
- type Probe
- type Requests
- type ResourceFieldSelector
- type ResourceRequirements
- type Resources
- type Role
- type RoleBinding
- type RoleRef
- type SELinuxOptions
- type SeccompProfile
- type SecretEnvSource
- type SecretKeySelector
- type SecurityContext
- type ServiceAccount
- type Subject
- type Sysctl
- type TCPSocketAction
- type Toleration
- type TopologySpreadConstraint
- type Volume
- type VolumeDevice
- type VolumeMount
- type WeightedPodAffinityTerm
- type WindowsSecurityContextOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidFileName ¶
Types ¶
type Affinity ¶
type Affinity struct {
NodeAffinity *NodeAffinity `yaml:"nodeAffinity,omitempty"`
PodAffinity *PodAffinity `yaml:"podAffinity,omitempty"`
PodAntiAffinity *PodAntiAffinity `yaml:"podAntiAffinity,omitempty"`
}
type Capabilities ¶
type Capabilities struct {
Add []string `yaml:"add,omitempty"`
Drop []string `yaml:"drop,omitempty"`
}
-------- Sixth Degree Properties --------
type ClusterRole ¶
type ClusterRole struct {
ApiVersion string `yaml:"apiVersion,omitempty"`
Kind string `yaml:"kind,omitempty"`
Metadata *ObjectMeta `yaml:"metadata,omitempty"`
Rules *PolicyRule `yaml:"rules,omitempty"`
}
func GenerateClusterRole ¶
func GenerateClusterRole(flag *string) ClusterRole
type ClusterRoleBinding ¶
type ClusterRoleBinding struct {
ApiVersion string `yaml:"apiVersion,omitempty"`
Kind string `yaml:"kind,omitempty"`
Metadata *ObjectMeta `yaml:"metadata,omitempty"`
RoleRef *RoleRef `yaml:"roleRef,omitempty"`
Subjects *Subject `yaml:"subjects,omitempty"`
}
func GenerateClusterRoleBinding ¶
func GenerateClusterRoleBinding(flag *string) ClusterRoleBinding
type ConfigMapEnvSource ¶
type ConfigMapKeySelector ¶
type Container ¶
type Container struct {
Args []string `yaml:"args,omitempty"`
Command []string `yaml:"command,omitempty"`
Env []EnvVar `yaml:"env,omitempty"`
EnvFrom []EnvVarSource `yaml:"envFrom,omitempty"`
Image string `yaml:"image,omitempty"`
ImagePullPolicy string `yaml:"imagePullPolicy,omitempty"`
LifeCycle *LifeCycle `yaml:"lifecycle,omitempty"`
LivenessProbe *Probe `yaml:"livenessProbe,omitempty"`
Name string `yaml:"name,omitempty"`
Ports []ContainerPort `yaml:"ports,omitempty"`
ReadinessProbe *Probe `yaml:"readinessProbe,omitempty"`
Resources *ResourceRequirements `yaml:"resources,omitempty"`
SecurityContext *SecurityContext `yaml:"securityContext,omitempty"`
StartupProbe *Probe `yaml:"startupProbe,omitempty"`
Stdin bool `yaml:"stdin,omitempty"`
StdinOnce bool `yaml:"stdinOnce,omitempty"`
TerminationMessagePath string `yaml:"terminationMessagePath,omitempty"`
TerminationMessagePolicy string `yaml:"terminationMessagePolicy,omitempty"`
TTY bool `yaml:"tty,omitempty"`
VolumeDevices []VolumeDevice `yaml:"volumeDevices,omitempty"`
VolumeMounts []VolumeMount `yaml:"volumeMounts,omitempty"`
WorkingDir string `yaml:"workingDir,omitempty"`
}
type ContainerPort ¶
type Containers ¶
type Containers struct {
Name string `yaml:"name,omitempty"`
Image string `yaml:"image,omitempty"`
Args []string `yaml:"args,omitempty"`
Command []string `yaml:"command,omitempty"`
ImagePullPolicy string `yaml:"imagePullPolicy,omitempty"` // Always, Never, IfNotPresent
Env []EnvVar `yaml:"env,omitempty"`
LivenessProbe *Probe `yaml:"livenessProbe,omitempty"`
Ports []ContainerPort `yaml:"ports,omitempty"`
ReadinessProbe *Probe `yaml:"readinessProbe,omitempty"`
Resources *ResourceRequirements `yaml:"resources,omitempty"`
VolumeMounts []VolumeMount `yaml:"volumeMounts,omitempty"`
}
type Deployment ¶
type Deployment struct {
ApiVersion string `yaml:"apiVersion,omitempty"`
Kind string `yaml:"kind,omitempty"`
Metadata *ObjectMeta `yaml:"metadata,omitempty"`
Spec *DeploymentSpec `yaml:"spec,omitempty"`
}
-------- KIND --------
func GenerateDeployment ¶
func GenerateDeployment(flag *string) Deployment
type DeploymentSpec ¶
type DeploymentSpec struct {
Replicas int `yaml:"replicas,omitempty"`
Selector *LabelSelector `yaml:"selector,omitempty"`
Template *PodTemplateSpec `yaml:"template,omitempty"`
}
type EnvFromSource ¶
type EnvFromSource struct {
ConfigMapRef *ConfigMapEnvSource `yaml:"configMapRef,omitempty"`
Prefix string `yaml:"prefix,omitempty"`
SecretRef *SecretEnvSource `yaml:"secretRef,omitempty"`
}
type EnvVar ¶
type EnvVar struct {
Name string `yaml:"name,omitempty"`
Value string `yaml:"value,omitempty"`
ValueFrom *EnvVarSource `yaml:"valueFrom,omitempty"`
}
type EnvVarSource ¶
type EnvVarSource struct {
ConfigMapKeyRef *ConfigMapKeySelector `yaml:"configMapKeyRef,omitempty"`
FieldRef *ObjectFieldSelector `yaml:"fieldRef,omitempty"`
ResourceFieldRef *ResourceFieldSelector `yaml:"resourceFieldRef,omitempty"`
SecretKeyRef *SecretKeySelector `yaml:"secretKeyRef,omitempty"`
}
type EphemeralContainer ¶
type EphemeralContainer struct {
Args []string `yaml:"args,omitempty"`
Command []string `yaml:"command,omitempty"`
Env []EnvVar `yaml:"env,omitempty"`
EnvFrom []EnvFromSource `yaml:"envFrom,omitempty"`
Image string `yaml:"image,omitempty"`
ImagePullPolicy string `yaml:"imagePullPolicy,omitempty"`
LifeCycle *LifeCycle `yaml:"lifecycle,omitempty"`
LivenessProbe *Probe `yaml:"livenessProbe,omitempty"`
Name string `yaml:"name,omitempty"`
Ports []ContainerPort `yaml:"ports,omitempty"`
ReadinessProbe *Probe `yaml:"readinessProbe,omitempty"`
Resources *ResourceRequirements `yaml:"resources,omitempty"`
SecurityContext *SecurityContext `yaml:"securityContext,omitempty"`
StartupProbe *Probe `yaml:"startupProbe,omitempty"`
Stdin bool `yaml:"stdin,omitempty"`
StdinOnce bool `yaml:"stdinOnce,omitempty"`
TargetContainerName string `yaml:"targetContainerName,omitempty"`
TerminationMessagePath string `yaml:"terminationMessagePath,omitempty"`
TerminationMessagePolicy string `yaml:"terminationMessagePolicy,omitempty"`
TTY bool `yaml:"tty,omitempty"`
VolumeDevices []VolumeDevice `yaml:"volumeDevices,omitempty"`
VolumeMounts []VolumeMount `yaml:"volumeMounts,omitempty"`
WorkingDir string `yaml:"workingDir,omitempty"`
}
type ExecAction ¶
type ExecAction struct {
Command []string `yaml:"command,omitempty"`
}
type HTTPGetAction ¶
type HTTPGetAction struct {
Host string `yaml:"host,omitempty"`
HttpHeader *HTTPHeader `yaml:"httpHeader,omitempty"`
Path string `yaml:"path,omitempty"`
Port int `yaml:"port,omitempty"`
Scheme string `yaml:"scheme,omitempty"`
}
type HTTPHeader ¶
type Help ¶
-------- HELP MESSAGES --------
func GenerateHelpMessage ¶
func GenerateHelpMessage() Help
func (*Help) PrintAutoyamlUsage ¶
func (h *Help) PrintAutoyamlUsage()
type HostAliases ¶
type LabelSelector ¶
type LabelSelector struct {
MatchLabels map[string]string `yaml:"matchLabels,omitempty"`
MatchExpressions []LabelSelectorRequirement `yaml:"matchExpressions,omitempty"`
}
-------- Second Degree Properties --------
type LifeCycle ¶
type LifeCycle struct {
PostStart *LifeCycleHandler `yaml:"postStart,omitempty"`
PreStop *LifeCycleHandler `yaml:"preStop,omitempty"`
}
type LifeCycleHandler ¶
type LifeCycleHandler struct {
Exec *ExecAction `yaml:"exec,omitempty"`
HTTPGet *HTTPGetAction `yaml:"httpGet,omitempty"`
TCPSocket *TCPSocketAction `yaml:"tcpSocketAction,omitempty"`
}
type Limits ¶
Limits and Requests take a byte value as plain int E,P,T,G,M,k can also be used as suffixes Ei,Pi,Ti,Gi,Mi,Ki can also be used as suffixes
type LocalObjectReference ¶
type LocalObjectReference struct {
Name string `yaml:"name,omitempty"`
}
type NodeAffinity ¶
type NodeAffinity struct {
PrefferedDuringSchedulingIgnoredDuringExecution []PrefferedSchedulingTerm `yaml:"prefferedDuringSchedulingIgnoredDuringExecution,omitempty"`
RequiredDuringSchedulingIgnoredDuringExecution *NodeSelector `yaml:"requiredDuringSchedulingIgnoredDuringExecution,omitempty"`
}
type NodeSelector ¶
type NodeSelector struct {
NodeSelectorTerms []NodeSelectorTerm `yaml:"nodeSelectorTerms"`
}
type NodeSelectorRequirement ¶
type NodeSelectorRequirement struct {
Key string `yaml:"key,omitempty"`
Operator string `yaml:"operator,omitempty"`
Values []string `yaml:"values,omitempty"`
}
-------- Eight Degree Properties --------
type NodeSelectorTerm ¶
type NodeSelectorTerm struct {
MatchExpressions []NodeSelectorRequirement `yaml:"matchExpressions,omitempty"`
MatchFields []NodeSelectorRequirement `yaml:"matchFields,omitempty"`
}
type ObjectFieldSelector ¶
type ObjectMeta ¶
type ObjectMeta struct {
Name string `yaml:"name,omitempty"`
Namespace string `yaml:"namespace,omitempty"`
ClusterName string `yaml:"clusterName,omitempty"`
Labels map[string]string `yaml:"labels,omitempty"`
Annotations map[string]string `yaml:"annotations,omitempty"`
}
-------- First Degree Properties --------
type ObjectReference ¶
type ObjectReference struct {
ApiVersion string `yaml:"apiVersion,omitempty"`
FieldPath string `yaml:"fieldPath,omitempty"`
Kind string `yaml:"kind,omitempty"`
Name string `yaml:"name,omitempty"`
Namespace string `yaml:"namespace,omitempty"`
ResourceVersion string `yaml:"resourceVersion,omitempty"`
Uid string `yaml:"uid,omitempty"`
}
type PersistentVolumeClaim ¶
type Pod ¶
type Pod struct {
ApiVersion string `yaml:"apiVersion,omitempty"`
Kind string `yaml:"kind,omitempty"`
Metadata *ObjectMeta `yaml:"metadata,omitempty"`
Spec *PodSpec `yaml:"spec,omitempty"`
}
func GeneratePod ¶
type PodAffinity ¶
type PodAffinity struct {
PrefferedDuringSchedulingIgnoredDuringExecution []WeightedPodAffinityTerm `yaml:"prefferedDuringSchedulingIgnoredDuringExecution,omitempty"`
RequiredDuringSchedulingIgnoredDuringExecution []PodAffinityTerm `yaml:"requiredDuringSchedulingIgnoredDuringExecution,omitempty"`
}
type PodAffinityTerm ¶
type PodAffinityTerm struct {
LabelSelector *LabelSelector `yaml:"labelSelector,omitempty"`
NamespaceSelector *LabelSelector `yaml:"namespaceSelector,omitempty"`
Namespaces []string `yaml:"namespaces,omitempty"`
TopologyKey string `yaml:"topologyKey,omitempty"`
}
type PodAntiAffinity ¶
type PodAntiAffinity struct {
PrefferedDuringSchedulingIgnoredDuringExecution []WeightedPodAffinityTerm `yaml:"prefferedDuringSchedulingIgnoredDuringExecution,omitempty"`
RequiredDuringSchedulingIgnoredDuringExecution []PodAffinityTerm `yaml:"requiredDuringSchedulingIgnoredDuringExecution,omitempty"`
}
type PodDNSConfig ¶
type PodDNSConfig struct {
NameServers []string `yaml:"nameservers,omitempty"`
Options []PodDNSConfigOption `yaml:"options,omitempty"`
Searches []string `yaml:"searches,omitempty"`
}
-------- Forth Degree Properties --------
type PodDNSConfigOption ¶
type PodReadinessGate ¶
type PodReadinessGate struct {
ConditionType string `yaml:"conditionType,omitempty"`
}
type PodSecurityContext ¶
type PodSecurityContext struct {
FsGroup int `yaml:"fsGroup,omitempty"`
FsGroupChangePolicy string `yaml:"fsGroupChangePolicy,omitempty"`
RunAsGroup int `yaml:"runAsGroup,omitempty"`
RunAsNonRoot bool `yaml:"runAsNonRoot,omitempty"`
RunAsUser int `yaml:"runAsUser,omitempty"`
SELinuxOptions *SELinuxOptions `yaml:"seLinuxOptions,omitempty"`
SeccompProfile *SeccompProfile `yaml:"seccompProfile,omitempty"`
SupplementalGroup []int `yaml:"supplementalGroup,omitempty"`
Sysctls []Sysctl `yaml:"sysctls,omitempty"`
WindowsSecurityContextOptions *WindowsSecurityContextOptions `yaml:"windowsSecurityOptions,omitempty"`
}
type PodSpec ¶
type PodSpec struct {
Containers []Containers `yaml:"containers,omitempty"`
NodeName string `yaml:"nodeName,omitempty"`
RestartPolicy string `yaml:"restartPolicy,omitempty"`
SchedulerName string `yaml:"schedulerName,omitempty"`
ServiceAccountName string `yaml:"serviceaccount,omitempty"`
Tolerations []Toleration `yaml:"tolerations,omitempty"`
Volumes []Volume `yaml:"volumes,omitempty"`
ActiveDeadlineSeconds int `yaml:"activeDeadlineSeconds,omitempty"`
Affinity *Affinity `yaml:"affinity,omitempty"`
AutomountServiceAccountToken bool `yaml:"automountServiceAccountToken,omitempty"`
DNSConfig *PodDNSConfig `yaml:"dnsConfig,omitempty"`
DNSPolicy string `yaml:"dnsPolicy,omitempty"`
EnableServiceLinks bool `yaml:"enableServiceLinks,omitempty"`
EphemeralContainers []EphemeralContainer `yaml:"ephemeralContainer,omitempty"`
HostAliases []HostAliases `yaml:"hostAliases,omitempty"`
HostIPC bool `yaml:"hostIPC,omitempty"`
HostNetwork bool `yaml:"hostNetwork,omitempty"`
HostPID bool `yaml:"hostPID,omitempty"`
HostName string `yaml:"hostName,omitempty"`
ImagePullSecrets []LocalObjectReference `yaml:"imagePullSecrets,omitempty"`
InitContainers []Container `yaml:"initContainers,omitempty"`
NodeSelector map[string]string `yaml:"nodeSelector,omitempty"`
OS *PodOS `yaml:"os,omitempty"`
PreemptionPolicy string `yaml:"preemptionPolicy,omitempty"`
Priority int `yaml:"priority,omitempty"`
PriorityClassName string `yaml:"priorityClassName,omitempty"`
ReadinessGates []PodReadinessGate `yaml:"readinessGates,omitempty"`
RuntimeClassName string `yaml:"runtimeClassName,omitempty"`
SecurityContext *PodSecurityContext `yaml:"securityContext,omitempty"`
SetHostNameAsFQDN bool `yaml:"setHostnameAsFQDN,omitempty"`
Subdomain string `yaml:"subdomain,omitempty"`
TerminationGracePeriodSeconds int `yaml:"terminationGracePeriodSeconds,omitempty"`
TopologySpreadConstraints []TopologySpreadConstraint `yaml:"topologySpreadConstraints,omitempty"`
}
-------- Third Degree Properties --------
type PodTemplateSpec ¶
type PodTemplateSpec struct {
Metadata *ObjectMeta `yaml:"metadata,omitempty"`
Spec *PodSpec `yaml:"spec,omitempty"`
}
type PolicyRule ¶
type PrefferedSchedulingTerm ¶
type PrefferedSchedulingTerm struct {
Preference *NodeSelectorTerm `yaml:"preference,omitempty"`
Weight int `yaml:"weight,omitempty"`
}
type Probe ¶
type Probe struct {
Exec *ExecAction `yaml:"exec,omitempty"`
FailureThreshold int `yaml:"failureThreshold,omitempty"` // Defaults to 3, min. 1
HttpGet *HTTPGetAction `yaml:"httpGet,omitempty"`
InitialDelaySeconds int `yaml:"initialDelaySeconds,omitempty"`
PeriodSeconds int `yaml:"periodSeconds,omitempty"` // Defaults to 10, min. 1
SuccessThreshold int `yaml:"successThreshold,omitempty"` // Defaults to 1, min. 1 (Must be 1 for liveness and startup)
TimeoutSeconds int `yaml:"timeoutSeconds,omitempty"` // Defaults to 1sec, min. 1
}
type ResourceFieldSelector ¶
type ResourceRequirements ¶
type Resources ¶
type Resources struct {
Deployment Deployment
ServiceAccount ServiceAccount
Role Role
RoleBinding RoleBinding
ClusterRole ClusterRole
ClusterRoleBinding ClusterRoleBinding
Pod Pod
}
type Role ¶
type Role struct {
ApiVersion string `yaml:"apiVersion,omitempty"`
Kind string `yaml:"kind,omitempty"`
Metadata *ObjectMeta `yaml:"metadata,omitempty"`
Rules []PolicyRule `yaml:"rules,omitempty"`
}
func GenerateRole ¶
type RoleBinding ¶
type RoleBinding struct {
ApiVersion string `yaml:"apiVersion,omitempty"`
Kind string `yaml:"string,omitempty"`
Metadata *ObjectMeta `yaml:"metadata,omitempty"`
RoleRef *RoleRef `yaml:"roleRef,omitempty"`
Subjects *Subject `yaml:"subjects,omitempty"`
}
func GenerateRoleBinding ¶
func GenerateRoleBinding(flag *string) RoleBinding
type SELinuxOptions ¶
type SeccompProfile ¶
type SecretEnvSource ¶
type SecretKeySelector ¶
type SecurityContext ¶
type SecurityContext struct {
AllowPrivilegeEscalation bool `yaml:"allowPrivilegeEscalation,omitempty"`
Capabilities *Capabilities `yaml:"capabilities,omitempty"`
Privileged bool `yaml:"privileged,omitempty"`
ProcMount string `yaml:"procMount,omitempty"`
ReadOnlyRootFilesystem bool `yaml:"readOnlyRootFilesystem,omitempty"`
RunAsGroup int `yaml:"runAsGroup,omitempty"`
RunAsNonRoot bool `yaml:"runAsNonRoot,omitempty"`
RunAsUser bool `yaml:"runAsUser,omitempty"`
SELinuxOptions *SELinuxOptions `yaml:"seLinuxOptions,omitempty"`
SeccompProfile *SeccompProfile `yaml:"seccompProfile,omitempty"`
WindowsOptions *WindowsSecurityContextOptions `yaml:"windowsOptions,omitempty"`
}
type ServiceAccount ¶
type ServiceAccount struct {
ApiVersion string `yaml:"apiVersion,omitempty"`
Kind string `yaml:"kind,omitempty"`
Metadata *ObjectMeta `yaml:"metadata,omitempty"`
Secrets []ObjectReference `yaml:"secrets,omitempty"`
ImagePullSecrets []LocalObjectReference `yaml:"imagePullSecrets,omitempty"`
AutomatedServiceAccountToken bool `yaml:"automationServiceAccountToken,omitempty"`
}
func GenerateServiceAccount ¶
func GenerateServiceAccount(flag *string) ServiceAccount
type TCPSocketAction ¶
type TCPSocketAction struct {
Host string `yaml:"host,omitempty"`
Port int `yaml:"port,omitempty"`
}
-------- Seventh Degree Properties --------
type Toleration ¶
type TopologySpreadConstraint ¶
type TopologySpreadConstraint struct {
LabelSelector *LabelSelector `yaml:"labelSelector,omitempty"`
MaxSkew int `yaml:"maxSkew,omitempty"`
TopologyKey string `yaml:"topologyKey,omitempty"`
WhenUnsatisfiable string `yaml:"whenUnsatisfiable,omitempty"`
}
type Volume ¶
type Volume struct {
Name string `yaml:"name,omitempty"`
PersistentVolumeClaim *PersistentVolumeClaim `yaml:"persistentVolumeClaim,omitempty"`
}
type VolumeDevice ¶
type VolumeMount ¶
type WeightedPodAffinityTerm ¶
type WeightedPodAffinityTerm struct {
PodAffinityTerm *PodAffinityTerm `yaml:"podAffinityTerm,omitempty"`
Weight int `yaml:"weight,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.