k8sfactory

package
v0.13.0-rc.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 2, 2021 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClearOwnerReference added in v0.13.0

func ClearOwnerReference(object interface{})

func ClusterIP added in v0.13.0

func ClusterIP(object interface{})

func ConfigMapFactory added in v0.13.0

func ConfigMapFactory(base *corev1.ConfigMap, traits ...Trait) *corev1.ConfigMap

func ContainerFactory

func ContainerFactory(base *corev1.Container, traits ...Trait) *corev1.Container

func Created added in v0.13.0

func Created(object interface{})

func CronJobFactory added in v0.13.0

func CronJobFactory(base *batchv1beta1.CronJob, traits ...Trait) *batchv1beta1.CronJob

func Debug added in v0.13.0

func Debug(obj runtime.Object, s *runtime.Scheme) string

func Delete added in v0.13.0

func Delete(object interface{})

func DeploymentFactory added in v0.13.0

func DeploymentFactory(base *appsv1.Deployment, traits ...Trait) *appsv1.Deployment

func EventFactory added in v0.13.0

func EventFactory(base *corev1.Event, traits ...Trait) *corev1.Event

func ExecProbe added in v0.13.0

func ExecProbe(command ...string) *corev1.Probe

func HTTPProbe added in v0.13.0

func HTTPProbe(port int, path string) *corev1.Probe

func IPNone added in v0.13.0

func IPNone(object interface{})

func IngressClassFactory added in v0.13.0

func IngressClassFactory(base *networkingv1.IngressClass, traits ...Trait) *networkingv1.IngressClass

func IngressFactory added in v0.13.0

func IngressFactory(base *networkingv1.Ingress, traits ...Trait) *networkingv1.Ingress

func IngressPathFactory added in v0.13.0

func IngressPathFactory(base *networkingv1.HTTPIngressPath, traits ...Trait) *networkingv1.HTTPIngressPath

func IngressRuleFactory added in v0.13.0

func IngressRuleFactory(base *networkingv1.IngressRule, traits ...Trait) *networkingv1.IngressRule

func JobFactory added in v0.13.0

func JobFactory(base *batchv1.Job, traits ...Trait) *batchv1.Job

func LoadBalancer added in v0.13.0

func LoadBalancer(object interface{})

func MatchExpression added in v0.13.0

func MatchExpression(v ...metav1.LabelSelectorRequirement) *metav1.LabelSelector

func MatchLabel added in v0.13.0

func MatchLabel(v map[string]string) *metav1.LabelSelector

func NotReady added in v0.13.0

func NotReady(v interface{})

NotReady is the trait function for k8sfactory. The object is created but not ready.

func PodDisruptionBudgetFactory added in v0.13.0

func PodDisruptionBudgetFactory(base *policyv1.PodDisruptionBudget, traits ...Trait) *policyv1.PodDisruptionBudget

func PodFactory

func PodFactory(base *corev1.Pod, traits ...Trait) *corev1.Pod

func PodFailed

func PodFailed(v interface{})

func Ready added in v0.13.0

func Ready(v interface{})

func RoleBindingFactory added in v0.13.0

func RoleBindingFactory(base *rbacv1.RoleBinding, traits ...Trait) *rbacv1.RoleBinding

func RoleFactory added in v0.13.0

func RoleFactory(base *rbacv1.Role, traits ...Trait) *rbacv1.Role

func SecretFactory added in v0.13.0

func SecretFactory(base *corev1.Secret, traits ...Trait) *corev1.Secret

func ServiceAccountFactory added in v0.13.0

func ServiceAccountFactory(base *corev1.ServiceAccount, traits ...Trait) *corev1.ServiceAccount

func ServiceFactory added in v0.13.0

func ServiceFactory(base *corev1.Service, traits ...Trait) *corev1.Service

func TCPProbe added in v0.13.0

func TCPProbe(port int) *corev1.Probe

func TrafficPolicyLocal added in v0.13.0

func TrafficPolicyLocal(object interface{})

Types

type Trait

type Trait func(object interface{})

func Annotation

func Annotation(k, v string) Trait

func Args added in v0.13.0

func Args(args ...string) Trait

func Container

func Container(c *corev1.Container) Trait

func ControlledBy added in v0.13.0

func ControlledBy(v runtime.Object, s *runtime.Scheme) Trait

func Controller added in v0.13.0

func Controller(v string) Trait

func Data added in v0.13.0

func Data(key string, value []byte) Trait

func EnvFromField added in v0.13.0

func EnvFromField(k, v string) Trait

func EnvVar

func EnvVar(k, v string) Trait

func Finalizer added in v0.13.0

func Finalizer(v string) Trait

func Host added in v0.13.0

func Host(v string) Trait

func Image

func Image(image string, cmd []string) Trait

func IngressClass added in v0.13.0

func IngressClass(v *networkingv1.IngressClass) Trait

func InitContainer added in v0.13.0

func InitContainer(c *corev1.Container) Trait

func Job added in v0.13.0

func Job(j *batchv1.Job) Trait

func Label added in v0.13.0

func Label(v ...string) Trait

func LabelMap added in v0.13.0

func LabelMap(label map[string]string) Trait

func Limits added in v0.13.0

func Limits(lim corev1.ResourceList) Trait

func LivenessProbe added in v0.13.0

func LivenessProbe(p *corev1.Probe) Trait

func MatchLabelSelector added in v0.13.0

func MatchLabelSelector(label map[string]string) Trait

func MinAvailable added in v0.13.0

func MinAvailable(v int) Trait

func Name

func Name(v string) Trait

func Namef added in v0.13.0

func Namef(format string, a ...interface{}) Trait

func Namespace added in v0.13.0

func Namespace(v string) Trait

func Path added in v0.13.0

func Path(path string, pt networkingv1.PathType, svc *corev1.Service, port string) Trait

func Pod added in v0.13.0

func Pod(p *corev1.Pod) Trait

func PolicyRule added in v0.13.0

func PolicyRule(apiGroups, resources, verbs []string) Trait

func Port added in v0.13.0

func Port(name string, protocol corev1.Protocol, port int32) Trait

func PreferredInterPodAntiAffinity added in v0.13.0

func PreferredInterPodAntiAffinity(weight int32, selector *metav1.LabelSelector, key string) Trait

func PullPolicy added in v0.13.0

func PullPolicy(p corev1.PullPolicy) Trait

func ReadinessProbe added in v0.13.0

func ReadinessProbe(p *corev1.Probe) Trait

func Reason added in v0.13.0

func Reason(v string) Trait

func Replicas added in v0.13.0

func Replicas(v int32) Trait

func Requests added in v0.13.0

func Requests(req corev1.ResourceList) Trait

func RestartPolicy added in v0.13.0

func RestartPolicy(policy corev1.RestartPolicy) Trait

func Role added in v0.13.0

func Role(r *rbacv1.Role) Trait

func Rule added in v0.13.0

func Rule(rule *networkingv1.IngressRule) Trait

func Schedule added in v0.13.0

func Schedule(v string) Trait

func Selector added in v0.13.0

func Selector(v ...string) Trait

func ServiceAccount added in v0.13.0

func ServiceAccount(v string) Trait

func Subdomain added in v0.13.0

func Subdomain(v string) Trait

func Subject added in v0.13.0

func Subject(v runtime.Object) Trait

func TargetPort added in v0.13.0

func TargetPort(name string, protocol corev1.Protocol, port int32, targetPort intstr.IntOrString) Trait

func UID added in v0.13.0

func UID() Trait

func Volume added in v0.13.0

func Volume(vol *VolumeSource) Trait

type VolumeSource added in v0.13.0

type VolumeSource struct {
	Mount  corev1.VolumeMount
	Source corev1.Volume
}

func NewConfigMapVolumeSource added in v0.13.0

func NewConfigMapVolumeSource(name, path, configMapName string) *VolumeSource

func NewEmptyDirVolumeSource added in v0.13.0

func NewEmptyDirVolumeSource(name, path string) *VolumeSource

func NewPersistentVolumeClaimVolumeSource added in v0.13.0

func NewPersistentVolumeClaimVolumeSource(name, path, pvcName string) *VolumeSource

func NewSecretVolumeSource added in v0.13.0

func NewSecretVolumeSource(name, path string, source *corev1.Secret, items ...corev1.KeyToPath) *VolumeSource

func (*VolumeSource) PathJoin added in v0.13.0

func (s *VolumeSource) PathJoin(elem ...string) string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL