helper

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: May 28, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewConstraintsPolicyWithSingleCRD added in v0.5.0

func NewConstraintsPolicyWithSingleCRD(name string, crd *apiextensionsv1.CustomResourceDefinition, maxGroups, minGroups int, clusterLabels map[string]string) *policyv1alpha1.ClusterPropagationPolicy

NewConstraintsPolicyWithSingleCRD will build a ClusterPropagationPolicy object with specified label and group constraints.

func NewCustomResource added in v0.5.0

func NewCustomResource(apiVersion, kind, namespace, name string) *unstructured.Unstructured

NewCustomResource will build a CR object with CRD Foo.

func NewCustomResourceDefinition added in v0.5.0

NewCustomResourceDefinition will build a CRD object.

func NewDeployment

func NewDeployment(namespace string, name string) *appsv1.Deployment

NewDeployment will build a deployment object.

func NewImageOverriderWithEmptyPredicate added in v0.6.0

func NewImageOverriderWithEmptyPredicate() policyv1alpha1.Overriders

NewImageOverriderWithEmptyPredicate will build a Overriders object with empty predicate.

func NewImageOverriderWithPredicate added in v0.6.0

func NewImageOverriderWithPredicate() policyv1alpha1.Overriders

NewImageOverriderWithPredicate will build a Overriders object with predicate.

func NewNamespace

func NewNamespace(namespace string) *corev1.Namespace

NewNamespace will build a Namespace object.

func NewOverridePolicyWithDeployment added in v0.6.0

func NewOverridePolicyWithDeployment(namespace, name string, deployment *appsv1.Deployment, clusters []string, overriders policyv1alpha1.Overriders) *policyv1alpha1.OverridePolicy

NewOverridePolicyWithDeployment will build a OverridePolicy object that select with Deployment resource.

func NewOverridePolicyWithPod added in v0.6.0

func NewOverridePolicyWithPod(namespace, name string, pod *corev1.Pod, clusters []string, overriders policyv1alpha1.Overriders) *policyv1alpha1.OverridePolicy

NewOverridePolicyWithPod will build a OverridePolicy object that select with Pod resource.

func NewPod added in v0.4.0

func NewPod(namespace string, name string) *corev1.Pod

NewPod will build a service object.

func NewPolicyWithClusterToleration added in v0.6.0

func NewPolicyWithClusterToleration(namespace, name string, deployment *appsv1.Deployment, clusters []string, clusterTolerations []corev1.Toleration) *policyv1alpha1.PropagationPolicy

NewPolicyWithClusterToleration will build a PropagationPolicy object.

func NewPolicyWithFieldSelector added in v0.6.0

func NewPolicyWithFieldSelector(namespace, name string, deployment *appsv1.Deployment, clusters []string, filedSelector *policyv1alpha1.FieldSelector) *policyv1alpha1.PropagationPolicy

NewPolicyWithFieldSelector will build a PropagationPolicy object.

func NewPolicyWithGroupsDeployment added in v0.5.0

func NewPolicyWithGroupsDeployment(namespace, name string, deployment *appsv1.Deployment, maxGroups, minGroups int, clusterLabels map[string]string) *policyv1alpha1.PropagationPolicy

NewPolicyWithGroupsDeployment will build a PropagationPolicy object.

func NewPolicyWithSingleCR added in v0.5.0

func NewPolicyWithSingleCR(namespace, name, crAPIVersion, crKind, crName string, clusters []string) *policyv1alpha1.PropagationPolicy

NewPolicyWithSingleCR will build a PropagationPolicy object.

func NewPolicyWithSingleCRD added in v0.5.0

func NewPolicyWithSingleCRD(name string, crd *apiextensionsv1.CustomResourceDefinition, clusters []string) *policyv1alpha1.ClusterPropagationPolicy

NewPolicyWithSingleCRD will build a ClusterPropagationPolicy object.

func NewPolicyWithSingleDeployment

func NewPolicyWithSingleDeployment(namespace, name string, deployment *appsv1.Deployment, clusters []string) *policyv1alpha1.PropagationPolicy

NewPolicyWithSingleDeployment will build a PropagationPolicy object.

func NewPolicyWithSinglePod added in v0.4.0

func NewPolicyWithSinglePod(namespace, name string, pod *corev1.Pod, clusters []string) *policyv1alpha1.PropagationPolicy

NewPolicyWithSinglePod will build a PropagationPolicy object.

func NewPolicyWithSingleService added in v0.4.0

func NewPolicyWithSingleService(namespace, name string, service *corev1.Service, clusters []string) *policyv1alpha1.PropagationPolicy

NewPolicyWithSingleService will build a PropagationPolicy object.

func NewService added in v0.4.0

func NewService(namespace string, name string) *corev1.Service

NewService will build a service object.

Types

This section is empty.

Jump to

Keyboard shortcuts

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