Documentation ¶
Index ¶
- Constants
- Variables
- func CompileEnvironmentVariables(allEnv []corev1.EnvVar, operatorEnv map[string]string) []corev1.EnvVar
- func ConfigMapName(trench *meridiov1alpha1.Trench) string
- func FEServiceAccountName() string
- func GetContainerResourceRequirements(containerName, templateName string) (*corev1.ResourceRequirements, error)
- func GetDaemonsetModel(f string) (*appsv1.DaemonSet, error)
- func GetDeploymentModel(f string) (*appsv1.Deployment, error)
- func GetExternalInterfaceName(attractor *meridiov1alpha1.Attractor) string
- func GetIPFamily(cr *meridiov1alpha1.Trench) string
- func GetImagePullSecrets() []corev1.LocalObjectReference
- func GetLoadBalancerSysCtl(cr *meridiov1alpha1.Trench) string
- func GetLogLevel() string
- func GetNSMRegistryService() string
- func GetPodDisruptionBudgetModel(f string) (*policyv1.PodDisruptionBudget, error)
- func GetPodDisruptionBudgetVersion(client client.Client) (string, error)
- func GetPrefixedName(resourceName string) string
- func GetProbe(timer probeTimer, command []string) *corev1.Probe
- func GetProbeCommand(spiffe bool, addr, svc string) []string
- func GetProxySysCtl(cr *meridiov1alpha1.Trench) string
- func GetResourceRequirementAnnotation(from *metav1.ObjectMeta) (string, bool)
- func GetRoleBindingModel(f string) (*rbacv1.RoleBinding, error)
- func GetRoleModel(f string) (*rbacv1.Role, error)
- func GetServiceAccountModel(f string) (*corev1.ServiceAccount, error)
- func GetServiceModel(f string) (*corev1.Service, error)
- func GetStatefulSetModel(f string) (*appsv1.StatefulSet, error)
- func GetSuffixedName(resourceName, suffix string) string
- func GetTrenchBySelector(e *Executor, selector client.ObjectKey) (*meridiov1alpha1.Trench, error)
- func IPAMServiceName(trench *meridiov1alpha1.Trench) string
- func IPAMServiceWithPort(cr *meridiov1alpha1.Trench) string
- func IPAMStatefulSetName(trench *meridiov1alpha1.Trench) string
- func LbFeDeploymentName(attractor *meridiov1alpha1.Attractor) string
- func LoadBalancerNsName(conduit, trench, namespace string) string
- func NSEDeploymentName(attractor *meridiov1alpha1.Attractor) string
- func NSPServiceAccountName() string
- func NSPServiceName(trench *meridiov1alpha1.Trench) string
- func NSPServiceWithPort(cr *meridiov1alpha1.Trench) string
- func NSPStatefulSetName(trench *meridiov1alpha1.Trench) string
- func NsName(meta metav1.ObjectMeta) string
- func PDBName(attractir *meridiov1alpha1.Attractor) string
- func PdbV1Beta1ToV1(pdb *policyv1beta1.PodDisruptionBudget) *policyv1.PodDisruptionBudget
- func PdbV1ToV1Beta1(pdb *policyv1.PodDisruptionBudget) *policyv1beta1.PodDisruptionBudget
- func ProxyDeploymentName(conduit *meridiov1alpha1.Conduit) string
- func ProxyNtwkSvcNsName(cr *meridiov1alpha1.Conduit) string
- func SetContainerResourceRequirements(from *metav1.ObjectMeta, container *corev1.Container) error
- func SetResourceRequirementAnnotation(from *metav1.ObjectMeta, into *metav1.ObjectMeta)
- func VlanNtwkSvcName(attractorCr *meridiov1alpha1.Attractor, trenchCr *meridiov1alpha1.Trench) string
- type Action
- type Executions
- type Executor
- func (e *Executor) AddCreateAction(obj client.Object)
- func (e *Executor) AddUpdateAction(obj client.Object)
- func (e *Executor) AddUpdateStatusAction(obj client.Object)
- func (e *Executor) GetObject(selector client.ObjectKey, obj client.Object) error
- func (e *Executor) GetOwner() client.Object
- func (e *Executor) ListObject(obj client.ObjectList, opts ...client.ListOption) error
- func (e *Executor) LogError(err error, msg string)
- func (e *Executor) LogInfo(msg string)
- func (e *Executor) RunActions() error
- func (e *Executor) SetControllerReference(obj client.Object) error
- func (e *Executor) SetOwner(cr client.Object)
- func (e *Executor) SetOwnerReference(obj client.Object, owners ...client.Object) error
- type NamedResourceRequirements
- type ResourceRequirementTemplates
Constants ¶
View Source
const ( ResourceNamePrefixEnv = "RESOURCE_NAME_PREFIX" ImagePullSecretEnv = "IMAGE_PULL_SECRET" NSMRegistryServiceEnv = "NSM_REGISTRY_SERVICE" LogLevelEnv = "LOG_LEVEL" NspServiceAccountEnv = "NSP_SERVICE_ACCOUNT" FeServiceAccountEnv = "FE_SERVICE_ACCOUNT" Registry = "registry.nordix.org" Organization = "cloud-native/meridio" OrganizationNsm = "cloud-native/nsm" Tag = "latest" BusyboxImage = "busybox" BusyboxTag = "1.29" SubnetPoolIpv4 = "172.16.0.0/16" SubnetPoolIpv6 = "fd00::/48" ConduitPrefixLengthIpv4 = "20" ConduitPrefixLengthIpv6 = "56" NodePrefixLengthIpv4 = "24" NodePrefixLengthIpv6 = "64" NspPort = 7778 NspTargetPort = 7778 IpamPort = 7777 IpamTargetPort = 7777 VlanNsePort = 5003 IpamSvcName = "ipam-service" NspSvcName = "nsp-service" PodDisruptionBudgetName = "pdb" LBName = "stateless-lb-frontend" ProxyName = "proxy" IpamName = "ipam" NseName = "nse-vlan" NspName = "nsp" NspServiceAccountName = "meridio-sa" CMName = "meridio-configuration" NetworkServiceName = "external-vlan" ResourceRequirementKey = "resource-template" ResourceRequirementTemplatePath = "template/resource" )
Variables ¶
View Source
var ( LivenessTimer = probeTimer{ // contains filtered or unexported fields } ReadinessTimer = probeTimer{ // contains filtered or unexported fields } StartUpTimer = probeTimer{ // contains filtered or unexported fields } )
Functions ¶
func ConfigMapName ¶
func ConfigMapName(trench *meridiov1alpha1.Trench) string
func FEServiceAccountName ¶
func FEServiceAccountName() string
func GetContainerResourceRequirements ¶
func GetContainerResourceRequirements(containerName, templateName string) (*corev1.ResourceRequirements, error)
GetContainerResourceRequirements - Reads and searches template resource requirements for container. (A template resource requirement with param 'templateName' must exist for a match)
func GetDeploymentModel ¶
func GetDeploymentModel(f string) (*appsv1.Deployment, error)
func GetExternalInterfaceName ¶
func GetExternalInterfaceName(attractor *meridiov1alpha1.Attractor) string
func GetIPFamily ¶
func GetIPFamily(cr *meridiov1alpha1.Trench) string
func GetImagePullSecrets ¶
func GetImagePullSecrets() []corev1.LocalObjectReference
func GetLoadBalancerSysCtl ¶
func GetLoadBalancerSysCtl(cr *meridiov1alpha1.Trench) string
func GetLogLevel ¶
func GetLogLevel() string
func GetNSMRegistryService ¶
func GetNSMRegistryService() string
func GetPodDisruptionBudgetModel ¶
func GetPodDisruptionBudgetModel(f string) (*policyv1.PodDisruptionBudget, error)
func GetPrefixedName ¶
func GetProbeCommand ¶
func GetProxySysCtl ¶
func GetProxySysCtl(cr *meridiov1alpha1.Trench) string
func GetResourceRequirementAnnotation ¶
func GetResourceRequirementAnnotation(from *metav1.ObjectMeta) (string, bool)
GetResourceRequirementAnnotation - Gets ResourceRequirementKey annotation based on param 'from'
func GetRoleBindingModel ¶
func GetRoleBindingModel(f string) (*rbacv1.RoleBinding, error)
func GetServiceAccountModel ¶
func GetServiceAccountModel(f string) (*corev1.ServiceAccount, error)
func GetStatefulSetModel ¶
func GetStatefulSetModel(f string) (*appsv1.StatefulSet, error)
func GetSuffixedName ¶
func GetTrenchBySelector ¶
func IPAMServiceName ¶
func IPAMServiceName(trench *meridiov1alpha1.Trench) string
func IPAMServiceWithPort ¶
func IPAMServiceWithPort(cr *meridiov1alpha1.Trench) string
func IPAMStatefulSetName ¶
func IPAMStatefulSetName(trench *meridiov1alpha1.Trench) string
func LbFeDeploymentName ¶
func LbFeDeploymentName(attractor *meridiov1alpha1.Attractor) string
func LoadBalancerNsName ¶
func NSEDeploymentName ¶
func NSEDeploymentName(attractor *meridiov1alpha1.Attractor) string
func NSPServiceAccountName ¶
func NSPServiceAccountName() string
func NSPServiceName ¶
func NSPServiceName(trench *meridiov1alpha1.Trench) string
func NSPServiceWithPort ¶
func NSPServiceWithPort(cr *meridiov1alpha1.Trench) string
func NSPStatefulSetName ¶
func NSPStatefulSetName(trench *meridiov1alpha1.Trench) string
func NsName ¶
func NsName(meta metav1.ObjectMeta) string
func PDBName ¶
func PDBName(attractir *meridiov1alpha1.Attractor) string
func PdbV1Beta1ToV1 ¶
func PdbV1Beta1ToV1(pdb *policyv1beta1.PodDisruptionBudget) *policyv1.PodDisruptionBudget
func PdbV1ToV1Beta1 ¶
func PdbV1ToV1Beta1(pdb *policyv1.PodDisruptionBudget) *policyv1beta1.PodDisruptionBudget
func ProxyDeploymentName ¶
func ProxyDeploymentName(conduit *meridiov1alpha1.Conduit) string
func ProxyNtwkSvcNsName ¶
func ProxyNtwkSvcNsName(cr *meridiov1alpha1.Conduit) string
func SetContainerResourceRequirements ¶
func SetContainerResourceRequirements(from *metav1.ObjectMeta, container *corev1.Container) error
SetContainerResourceRequirements - Finds and sets resource requirements for container.
func SetResourceRequirementAnnotation ¶
func SetResourceRequirementAnnotation(from *metav1.ObjectMeta, into *metav1.ObjectMeta)
SetResourceRequirementAnnotation - Sets ResourceRequirementKey annotation based on param 'from'.
func VlanNtwkSvcName ¶
func VlanNtwkSvcName(attractorCr *meridiov1alpha1.Attractor, trenchCr *meridiov1alpha1.Trench) string
Types ¶
type Action ¶
func AppendActions ¶
type Executions ¶
type Executor ¶
type Executor struct {
// contains filtered or unexported fields
}
func NewExecutor ¶
func (*Executor) AddCreateAction ¶
func (*Executor) AddUpdateAction ¶
func (*Executor) AddUpdateStatusAction ¶
func (*Executor) ListObject ¶
func (e *Executor) ListObject(obj client.ObjectList, opts ...client.ListOption) error
func (*Executor) RunActions ¶
func (*Executor) SetControllerReference ¶
type NamedResourceRequirements ¶
type NamedResourceRequirements struct { Name string `json:"name" protobuf:"bytes,1,opt,name=name"` Resources corev1.ResourceRequirements `json:"resources,omitempty" protobuf:"bytes,2,opt,name=resources"` }
type ResourceRequirementTemplates ¶
type ResourceRequirementTemplates struct {
Templates []NamedResourceRequirements `json:"templates,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,1,rep,name=templates"`
}
ResourceRequirementTemplates - Describes the data layout of a resource requirement template file
Click to show internal directories.
Click to hide internal directories.