Documentation
¶
Overview ¶
Package builders provides utility functions for building Kubernetes objects.
Index ¶
- type ClusterRoleBindingBuilder
- func (b *ClusterRoleBindingBuilder) AddSubject(subject rbacv1.Subject) *ClusterRoleBindingBuilder
- func (b *ClusterRoleBindingBuilder) Build() *rbacv1.ClusterRoleBinding
- func (b *ClusterRoleBindingBuilder) WithLabels(labels map[string]string) *ClusterRoleBindingBuilder
- func (b *ClusterRoleBindingBuilder) WithName(name string) *ClusterRoleBindingBuilder
- func (b *ClusterRoleBindingBuilder) WithRoleRef(roleRef rbacv1.RoleRef) *ClusterRoleBindingBuilder
- type ClusterRoleBuilder
- type ComponentBuilder
- func (b *ComponentBuilder) Build() *instancev1alpha1.Component
- func (b *ComponentBuilder) WithComponentType(ct instancev1alpha1.ComponentType) *ComponentBuilder
- func (b *ComponentBuilder) WithDeletionTimestamp(ts *metav1.Time) *ComponentBuilder
- func (b *ComponentBuilder) WithFinalizers(finalizers []string) *ComponentBuilder
- func (b *ComponentBuilder) WithImage(containerName, image string) *ComponentBuilder
- func (b *ComponentBuilder) WithLabels(labels map[string]string) *ComponentBuilder
- func (b *ComponentBuilder) WithName(name string) *ComponentBuilder
- func (b *ComponentBuilder) WithNamespace(namespace string) *ComponentBuilder
- func (b *ComponentBuilder) WithPodTemplateSpec(pts *corev1.PodTemplateSpec) *ComponentBuilder
- func (b *ComponentBuilder) WithReplicas(r int32) *ComponentBuilder
- func (b *ComponentBuilder) WithStrategy(s appsv1.DeploymentStrategy) *ComponentBuilder
- func (b *ComponentBuilder) WithVersion(v string) *ComponentBuilder
- type ConfigBuilder
- func (b *ConfigBuilder) Build() *artifactv1alpha1.Config
- func (b *ConfigBuilder) WithConfig(cfg *apiextensionsv1.JSON) *ConfigBuilder
- func (b *ConfigBuilder) WithConfigMapRef(ref *commonv1alpha1.ConfigMapRef) *ConfigBuilder
- func (b *ConfigBuilder) WithDeletionTimestamp(ts *metav1.Time) *ConfigBuilder
- func (b *ConfigBuilder) WithFinalizers(finalizers []string) *ConfigBuilder
- func (b *ConfigBuilder) WithGeneration(gen int64) *ConfigBuilder
- func (b *ConfigBuilder) WithLabels(labels map[string]string) *ConfigBuilder
- func (b *ConfigBuilder) WithName(name string) *ConfigBuilder
- func (b *ConfigBuilder) WithNamespace(namespace string) *ConfigBuilder
- func (b *ConfigBuilder) WithPriority(priority int32) *ConfigBuilder
- func (b *ConfigBuilder) WithSelector(selector *metav1.LabelSelector) *ConfigBuilder
- type ConfigMapBuilder
- func (b *ConfigMapBuilder) Build() *corev1.ConfigMap
- func (b *ConfigMapBuilder) WithData(data map[string]string) *ConfigMapBuilder
- func (b *ConfigMapBuilder) WithDeletionTimestamp(ts *metav1.Time) *ConfigMapBuilder
- func (b *ConfigMapBuilder) WithFinalizers(finalizers []string) *ConfigMapBuilder
- func (b *ConfigMapBuilder) WithLabels(labels map[string]string) *ConfigMapBuilder
- func (b *ConfigMapBuilder) WithName(name string) *ConfigMapBuilder
- func (b *ConfigMapBuilder) WithNamespace(namespace string) *ConfigMapBuilder
- type DaemonSetBuilder
- func (b *DaemonSetBuilder) AddContainer(container *corev1.Container) *DaemonSetBuilder
- func (b *DaemonSetBuilder) AddInitContainer(container *corev1.Container) *DaemonSetBuilder
- func (b *DaemonSetBuilder) Build() *appsv1.DaemonSet
- func (b *DaemonSetBuilder) WithLabels(labels map[string]string) *DaemonSetBuilder
- func (b *DaemonSetBuilder) WithName(name string) *DaemonSetBuilder
- func (b *DaemonSetBuilder) WithNamespace(namespace string) *DaemonSetBuilder
- func (b *DaemonSetBuilder) WithPodSecurityContext(sc *corev1.PodSecurityContext) *DaemonSetBuilder
- func (b *DaemonSetBuilder) WithPodTemplateLabels(labels map[string]string) *DaemonSetBuilder
- func (b *DaemonSetBuilder) WithSelector(matchLabels map[string]string) *DaemonSetBuilder
- func (b *DaemonSetBuilder) WithServiceAccount(name string) *DaemonSetBuilder
- func (b *DaemonSetBuilder) WithTolerations(tolerations []corev1.Toleration) *DaemonSetBuilder
- func (b *DaemonSetBuilder) WithUpdateStrategy(strategy appsv1.DaemonSetUpdateStrategy) *DaemonSetBuilder
- func (b *DaemonSetBuilder) WithVolumes(volumes []corev1.Volume) *DaemonSetBuilder
- type DeploymentBuilder
- func (b *DeploymentBuilder) AddContainer(container *corev1.Container) *DeploymentBuilder
- func (b *DeploymentBuilder) AddInitContainer(container *corev1.Container) *DeploymentBuilder
- func (b *DeploymentBuilder) Build() *appsv1.Deployment
- func (b *DeploymentBuilder) WithLabels(labels map[string]string) *DeploymentBuilder
- func (b *DeploymentBuilder) WithName(name string) *DeploymentBuilder
- func (b *DeploymentBuilder) WithNamespace(namespace string) *DeploymentBuilder
- func (b *DeploymentBuilder) WithPodSecurityContext(sc *corev1.PodSecurityContext) *DeploymentBuilder
- func (b *DeploymentBuilder) WithPodTemplateLabels(labels map[string]string) *DeploymentBuilder
- func (b *DeploymentBuilder) WithReplicas(replicas *int32) *DeploymentBuilder
- func (b *DeploymentBuilder) WithSelector(matchLabels map[string]string) *DeploymentBuilder
- func (b *DeploymentBuilder) WithServiceAccount(name string) *DeploymentBuilder
- func (b *DeploymentBuilder) WithStrategy(strategy appsv1.DeploymentStrategy) *DeploymentBuilder
- func (b *DeploymentBuilder) WithTolerations(tolerations []corev1.Toleration) *DeploymentBuilder
- func (b *DeploymentBuilder) WithVolumes(volumes []corev1.Volume) *DeploymentBuilder
- type FalcoBuilder
- func (b *FalcoBuilder) Build() *instancev1alpha1.Falco
- func (b *FalcoBuilder) WithDeletionTimestamp(ts *metav1.Time) *FalcoBuilder
- func (b *FalcoBuilder) WithFinalizers(finalizers []string) *FalcoBuilder
- func (b *FalcoBuilder) WithImage(containerName, image string) *FalcoBuilder
- func (b *FalcoBuilder) WithLabels(labels map[string]string) *FalcoBuilder
- func (b *FalcoBuilder) WithName(name string) *FalcoBuilder
- func (b *FalcoBuilder) WithNamespace(namespace string) *FalcoBuilder
- func (b *FalcoBuilder) WithPodTemplateSpec(pts *corev1.PodTemplateSpec) *FalcoBuilder
- func (b *FalcoBuilder) WithReplicas(r int32) *FalcoBuilder
- func (b *FalcoBuilder) WithStrategy(s appsv1.DeploymentStrategy) *FalcoBuilder
- func (b *FalcoBuilder) WithType(t string) *FalcoBuilder
- func (b *FalcoBuilder) WithUpdateStrategy(s appsv1.DaemonSetUpdateStrategy) *FalcoBuilder
- func (b *FalcoBuilder) WithVersion(v string) *FalcoBuilder
- type PluginBuilder
- func (b *PluginBuilder) Build() *artifactv1alpha1.Plugin
- func (b *PluginBuilder) WithDeletionTimestamp(ts *metav1.Time) *PluginBuilder
- func (b *PluginBuilder) WithFinalizers(finalizers []string) *PluginBuilder
- func (b *PluginBuilder) WithGeneration(gen int64) *PluginBuilder
- func (b *PluginBuilder) WithLabels(labels map[string]string) *PluginBuilder
- func (b *PluginBuilder) WithName(name string) *PluginBuilder
- func (b *PluginBuilder) WithNamespace(namespace string) *PluginBuilder
- func (b *PluginBuilder) WithOCIArtifact(artifact commonv1alpha1.OCIArtifact) *PluginBuilder
- func (b *PluginBuilder) WithPluginConfig(cfg *artifactv1alpha1.PluginConfig) *PluginBuilder
- func (b *PluginBuilder) WithSelector(selector *metav1.LabelSelector) *PluginBuilder
- type RoleBindingBuilder
- func (b *RoleBindingBuilder) AddSubject(subject rbacv1.Subject) *RoleBindingBuilder
- func (b *RoleBindingBuilder) Build() *rbacv1.RoleBinding
- func (b *RoleBindingBuilder) WithGenerateName(generateName string) *RoleBindingBuilder
- func (b *RoleBindingBuilder) WithLabels(labels map[string]string) *RoleBindingBuilder
- func (b *RoleBindingBuilder) WithName(name string) *RoleBindingBuilder
- func (b *RoleBindingBuilder) WithNamespace(namespace string) *RoleBindingBuilder
- func (b *RoleBindingBuilder) WithRoleRef(roleRef rbacv1.RoleRef) *RoleBindingBuilder
- type RoleBuilder
- func (b *RoleBuilder) AddRule(rule *rbacv1.PolicyRule) *RoleBuilder
- func (b *RoleBuilder) Build() *rbacv1.Role
- func (b *RoleBuilder) WithLabels(labels map[string]string) *RoleBuilder
- func (b *RoleBuilder) WithName(name string) *RoleBuilder
- func (b *RoleBuilder) WithNamespace(namespace string) *RoleBuilder
- type RulesfileBuilder
- func (b *RulesfileBuilder) Build() *artifactv1alpha1.Rulesfile
- func (b *RulesfileBuilder) WithConfigMapRef(ref *commonv1alpha1.ConfigMapRef) *RulesfileBuilder
- func (b *RulesfileBuilder) WithDeletionTimestamp(ts *metav1.Time) *RulesfileBuilder
- func (b *RulesfileBuilder) WithFinalizers(finalizers []string) *RulesfileBuilder
- func (b *RulesfileBuilder) WithGeneration(gen int64) *RulesfileBuilder
- func (b *RulesfileBuilder) WithInlineRules(rules *apiextensionsv1.JSON) *RulesfileBuilder
- func (b *RulesfileBuilder) WithLabels(labels map[string]string) *RulesfileBuilder
- func (b *RulesfileBuilder) WithName(name string) *RulesfileBuilder
- func (b *RulesfileBuilder) WithNamespace(namespace string) *RulesfileBuilder
- func (b *RulesfileBuilder) WithOCIArtifact(artifact commonv1alpha1.OCIArtifact) *RulesfileBuilder
- func (b *RulesfileBuilder) WithPriority(priority int32) *RulesfileBuilder
- func (b *RulesfileBuilder) WithSelector(selector *metav1.LabelSelector) *RulesfileBuilder
- type ServiceAccountBuilder
- func (b *ServiceAccountBuilder) Build() *corev1.ServiceAccount
- func (b *ServiceAccountBuilder) WithLabels(labels map[string]string) *ServiceAccountBuilder
- func (b *ServiceAccountBuilder) WithName(name string) *ServiceAccountBuilder
- func (b *ServiceAccountBuilder) WithNamespace(namespace string) *ServiceAccountBuilder
- type ServiceBuilder
- func (b *ServiceBuilder) AddPort(port *corev1.ServicePort) *ServiceBuilder
- func (b *ServiceBuilder) Build() *corev1.Service
- func (b *ServiceBuilder) WithLabels(labels map[string]string) *ServiceBuilder
- func (b *ServiceBuilder) WithName(name string) *ServiceBuilder
- func (b *ServiceBuilder) WithNamespace(namespace string) *ServiceBuilder
- func (b *ServiceBuilder) WithSelector(selector map[string]string) *ServiceBuilder
- func (b *ServiceBuilder) WithType(serviceType corev1.ServiceType) *ServiceBuilder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClusterRoleBindingBuilder ¶
type ClusterRoleBindingBuilder struct {
// contains filtered or unexported fields
}
ClusterRoleBindingBuilder provides a fluent API for constructing rbacv1.ClusterRoleBinding objects.
func NewClusterRoleBinding ¶
func NewClusterRoleBinding() *ClusterRoleBindingBuilder
NewClusterRoleBinding creates a ClusterRoleBindingBuilder with TypeMeta pre-populated.
func (*ClusterRoleBindingBuilder) AddSubject ¶
func (b *ClusterRoleBindingBuilder) AddSubject(subject rbacv1.Subject) *ClusterRoleBindingBuilder
AddSubject adds a subject.
func (*ClusterRoleBindingBuilder) Build ¶
func (b *ClusterRoleBindingBuilder) Build() *rbacv1.ClusterRoleBinding
Build returns the constructed ClusterRoleBinding object.
func (*ClusterRoleBindingBuilder) WithLabels ¶
func (b *ClusterRoleBindingBuilder) WithLabels(labels map[string]string) *ClusterRoleBindingBuilder
WithLabels sets the labels.
func (*ClusterRoleBindingBuilder) WithName ¶
func (b *ClusterRoleBindingBuilder) WithName(name string) *ClusterRoleBindingBuilder
WithName sets the name.
func (*ClusterRoleBindingBuilder) WithRoleRef ¶
func (b *ClusterRoleBindingBuilder) WithRoleRef(roleRef rbacv1.RoleRef) *ClusterRoleBindingBuilder
WithRoleRef sets the role reference.
type ClusterRoleBuilder ¶
type ClusterRoleBuilder struct {
// contains filtered or unexported fields
}
ClusterRoleBuilder provides a fluent API for constructing rbacv1.ClusterRole objects.
func NewClusterRole ¶
func NewClusterRole() *ClusterRoleBuilder
NewClusterRole creates a ClusterRoleBuilder with TypeMeta pre-populated.
func (*ClusterRoleBuilder) AddRule ¶
func (b *ClusterRoleBuilder) AddRule(rule *rbacv1.PolicyRule) *ClusterRoleBuilder
AddRule adds a policy rule.
func (*ClusterRoleBuilder) Build ¶
func (b *ClusterRoleBuilder) Build() *rbacv1.ClusterRole
Build returns the constructed ClusterRole object.
func (*ClusterRoleBuilder) WithLabels ¶
func (b *ClusterRoleBuilder) WithLabels(labels map[string]string) *ClusterRoleBuilder
WithLabels sets the labels.
func (*ClusterRoleBuilder) WithName ¶
func (b *ClusterRoleBuilder) WithName(name string) *ClusterRoleBuilder
WithName sets the name.
type ComponentBuilder ¶
type ComponentBuilder struct {
// contains filtered or unexported fields
}
ComponentBuilder provides a fluent API for constructing instancev1alpha1.Component objects.
func NewComponent ¶
func NewComponent() *ComponentBuilder
NewComponent creates a ComponentBuilder with no defaults.
func (*ComponentBuilder) Build ¶
func (b *ComponentBuilder) Build() *instancev1alpha1.Component
Build returns the constructed Component object.
func (*ComponentBuilder) WithComponentType ¶
func (b *ComponentBuilder) WithComponentType(ct instancev1alpha1.ComponentType) *ComponentBuilder
WithComponentType sets the component type.
func (*ComponentBuilder) WithDeletionTimestamp ¶
func (b *ComponentBuilder) WithDeletionTimestamp(ts *metav1.Time) *ComponentBuilder
WithDeletionTimestamp sets the deletion timestamp.
func (*ComponentBuilder) WithFinalizers ¶
func (b *ComponentBuilder) WithFinalizers(finalizers []string) *ComponentBuilder
WithFinalizers sets the finalizers.
func (*ComponentBuilder) WithImage ¶
func (b *ComponentBuilder) WithImage(containerName, image string) *ComponentBuilder
WithImage sets the container image.
func (*ComponentBuilder) WithLabels ¶
func (b *ComponentBuilder) WithLabels(labels map[string]string) *ComponentBuilder
WithLabels sets the labels.
func (*ComponentBuilder) WithName ¶
func (b *ComponentBuilder) WithName(name string) *ComponentBuilder
WithName sets the name.
func (*ComponentBuilder) WithNamespace ¶
func (b *ComponentBuilder) WithNamespace(namespace string) *ComponentBuilder
WithNamespace sets the namespace.
func (*ComponentBuilder) WithPodTemplateSpec ¶
func (b *ComponentBuilder) WithPodTemplateSpec(pts *corev1.PodTemplateSpec) *ComponentBuilder
WithPodTemplateSpec sets the pod template spec.
func (*ComponentBuilder) WithReplicas ¶
func (b *ComponentBuilder) WithReplicas(r int32) *ComponentBuilder
WithReplicas sets the replica count.
func (*ComponentBuilder) WithStrategy ¶
func (b *ComponentBuilder) WithStrategy(s appsv1.DeploymentStrategy) *ComponentBuilder
WithStrategy sets the deployment strategy.
func (*ComponentBuilder) WithVersion ¶
func (b *ComponentBuilder) WithVersion(v string) *ComponentBuilder
WithVersion sets the component version.
type ConfigBuilder ¶
type ConfigBuilder struct {
// contains filtered or unexported fields
}
ConfigBuilder provides a fluent API for constructing artifactv1alpha1.Config objects.
func NewConfig ¶
func NewConfig() *ConfigBuilder
NewConfig creates a ConfigBuilder with no defaults.
func (*ConfigBuilder) Build ¶
func (b *ConfigBuilder) Build() *artifactv1alpha1.Config
Build returns the constructed Config object.
func (*ConfigBuilder) WithConfig ¶
func (b *ConfigBuilder) WithConfig(cfg *apiextensionsv1.JSON) *ConfigBuilder
WithConfig sets the inline config JSON.
func (*ConfigBuilder) WithConfigMapRef ¶
func (b *ConfigBuilder) WithConfigMapRef(ref *commonv1alpha1.ConfigMapRef) *ConfigBuilder
WithConfigMapRef sets the ConfigMap reference.
func (*ConfigBuilder) WithDeletionTimestamp ¶
func (b *ConfigBuilder) WithDeletionTimestamp(ts *metav1.Time) *ConfigBuilder
WithDeletionTimestamp sets the deletion timestamp.
func (*ConfigBuilder) WithFinalizers ¶
func (b *ConfigBuilder) WithFinalizers(finalizers []string) *ConfigBuilder
WithFinalizers sets the finalizers.
func (*ConfigBuilder) WithGeneration ¶
func (b *ConfigBuilder) WithGeneration(gen int64) *ConfigBuilder
WithGeneration sets the generation.
func (*ConfigBuilder) WithLabels ¶
func (b *ConfigBuilder) WithLabels(labels map[string]string) *ConfigBuilder
WithLabels sets the labels.
func (*ConfigBuilder) WithName ¶
func (b *ConfigBuilder) WithName(name string) *ConfigBuilder
WithName sets the name.
func (*ConfigBuilder) WithNamespace ¶
func (b *ConfigBuilder) WithNamespace(namespace string) *ConfigBuilder
WithNamespace sets the namespace.
func (*ConfigBuilder) WithPriority ¶
func (b *ConfigBuilder) WithPriority(priority int32) *ConfigBuilder
WithPriority sets the priority.
func (*ConfigBuilder) WithSelector ¶
func (b *ConfigBuilder) WithSelector(selector *metav1.LabelSelector) *ConfigBuilder
WithSelector sets the label selector.
type ConfigMapBuilder ¶
type ConfigMapBuilder struct {
// contains filtered or unexported fields
}
ConfigMapBuilder provides a fluent API for constructing corev1.ConfigMap objects.
func NewConfigMap ¶
func NewConfigMap() *ConfigMapBuilder
NewConfigMap creates a ConfigMapBuilder with TypeMeta pre-populated.
func (*ConfigMapBuilder) Build ¶
func (b *ConfigMapBuilder) Build() *corev1.ConfigMap
Build returns the constructed ConfigMap object.
func (*ConfigMapBuilder) WithData ¶
func (b *ConfigMapBuilder) WithData(data map[string]string) *ConfigMapBuilder
WithData sets the data map.
func (*ConfigMapBuilder) WithDeletionTimestamp ¶
func (b *ConfigMapBuilder) WithDeletionTimestamp(ts *metav1.Time) *ConfigMapBuilder
WithDeletionTimestamp sets the deletion timestamp.
func (*ConfigMapBuilder) WithFinalizers ¶
func (b *ConfigMapBuilder) WithFinalizers(finalizers []string) *ConfigMapBuilder
WithFinalizers sets the finalizers.
func (*ConfigMapBuilder) WithLabels ¶
func (b *ConfigMapBuilder) WithLabels(labels map[string]string) *ConfigMapBuilder
WithLabels sets the labels.
func (*ConfigMapBuilder) WithName ¶
func (b *ConfigMapBuilder) WithName(name string) *ConfigMapBuilder
WithName sets the name.
func (*ConfigMapBuilder) WithNamespace ¶
func (b *ConfigMapBuilder) WithNamespace(namespace string) *ConfigMapBuilder
WithNamespace sets the namespace.
type DaemonSetBuilder ¶
type DaemonSetBuilder struct {
// contains filtered or unexported fields
}
DaemonSetBuilder provides a fluent API for constructing appsv1.DaemonSet objects.
func NewDaemonSet ¶
func NewDaemonSet() *DaemonSetBuilder
NewDaemonSet creates a DaemonSetBuilder with TypeMeta pre-populated.
func (*DaemonSetBuilder) AddContainer ¶
func (b *DaemonSetBuilder) AddContainer(container *corev1.Container) *DaemonSetBuilder
AddContainer adds a container to the pod spec.
func (*DaemonSetBuilder) AddInitContainer ¶
func (b *DaemonSetBuilder) AddInitContainer(container *corev1.Container) *DaemonSetBuilder
AddInitContainer adds an init container to the pod spec.
func (*DaemonSetBuilder) Build ¶
func (b *DaemonSetBuilder) Build() *appsv1.DaemonSet
Build returns the constructed DaemonSet object.
func (*DaemonSetBuilder) WithLabels ¶
func (b *DaemonSetBuilder) WithLabels(labels map[string]string) *DaemonSetBuilder
WithLabels sets the labels.
func (*DaemonSetBuilder) WithName ¶
func (b *DaemonSetBuilder) WithName(name string) *DaemonSetBuilder
WithName sets the name.
func (*DaemonSetBuilder) WithNamespace ¶
func (b *DaemonSetBuilder) WithNamespace(namespace string) *DaemonSetBuilder
WithNamespace sets the namespace.
func (*DaemonSetBuilder) WithPodSecurityContext ¶
func (b *DaemonSetBuilder) WithPodSecurityContext(sc *corev1.PodSecurityContext) *DaemonSetBuilder
WithPodSecurityContext sets the pod security context.
func (*DaemonSetBuilder) WithPodTemplateLabels ¶
func (b *DaemonSetBuilder) WithPodTemplateLabels(labels map[string]string) *DaemonSetBuilder
WithPodTemplateLabels sets the pod template labels.
func (*DaemonSetBuilder) WithSelector ¶
func (b *DaemonSetBuilder) WithSelector(matchLabels map[string]string) *DaemonSetBuilder
WithSelector sets the label selector.
func (*DaemonSetBuilder) WithServiceAccount ¶
func (b *DaemonSetBuilder) WithServiceAccount(name string) *DaemonSetBuilder
WithServiceAccount sets the service account name.
func (*DaemonSetBuilder) WithTolerations ¶
func (b *DaemonSetBuilder) WithTolerations(tolerations []corev1.Toleration) *DaemonSetBuilder
WithTolerations sets the pod tolerations.
func (*DaemonSetBuilder) WithUpdateStrategy ¶
func (b *DaemonSetBuilder) WithUpdateStrategy(strategy appsv1.DaemonSetUpdateStrategy) *DaemonSetBuilder
WithUpdateStrategy sets the update strategy.
func (*DaemonSetBuilder) WithVolumes ¶
func (b *DaemonSetBuilder) WithVolumes(volumes []corev1.Volume) *DaemonSetBuilder
WithVolumes sets the pod volumes.
type DeploymentBuilder ¶
type DeploymentBuilder struct {
// contains filtered or unexported fields
}
DeploymentBuilder provides a fluent API for constructing appsv1.Deployment objects.
func NewDeployment ¶
func NewDeployment() *DeploymentBuilder
NewDeployment creates a DeploymentBuilder with TypeMeta pre-populated.
func (*DeploymentBuilder) AddContainer ¶
func (b *DeploymentBuilder) AddContainer(container *corev1.Container) *DeploymentBuilder
AddContainer adds a container to the pod spec.
func (*DeploymentBuilder) AddInitContainer ¶
func (b *DeploymentBuilder) AddInitContainer(container *corev1.Container) *DeploymentBuilder
AddInitContainer adds an init container to the pod spec.
func (*DeploymentBuilder) Build ¶
func (b *DeploymentBuilder) Build() *appsv1.Deployment
Build returns the constructed Deployment object.
func (*DeploymentBuilder) WithLabels ¶
func (b *DeploymentBuilder) WithLabels(labels map[string]string) *DeploymentBuilder
WithLabels sets the labels.
func (*DeploymentBuilder) WithName ¶
func (b *DeploymentBuilder) WithName(name string) *DeploymentBuilder
WithName sets the name.
func (*DeploymentBuilder) WithNamespace ¶
func (b *DeploymentBuilder) WithNamespace(namespace string) *DeploymentBuilder
WithNamespace sets the namespace.
func (*DeploymentBuilder) WithPodSecurityContext ¶
func (b *DeploymentBuilder) WithPodSecurityContext(sc *corev1.PodSecurityContext) *DeploymentBuilder
WithPodSecurityContext sets the pod security context.
func (*DeploymentBuilder) WithPodTemplateLabels ¶
func (b *DeploymentBuilder) WithPodTemplateLabels(labels map[string]string) *DeploymentBuilder
WithPodTemplateLabels sets the pod template labels.
func (*DeploymentBuilder) WithReplicas ¶
func (b *DeploymentBuilder) WithReplicas(replicas *int32) *DeploymentBuilder
WithReplicas sets the replica count.
func (*DeploymentBuilder) WithSelector ¶
func (b *DeploymentBuilder) WithSelector(matchLabels map[string]string) *DeploymentBuilder
WithSelector sets the label selector.
func (*DeploymentBuilder) WithServiceAccount ¶
func (b *DeploymentBuilder) WithServiceAccount(name string) *DeploymentBuilder
WithServiceAccount sets the service account name.
func (*DeploymentBuilder) WithStrategy ¶
func (b *DeploymentBuilder) WithStrategy(strategy appsv1.DeploymentStrategy) *DeploymentBuilder
WithStrategy sets the deployment strategy.
func (*DeploymentBuilder) WithTolerations ¶
func (b *DeploymentBuilder) WithTolerations(tolerations []corev1.Toleration) *DeploymentBuilder
WithTolerations sets the pod tolerations.
func (*DeploymentBuilder) WithVolumes ¶
func (b *DeploymentBuilder) WithVolumes(volumes []corev1.Volume) *DeploymentBuilder
WithVolumes sets the pod volumes.
type FalcoBuilder ¶
type FalcoBuilder struct {
// contains filtered or unexported fields
}
FalcoBuilder provides a fluent API for constructing instancev1alpha1.Falco objects.
func (*FalcoBuilder) Build ¶
func (b *FalcoBuilder) Build() *instancev1alpha1.Falco
Build returns the constructed Falco object.
func (*FalcoBuilder) WithDeletionTimestamp ¶
func (b *FalcoBuilder) WithDeletionTimestamp(ts *metav1.Time) *FalcoBuilder
WithDeletionTimestamp sets the deletion timestamp.
func (*FalcoBuilder) WithFinalizers ¶
func (b *FalcoBuilder) WithFinalizers(finalizers []string) *FalcoBuilder
WithFinalizers sets the finalizers.
func (*FalcoBuilder) WithImage ¶
func (b *FalcoBuilder) WithImage(containerName, image string) *FalcoBuilder
WithImage sets the container image.
func (*FalcoBuilder) WithLabels ¶
func (b *FalcoBuilder) WithLabels(labels map[string]string) *FalcoBuilder
WithLabels sets the labels.
func (*FalcoBuilder) WithName ¶
func (b *FalcoBuilder) WithName(name string) *FalcoBuilder
WithName sets the name.
func (*FalcoBuilder) WithNamespace ¶
func (b *FalcoBuilder) WithNamespace(namespace string) *FalcoBuilder
WithNamespace sets the namespace.
func (*FalcoBuilder) WithPodTemplateSpec ¶
func (b *FalcoBuilder) WithPodTemplateSpec(pts *corev1.PodTemplateSpec) *FalcoBuilder
WithPodTemplateSpec sets the pod template spec.
func (*FalcoBuilder) WithReplicas ¶
func (b *FalcoBuilder) WithReplicas(r int32) *FalcoBuilder
WithReplicas sets the replica count.
func (*FalcoBuilder) WithStrategy ¶
func (b *FalcoBuilder) WithStrategy(s appsv1.DeploymentStrategy) *FalcoBuilder
WithStrategy sets the deployment strategy.
func (*FalcoBuilder) WithType ¶
func (b *FalcoBuilder) WithType(t string) *FalcoBuilder
WithType sets the Falco deployment type.
func (*FalcoBuilder) WithUpdateStrategy ¶
func (b *FalcoBuilder) WithUpdateStrategy(s appsv1.DaemonSetUpdateStrategy) *FalcoBuilder
WithUpdateStrategy sets the update strategy.
func (*FalcoBuilder) WithVersion ¶
func (b *FalcoBuilder) WithVersion(v string) *FalcoBuilder
WithVersion sets the Falco version.
type PluginBuilder ¶
type PluginBuilder struct {
// contains filtered or unexported fields
}
PluginBuilder provides a fluent API for constructing artifactv1alpha1.Plugin objects.
func NewPlugin ¶
func NewPlugin() *PluginBuilder
NewPlugin creates a PluginBuilder with no defaults.
func (*PluginBuilder) Build ¶
func (b *PluginBuilder) Build() *artifactv1alpha1.Plugin
Build returns the constructed Plugin object.
func (*PluginBuilder) WithDeletionTimestamp ¶
func (b *PluginBuilder) WithDeletionTimestamp(ts *metav1.Time) *PluginBuilder
WithDeletionTimestamp sets the deletion timestamp.
func (*PluginBuilder) WithFinalizers ¶
func (b *PluginBuilder) WithFinalizers(finalizers []string) *PluginBuilder
WithFinalizers sets the finalizers.
func (*PluginBuilder) WithGeneration ¶
func (b *PluginBuilder) WithGeneration(gen int64) *PluginBuilder
WithGeneration sets the generation.
func (*PluginBuilder) WithLabels ¶
func (b *PluginBuilder) WithLabels(labels map[string]string) *PluginBuilder
WithLabels sets the labels.
func (*PluginBuilder) WithName ¶
func (b *PluginBuilder) WithName(name string) *PluginBuilder
WithName sets the name.
func (*PluginBuilder) WithNamespace ¶
func (b *PluginBuilder) WithNamespace(namespace string) *PluginBuilder
WithNamespace sets the namespace.
func (*PluginBuilder) WithOCIArtifact ¶
func (b *PluginBuilder) WithOCIArtifact(artifact commonv1alpha1.OCIArtifact) *PluginBuilder
WithOCIArtifact sets the OCI artifact.
func (*PluginBuilder) WithPluginConfig ¶
func (b *PluginBuilder) WithPluginConfig(cfg *artifactv1alpha1.PluginConfig) *PluginBuilder
WithPluginConfig sets the plugin configuration.
func (*PluginBuilder) WithSelector ¶
func (b *PluginBuilder) WithSelector(selector *metav1.LabelSelector) *PluginBuilder
WithSelector sets the label selector.
type RoleBindingBuilder ¶
type RoleBindingBuilder struct {
// contains filtered or unexported fields
}
RoleBindingBuilder provides a fluent API for constructing rbacv1.RoleBinding objects.
func NewRoleBinding ¶
func NewRoleBinding() *RoleBindingBuilder
NewRoleBinding creates a RoleBindingBuilder with TypeMeta pre-populated.
func (*RoleBindingBuilder) AddSubject ¶
func (b *RoleBindingBuilder) AddSubject(subject rbacv1.Subject) *RoleBindingBuilder
AddSubject adds a subject.
func (*RoleBindingBuilder) Build ¶
func (b *RoleBindingBuilder) Build() *rbacv1.RoleBinding
Build returns the constructed RoleBinding object.
func (*RoleBindingBuilder) WithGenerateName ¶
func (b *RoleBindingBuilder) WithGenerateName(generateName string) *RoleBindingBuilder
WithGenerateName sets the generate name prefix.
func (*RoleBindingBuilder) WithLabels ¶
func (b *RoleBindingBuilder) WithLabels(labels map[string]string) *RoleBindingBuilder
WithLabels sets the labels.
func (*RoleBindingBuilder) WithName ¶
func (b *RoleBindingBuilder) WithName(name string) *RoleBindingBuilder
WithName sets the name.
func (*RoleBindingBuilder) WithNamespace ¶
func (b *RoleBindingBuilder) WithNamespace(namespace string) *RoleBindingBuilder
WithNamespace sets the namespace.
func (*RoleBindingBuilder) WithRoleRef ¶
func (b *RoleBindingBuilder) WithRoleRef(roleRef rbacv1.RoleRef) *RoleBindingBuilder
WithRoleRef sets the role reference.
type RoleBuilder ¶
type RoleBuilder struct {
// contains filtered or unexported fields
}
RoleBuilder provides a fluent API for constructing rbacv1.Role objects.
func NewRole ¶
func NewRole() *RoleBuilder
NewRole creates a RoleBuilder with TypeMeta pre-populated.
func (*RoleBuilder) AddRule ¶
func (b *RoleBuilder) AddRule(rule *rbacv1.PolicyRule) *RoleBuilder
AddRule adds a policy rule.
func (*RoleBuilder) Build ¶
func (b *RoleBuilder) Build() *rbacv1.Role
Build returns the constructed Role object.
func (*RoleBuilder) WithLabels ¶
func (b *RoleBuilder) WithLabels(labels map[string]string) *RoleBuilder
WithLabels sets the labels.
func (*RoleBuilder) WithName ¶
func (b *RoleBuilder) WithName(name string) *RoleBuilder
WithName sets the name.
func (*RoleBuilder) WithNamespace ¶
func (b *RoleBuilder) WithNamespace(namespace string) *RoleBuilder
WithNamespace sets the namespace.
type RulesfileBuilder ¶
type RulesfileBuilder struct {
// contains filtered or unexported fields
}
RulesfileBuilder provides a fluent API for constructing artifactv1alpha1.Rulesfile objects.
func NewRulesfile ¶
func NewRulesfile() *RulesfileBuilder
NewRulesfile creates a RulesfileBuilder with no defaults.
func (*RulesfileBuilder) Build ¶
func (b *RulesfileBuilder) Build() *artifactv1alpha1.Rulesfile
Build returns the constructed Rulesfile object.
func (*RulesfileBuilder) WithConfigMapRef ¶
func (b *RulesfileBuilder) WithConfigMapRef(ref *commonv1alpha1.ConfigMapRef) *RulesfileBuilder
WithConfigMapRef sets the ConfigMap reference.
func (*RulesfileBuilder) WithDeletionTimestamp ¶
func (b *RulesfileBuilder) WithDeletionTimestamp(ts *metav1.Time) *RulesfileBuilder
WithDeletionTimestamp sets the deletion timestamp.
func (*RulesfileBuilder) WithFinalizers ¶
func (b *RulesfileBuilder) WithFinalizers(finalizers []string) *RulesfileBuilder
WithFinalizers sets the finalizers.
func (*RulesfileBuilder) WithGeneration ¶
func (b *RulesfileBuilder) WithGeneration(gen int64) *RulesfileBuilder
WithGeneration sets the generation.
func (*RulesfileBuilder) WithInlineRules ¶
func (b *RulesfileBuilder) WithInlineRules(rules *apiextensionsv1.JSON) *RulesfileBuilder
WithInlineRules sets the inline rules content.
func (*RulesfileBuilder) WithLabels ¶
func (b *RulesfileBuilder) WithLabels(labels map[string]string) *RulesfileBuilder
WithLabels sets the labels.
func (*RulesfileBuilder) WithName ¶
func (b *RulesfileBuilder) WithName(name string) *RulesfileBuilder
WithName sets the name.
func (*RulesfileBuilder) WithNamespace ¶
func (b *RulesfileBuilder) WithNamespace(namespace string) *RulesfileBuilder
WithNamespace sets the namespace.
func (*RulesfileBuilder) WithOCIArtifact ¶
func (b *RulesfileBuilder) WithOCIArtifact(artifact commonv1alpha1.OCIArtifact) *RulesfileBuilder
WithOCIArtifact sets the OCI artifact.
func (*RulesfileBuilder) WithPriority ¶
func (b *RulesfileBuilder) WithPriority(priority int32) *RulesfileBuilder
WithPriority sets the priority.
func (*RulesfileBuilder) WithSelector ¶
func (b *RulesfileBuilder) WithSelector(selector *metav1.LabelSelector) *RulesfileBuilder
WithSelector sets the label selector.
type ServiceAccountBuilder ¶
type ServiceAccountBuilder struct {
// contains filtered or unexported fields
}
ServiceAccountBuilder provides a fluent API for constructing corev1.ServiceAccount objects.
func NewServiceAccount ¶
func NewServiceAccount() *ServiceAccountBuilder
NewServiceAccount creates a ServiceAccountBuilder with TypeMeta pre-populated.
func (*ServiceAccountBuilder) Build ¶
func (b *ServiceAccountBuilder) Build() *corev1.ServiceAccount
Build returns the constructed ServiceAccount object.
func (*ServiceAccountBuilder) WithLabels ¶
func (b *ServiceAccountBuilder) WithLabels(labels map[string]string) *ServiceAccountBuilder
WithLabels sets the labels.
func (*ServiceAccountBuilder) WithName ¶
func (b *ServiceAccountBuilder) WithName(name string) *ServiceAccountBuilder
WithName sets the name.
func (*ServiceAccountBuilder) WithNamespace ¶
func (b *ServiceAccountBuilder) WithNamespace(namespace string) *ServiceAccountBuilder
WithNamespace sets the namespace.
type ServiceBuilder ¶
type ServiceBuilder struct {
// contains filtered or unexported fields
}
ServiceBuilder provides a fluent API for constructing corev1.Service objects.
func NewService ¶
func NewService() *ServiceBuilder
NewService creates a ServiceBuilder with TypeMeta pre-populated.
func (*ServiceBuilder) AddPort ¶
func (b *ServiceBuilder) AddPort(port *corev1.ServicePort) *ServiceBuilder
AddPort adds a service port.
func (*ServiceBuilder) Build ¶
func (b *ServiceBuilder) Build() *corev1.Service
Build returns the constructed Service object.
func (*ServiceBuilder) WithLabels ¶
func (b *ServiceBuilder) WithLabels(labels map[string]string) *ServiceBuilder
WithLabels sets the labels.
func (*ServiceBuilder) WithName ¶
func (b *ServiceBuilder) WithName(name string) *ServiceBuilder
WithName sets the name.
func (*ServiceBuilder) WithNamespace ¶
func (b *ServiceBuilder) WithNamespace(namespace string) *ServiceBuilder
WithNamespace sets the namespace.
func (*ServiceBuilder) WithSelector ¶
func (b *ServiceBuilder) WithSelector(selector map[string]string) *ServiceBuilder
WithSelector sets the label selector.
func (*ServiceBuilder) WithType ¶
func (b *ServiceBuilder) WithType(serviceType corev1.ServiceType) *ServiceBuilder
WithType sets the service type.