vpc

package
v0.1.24 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2023 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KeyTargetImageName = "TARGET_IMAGE_NAME"
	KeyTargetProfile   = "TARGET_PROFILE"
	KeySubnetID        = "TARGET_SUBNET_ID"
	DefaultProfileName = "bz2e-2x8"
	ServicePrefix      = "k8s-operator-hpcr"
)

Variables

View Source
var TagPrefix = strings.ReplaceAll(ServicePrefix, "-", "_")

Functions

func CreateControllerCustomizeRoute

func CreateControllerCustomizeRoute() gin.HandlerFunc

func CreateControllerFinalizeRoute

func CreateControllerFinalizeRoute() gin.HandlerFunc

func CreateControllerSyncRoute

func CreateControllerSyncRoute() gin.HandlerFunc

func CreateFinalizeAction

func CreateFinalizeAction(service *vpcv1.VpcV1, opt *InstanceOptions) (*common.ResourceStatus, error)

func CreatePingRoute

func CreatePingRoute(version, compileTime string) gin.HandlerFunc

func CreateSyncAction

func CreateSyncAction(vpcSvc *vpcv1.VpcV1, taggingSvc *globaltaggingv1.GlobalTaggingV1, opt *InstanceOptions) (*common.ResourceStatus, error)

func CreateVpcInstanceOptions

func CreateVpcInstanceOptions(opt *InstanceOptions) (*vpcv1.CreateInstanceOptions, error)

func InstanceNameFromUID

func InstanceNameFromUID(uid types.UID) string

Types

type CustomResource

type CustomResource struct {
	metav1.TypeMeta `json:",inline"`
	// Standard object's metadata.
	// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
	// +optional
	metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
	// Specification of the desired behavior of the pod.
	// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
	// +optional
	Spec CustomResourceSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
}

type CustomResourceSpec

type CustomResourceSpec struct {
	Contract    string  `json:"contract"`
	SubnetID    *string `json:"subnetID"`
	ProfileName *string `json:"profileName"`
	// specification of the associated config maps
	TargetSelector *metav1.LabelSelector `json:"targetSelector"`
}

type InstanceConfigResource

type InstanceConfigResource struct {
	Parent CustomResource `json:"parent"`
}

type InstanceOptions

type InstanceOptions struct {
	Name        string `json:"name"`
	VpcID       string `json:"vpcID"`
	ProfileName string `json:"profileName"`
	ImageID     string `json:"imageID"`
	ZoneName    string `json:"zone"`
	SubnetID    string `json:"subnetID"`
	UserData    string `json:"userData"`
}

func InstanceOptionsFromConfigMap

func InstanceOptionsFromConfigMap(service *vpcv1.VpcV1, data *InstanceConfigResource, envMap env.Environment) (*InstanceOptions, error)

type RuntimeConfig added in v0.0.5

type RuntimeConfig struct {
	Authenticator core.Authenticator
	Service       *vpcv1.VpcV1
	Options       *InstanceOptions
	Env           E.Environment
}

Jump to

Keyboard shortcuts

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