Documentation ¶
Index ¶
- Constants
- Variables
- func AppInstBeingDeleted(inst *edgeproto.AppInst) bool
- func AppInstToClusterDeployment(deployment string) string
- func AuditStreamInterceptor(srv interface{}, stream grpc.ServerStream, info *grpc.StreamServerInfo, ...) error
- func AuditUnaryInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, ...) (interface{}, error)
- func AutoProvAppInstGoingOnline(appInst *edgeproto.AppInst, cloudletInfo *edgeproto.CloudletInfo, ...) bool
- func AutoProvAppInstOnline(appInst *edgeproto.AppInst, cloudletInfo *edgeproto.CloudletInfo, ...) bool
- func AutoProvCloudletInfoOnline(cloudletInfo *edgeproto.CloudletInfo) bool
- func AutoProvCloudletOnline(cloudlet *edgeproto.Cloudlet) bool
- func BuildReservableClusterName(id int, cloudletKey *edgeproto.CloudletKey) string
- func CheckFQDNLengths(prefix, uri string) error
- func CidrContainsCidr(n1, n2 *net.IPNet) bool
- func CloudletResourceUsageAlerts(ctx context.Context, key *edgeproto.CloudletKey, warnings []string) []edgeproto.Alert
- func DecodeDockerComposeYaml(manifest string) (map[string]DockerContainer, error)
- func DecodeK8SYaml(manifest string) ([]runtime.Object, []*schema.GroupVersionKind, error)
- func DeleteAppSecretVars(ctx context.Context, region string, appKey *edgeproto.AppKey, ...) error
- func DeleteFile(filePath string) error
- func DeleteSecretVars(ctx context.Context, path string, vaultConfig *vault.Config) error
- func DownloadFile(ctx context.Context, authApi RegistryAuthApi, ...) (reterr error)
- func FormatDuration(dur time.Duration, digIdx int) string
- func FqdnPrefix(svcName string) string
- func GRPCErrorUnwrap(err error) error
- func GenerateManifest(app *edgeproto.App) (string, error)
- func GetAppClientType(app *edgeproto.App) string
- func GetAppDeploymentManifest(ctx context.Context, authApi RegistryAuthApi, app *edgeproto.App) (string, error)
- func GetAppInstCloudletScopedName(appInst *edgeproto.AppInst) string
- func GetAppInstCompatibilityVersion() uint32
- func GetAppSecretVars(ctx context.Context, region string, appKey *edgeproto.AppKey, ...) (map[string]string, error)
- func GetArtifactOrgPath(org, path string) string
- func GetArtifactPullPath(addr, org, path string) string
- func GetArtifactStoragePath(addr, org, path string) string
- func GetAuthToken(ctx context.Context, host string, authApi RegistryAuthApi, userName string) (string, error)
- func GetAutoProvAppInstKey(appKey *edgeproto.AppKey, cloudletKey *edgeproto.CloudletKey) edgeproto.AppInstKey
- func GetAvailablePort(ipaddr string) (string, error)
- func GetCRMCompatibilityVersion() uint32
- func GetCertsDirAndFiles(pwd string) (string, string, string)
- func GetCloudletE2EPublicCert(ctx context.Context, commonName string) (*vault.PublicCert, error)
- func GetCloudletKeyHash(key *edgeproto.CloudletKey) string
- func GetCloudletResourceUsageMeasurement(pfType string) string
- func GetClusterInstCloudletScopedName(clusterInst *edgeproto.ClusterInst) string
- func GetClusterInstCompatibilityVersion() uint32
- func GetClusterInstVMRequirements(ctx context.Context, clusterInst *edgeproto.ClusterInst, ...) ([]edgeproto.VMResource, error)
- func GetCommonResourceQuotaProps(additionalResources ...string) []edgeproto.InfraResource
- func GetDefaultClustKey(cloudletKey edgeproto.CloudletKey, ownerOrg string) *edgeproto.ClusterKey
- func GetDefaultDeploymentType(imageType edgeproto.ImageType) (string, error)
- func GetDefaultMTClustKey(cloudletKey edgeproto.CloudletKey) *edgeproto.ClusterKey
- func GetDeploymentManifest(ctx context.Context, authApi RegistryAuthApi, manifest string) (string, error)
- func GetDockerBaseImageVersion() (string, error)
- func GetDockerDeployType(manifest string) string
- func GetDockerImageChecksum(ctx context.Context, imagePath string, auth *RegistryAuth) (string, error)
- func GetFileName(fileUrlPath string) (string, error)
- func GetFileNameWithExt(fileUrlPath string) (string, error)
- func GetGPUDriverBuildStoragePath(key *edgeproto.GPUDriverKey, region, buildName, ext string) (string, error)
- func GetGPUDriverLicenseCloudletStoragePath(key *edgeproto.GPUDriverKey, region string, cloudletKey *edgeproto.CloudletKey) (string, error)
- func GetGPUDriverLicenseStoragePath(key *edgeproto.GPUDriverKey, region string) (string, error)
- func GetGPUDriverStoragePath(key *edgeproto.GPUDriverKey, region string) (string, error)
- func GetImageTypeForDeployment(deployment string) (edgeproto.ImageType, error)
- func GetInfluxSelectFields(selectors []string) string
- func GetK8sAppRequirements(ctx context.Context, app *edgeproto.App) ([]edgeproto.VMResource, error)
- func GetMappedAccessType(accessType edgeproto.AccessType, deployment, deploymentManifest string) (edgeproto.AccessType, error)
- func GetQueryArgsFromObj(obj interface{}) (string, error)
- func GetRegistryAuthToken(ctx context.Context, host string, authApi RegistryAuthApi) (string, error)
- func GetRemoteManifest(ctx context.Context, authApi RegistryAuthApi, target string) (string, error)
- func GetRemoteManifestToFile(ctx context.Context, authApi RegistryAuthApi, target string, filename string) error
- func GetRemoteZipDockerManifests(ctx context.Context, authApi RegistryAuthApi, ...) ([]map[string]DockerContainer, error)
- func GetRootLBFQDNOld(key *edgeproto.CloudletKey, domain string) string
- func GetRootLBFQDNWildcard(cloudlet *edgeproto.Cloudlet) string
- func GetSecretVars(ctx context.Context, path string, vaultConfig *vault.Config) (map[string]string, error)
- func GetSeverityForAlert(alertname string) string
- func GetSideCarAppFilter() *edgeproto.App
- func GetTimeout(cLen int) time.Duration
- func GetVMAppRequirements(ctx context.Context, app *edgeproto.App, appInst *edgeproto.AppInst, ...) ([]edgeproto.VMResource, error)
- func GetValidAlertSeverityString() string
- func GrpcCreds(cfg *ctls.Config) grpc.ServerOption
- func GrpcGateway(cfg *GrpcGWConfig) (http.Handler, error)
- func GrpcGatewayServe(server *http.Server, tlsCertFile string)
- func Hostname() string
- func IsAlertSeverityValid(severity string) bool
- func IsAppInstBeingCreatedError(err error) bool
- func IsAppInstBeingDeletedError(err error) bool
- func IsClusterInstReqd(app *edgeproto.App) bool
- func IsDefaultClustKey(clusterKey edgeproto.ClusterKey, cloudletKey edgeproto.CloudletKey) bool
- func IsGPUFlavor(flavor *edgeproto.Flavor) (bool, int)
- func IsInternalAlert(labels map[string]string) bool
- func IsLBNode(nodeTypeStr string) bool
- func IsLabelInternal(label string) bool
- func IsMonitoredAlert(labels map[string]string) bool
- func IsPlatformApp(devname string, appname string) bool
- func IsPlatformNode(nodeTypeStr string) bool
- func IsSideCarApp(app *edgeproto.App) bool
- func IsValidDeploymentForImage(imageType edgeproto.ImageType, deployment string) bool
- func IsValidDeploymentManifest(deploymentType, command, manifest string, ports []dme.AppPort, ...) error
- func IsValidDeploymentManifestForFlavor(deploymentType, manifest string, flavor *edgeproto.Flavor) error
- func IsValidDeploymentType(DeploymentType string, validDeployments []string) bool
- func LookupDNS(name string) (string, error)
- func Md5SumFile(filePath string) (string, error)
- func Md5SumStr(data string) string
- func ParseGPUResource(resStr string) (string, string, int, error)
- func ParseGrpcMethod(method string) (path string, cmd string)
- func ParseHost(hostOrURL string) (string, string, error)
- func ParseMyCloudletKey(standalone bool, keystr *string, mykey *edgeproto.CloudletKey)
- func ParseReservableClusterName(name string) (int, string, error)
- func RedactSecretVars(vars map[string]string) map[string]string
- func SaveAppSecretVars(ctx context.Context, region string, appKey *edgeproto.AppKey, ...) error
- func SaveSecretVars(ctx context.Context, path string, vaultConfig *vault.Config, ...) error
- func SendHTTPReq(ctx context.Context, method, regUrl string, authApi RegistryAuthApi, ...) (*http.Response, error)
- func SendHTTPReqAuth(ctx context.Context, method, regUrl string, auth *RegistryAuth, ...) (*http.Response, error)
- func ServiceFQDN(svcName, baseFQDN string) string
- func StreamRecv[Object any](ctx context.Context, stream GRPCStreamRecv[Object], cb func(obj Object) error) error
- func StreamRecvWithStatus[Object StatusObj](ctx context.Context, stream GRPCStreamRecv[Object], ...) error
- func UpdateAppSecretVars(ctx context.Context, region string, appKey *edgeproto.AppKey, ...) (map[string]string, error)
- func UpdateSecretVars(ctx context.Context, path string, vaultConfig *vault.Config, ...) (map[string]string, error)
- func ValidateCloudletResourceQuotas(ctx context.Context, quotaProps []edgeproto.InfraResource, ...) error
- func ValidateDockerRegistryPath(ctx context.Context, regUrl string, authApi RegistryAuthApi) error
- func ValidateOvfRegistryPath(ctx context.Context, imgUrl string, authApi RegistryAuthApi) error
- func ValidateVMRegistryPath(ctx context.Context, imgUrl string, authApi RegistryAuthApi) error
- func WrapStream(stream grpc.ServerStream, ctx context.Context) grpc.ServerStream
- type Action
- type AppInstLabels
- type AppInstLabelsOld
- type AuditRecvOne
- type AuthTokenResp
- type DockerContainer
- type DockerManifest
- type DummyRegistryAuthApi
- type EmailAccount
- type ExecReqInfo
- type ExecReqType
- type GRPCConnCache
- func (s *GRPCConnCache) GetConn(ctx context.Context, key string) (*grpc.ClientConn, error)
- func (s *GRPCConnCache) GetInterval() time.Duration
- func (s *GRPCConnCache) Run(ctx context.Context)
- func (s *GRPCConnCache) SetConn(key string, conn *grpc.ClientConn)
- func (s *GRPCConnCache) Start()
- func (s *GRPCConnCache) StartSpan() opentracing.Span
- func (s *GRPCConnCache) Stop()
- type GRPCStreamRecv
- type GetPublicCertApi
- type GrpcGWConfig
- type InfluxCreds
- type InstanceEvent
- type NodeRole
- type NodeType
- type OauthTokenResp
- type ProtoCodec
- type RegistryAuth
- type RegistryAuthApi
- type RegistryAuthMgr
- func (s *RegistryAuthMgr) DeleteRegistryAuth(ctx context.Context, host, org string) error
- func (s *RegistryAuthMgr) GetRegistryImageAuth(ctx context.Context, imgUrl string) (*RegistryAuth, error)
- func (s *RegistryAuthMgr) GetRegistryOrgAuth(ctx context.Context, hostOrURL, org string) (*RegistryAuth, error)
- func (s *RegistryAuthMgr) PutRegistryAuth(ctx context.Context, host, org string, auth *RegistryAuth, checkAndSet int) error
- func (s *RegistryAuthMgr) UpgradeRegistryAuth(ctx context.Context, internalRegistry, org string) error
- type RegistryTags
- type RequestConfig
- type SessionInfo
- type SkopeoInspect
- type SkopeoInspectLayer
- type StatusObj
- type StoragePath
- type StreamObj
- type Streamer
- type Streams
- type TestPublicCertApi
- type TrustPolicyExceptionKeyClusterKey
- type VaultPublicCertApi
- type VaultRegistryAuthApi
Constants ¶
const ( AlertAutoScaleUp = "AutoScaleUp" AlertAutoScaleDown = "AutoScaleDown" AlertClusterAutoScale = "ClusterAutoScale" AlertAppInstDown = "AppInstDown" AlertClusterSvcAppInstFailure = "ClusterSvcAppInstFailure" AlertAutoUndeploy = "AutoProvUndeploy" AlertCloudletDown = "CloudletDown" AlertCloudletDownDescription = "Cloudlet resource manager is offline" AlertClusterSvcAppInstFailureDescription = "Cluster-svc create AppInst failed" AlertCloudletResourceUsage = "CloudletResourceUsage" AlertTypeUserDefined = "UserDefined" )
Alert names
const ( AlertAnnotationTitle = "title" AlertAnnotationDescription = "description" AlertAnnotationErrorString = "error" AlertScopeTypeTag = "scope" AlertSeverityLabel = "severity" AlertScopeApp = "Application" AlertScopeCloudlet = "Cloudlet" AlertTypeLabel = "type" AlertScopePlatform = "Platform" )
Alert types
const ( AlertSeverityError = "error" AlertSeverityWarn = "warning" AlertSeverityInfo = "info" // List in the order of increasing severity ValidAlertSeverityString = `"info", "warning", "error"` )
const ( // Important: key strings used here for grpc metadata keys // MUST be lower-case. CallerAutoProv = "caller-auto-prov" AutoProvReason = "auto-prov-reason" AutoProvReasonDemand = "demand" AutoProvReasonMinMax = "minmax" AutoProvReasonOrphaned = "orphaned" AutoProvPolicyName = "auto-prov-policy-name" AccessKeyData = "access-key-data" AccessKeySig = "access-key-sig" VaultKeySig = "vault-key-sig" )
const ( AlreadyUnderDeletionMsg = "busy, already under deletion" StreamActionAlreadyInProgressMsg = "An action is already in progress for the object" )
const ( CRMCompatibilityAutoReservableCluster uint32 = 1 CRMCompatibilityNewAppInstKey uint32 = 3 )
const ( AppInstCompatibilityInitial uint32 = 0 AppInstCompatibilityUniqueNameKey uint32 = 1 AppInstCompatibilityUniqueNameKeyConfig uint32 = 2 AppInstCompatibilityRegionScopeName uint32 = 3 )
AppInsts created before certain upgrades have generated names (like namespaces, infra-specific objects etc) that are based on the older version of the AppInst. To maintain backwards compatibility even after upgrading the AppInst object, these dynamically generated names must be generated the same way as before.
const ( ClusterInstCompatibilityInitial uint32 = 0 ClusterInstCompatibilityRegionScopeName uint32 = 1 )
ClusterInst compatibility versions, same as above for AppInsts.
const ( MetricTagRegion = "region" MetricTagOrg = "org" MetricTagEvent = "event" MetricTagStatus = "status" MetricTagStart = "start" MetricTagEnd = "end" MetricTagStartTime = "starttime" MetricTagEndTime = "endtime" MetricTagDuration = "duration" MetricTagUptime = "uptime" MetricTagFlavor = "flavor" MetricTagDeployment = "deployment" MetricTagRAM = "ram" MetricTagVCPU = "vcpu" MetricTagDisk = "disk" MetricTagNodeCount = "nodecount" MetricTagNumNodes = "numnodes" MetricTagOther = "other" MetricTagNote = "note" MetricTagIpAccess = "ipaccess" MetricTagPort = "port" MetricTagDmeId = "dmeId" MetricTagMethod = "method" MetricTagLocationTile = "locationtile" MetricTagDataNetworkType = "datanetworktype" MetricTagDeviceCarrier = "devicecarrier" MetricTagDeviceOS = "deviceos" MetricTagDeviceModel = "devicemodel" MetricTagFoundCloudlet = "foundCloudlet" MetricTagFoundOperator = "foundOperator" MetricTagDmeCloudlet = "dmecloudlet" MetricTagDmeCloudletOrg = "dmecloudletorg" MetricTagStatName = "statname" )
const ( AnnotationCloudletScopedName = "cloudlet-scoped-name" AnnotationBadUpgrade55Name = "bad-upgrade55-name" AnnotationPreviousDNSName = "previous-dns-name" )
const ( NoAuth = "noauth" BasicAuth = "basic" TokenAuth = "token" ApiKeyAuth = "apikey" DockerHub = "docker.io" DockerHubRegistry = "registry-1.docker.io" MaxOvfVmVersion = 14 AllOrgs = "" AuthRespToken = "token" AuthRespAccessToken = "access_token" )
const ( GetCloudletManifest = "GetCloudletManifest" GetRestrictedCloudletStatus = "GetRestrictedCloudletStatus" )
const AppFederatedIdMaxLen = 50
const AutoProvPrefix = "autoprov"
const CertName = "envoyTlsCerts"
Common cert name. Cannot use common name as filename since envoy doesn't know if the app is dedicated or not
const DefaultClust string = "defaultclust"
const DefaultMultiTenantCluster string = "defaultmtclust"
const DnsCloudletLabelMaxLen = 50
const DnsCloudletObjectLabelMaxLen = 63
const DnsDomainLabelMaxLen = 40
Fully Qualified Domain Names (FQDNs) primarily come in the the following format of 4 "labels" (where domain can actually be more than one label itself, i.e. edgecloud.net): cloudletobject.cloudlet.region.domain In some cases, another label will be prepended (such as for ip-per-k8s-services, the service name is prepended). To help avoid the total length limit of 253 when prepending additional labels, we restrict the base labels to less than the DNS spec per-label restriction of 63, based on how long we expect those labels to be in general. For example, we expect most region names to be 3-4 characters, while appname+version+org is likely to be much longer.
const DnsRegionLabelMaxLen = 10
const E2ETEST_IMAGE_CHECKSUM = "sha256:8d4ea2a9476bc51681c6e7e59759c10237669c950b1b4a3cd6834e2161d7bde2"
const FreeClusterEvent = "Free ClusterInst reservation"
const IdAlphabet = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
These alphabets are used for generating random strings with gonanoid.
const IdAlphabetLC = "0123456789abcdefghijklmnopqrstuvwxyz"
const MaxClusterNameLength = 40
GCP limits to 40, Azure has issues above 54. For consistency go with the lower limit
const RedactedSecret = "***"
const ReservableClusterPrefix = "reservable"
const ReserveClusterEvent = "Reserve ClusterInst"
const TagIpUserEquipment string = "ip_user_equipment"
const TagPrioritySessionId string = "priority_session_id"
Values for QOS Priority Session API
const TagQosProfileName string = "qos_profile_name"
const UnknownOwner = "unknown"
UnknownOwner for ObjID
Variables ¶
var ( // Common platform resources ResourceRamMb = "RAM" ResourceVcpus = "vCPUs" ResourceDiskGb = "Disk" ResourceGpus = "GPUs" ResourceExternalIPs = "External IPs" // Platform specific resources ResourceInstances = "Instances" ResourceFloatingIPs = "Floating IPs" ResourceK8sClusters = "K8s Clusters" ResourceMaxK8sNodesPerCluster = "Maximum K8s Nodes Per Cluster" ResourceTotalK8sNodes = "Total Number Of K8s Nodes" ResourceNetworkLBs = "Network Load Balancers" // Resource units ResourceRamUnits = "MB" ResourceDiskUnits = "GB" // Resource metrics ResourceMetricRamMB = "ramUsed" ResourceMetricVcpus = "vcpusUsed" ResourceMetricDisk = "diskUsed" ResourceMetricGpus = "gpusUsed" ResourceMetricInstances = "instancesUsed" ResourceMetricExternalIPs = "externalIpsUsed" ResourceMetricFloatingIPs = "floatingIpsUsed" ResourceMetricK8sClusters = "k8sClustersUsed" ResourceMetricMaxK8sNodesPerCluster = "maxK8sNodesPerClusterUsed" ResourceMetricTotalK8sNodes = "totalK8sNodesUsed" ResourceMetricNetworkLBs = "networkLBsUsed" // Common cloudlet resources CommonCloudletResources = map[string]string{ ResourceRamMb: ResourceRamUnits, ResourceVcpus: "", ResourceDiskGb: "", ResourceGpus: "", ResourceExternalIPs: "", } ResourceQuotaDesc = map[string]string{ ResourceRamMb: "Limit on RAM available (MB)", ResourceVcpus: "Limit on vCPUs available", ResourceDiskGb: "Limit on disk available (GB)", ResourceGpus: "Limit on GPUs available", ResourceExternalIPs: "Limit on external IPs available", ResourceInstances: "Limit on number of instances that can be provisioned", ResourceFloatingIPs: "Limit on number of floating IPs that can be created", ResourceK8sClusters: "Limit on number of k8s clusters than can be created", ResourceMaxK8sNodesPerCluster: "Limit on maximum number of k8s nodes that can be created as part of k8s cluster", ResourceTotalK8sNodes: "Limit on total number of k8s nodes that can be created altogether", ResourceNetworkLBs: "Limit on maximum number of network load balancers that can be created in a region", } ResourceMetricsDesc = map[string]string{ ResourceMetricRamMB: "RAM Usage (MB)", ResourceMetricVcpus: "vCPU Usage", ResourceMetricDisk: "Disk Usage (GB)", ResourceMetricGpus: "GPU Usage", ResourceMetricExternalIPs: "External IP Usage", ResourceMetricInstances: "VM Instance Usage", ResourceMetricFloatingIPs: "Floating IP Usage", ResourceMetricK8sClusters: "K8s Cluster Usage", ResourceMetricMaxK8sNodesPerCluster: "Maximum K8s Nodes Per Cluster Usage", ResourceMetricTotalK8sNodes: "Total K8s Nodes Usage", ResourceMetricNetworkLBs: "Network Load Balancer Usage", } CommonResourceQuotaProps = GetCommonResourceQuotaProps() )
var AlertHealthCheckStatus = "status"
for healthCheck:
var AlertKeyLowCpuNodeCount = "lowcpunodecount"
var AlertKeyMinNodes = "minnodes"
var AlertKeyNodeCount = "nodecount"
Alert annotation keys for autoscale:
var AlertSeverityTypes = map[string]struct{}{ AlertSeverityError: struct{}{}, AlertSeverityWarn: struct{}{}, AlertSeverityInfo: struct{}{}, }
var AlertSeverityValues = map[string]string{ AlertAppInstDown: AlertSeverityError, AlertCloudletDown: AlertSeverityError, AlertCloudletResourceUsage: AlertSeverityWarn, AlertClusterSvcAppInstFailure: AlertSeverityError, }
Map represents severities for the specific alerts that the platfrom generates
var AllocatedIpDynamic = "dynamic"
var AppInstCheckpoints = "appinst-checkpoints"
var AppInstEvent = "appinst"
var AppInstEventSelectors = []string{ edgeproto.AppInstKeyTagName, edgeproto.AppInstKeyTagOrganization, edgeproto.CloudletKeyTagName, edgeproto.CloudletKeyTagOrganization, edgeproto.CloudletKeyTagFederatedOrganization, }
Influx metrics selectors
var AutoProvMeasurement = "auto-prov-counts"
var AutoProvMinAlreadyMetError = fmt.Errorf("Create to satisfy min already met, ignoring")
var ClientTypeClusterVM string = "clustervm"
var ClientTypeRootLB string = "rootlb"
Client type to access cluster nodes
var CloudletEvent = "cloudlet"
var CloudletFlavorUsageMeasurement = "cloudlet-flavor-usage"
var CloudletKindAws = "aws"
var CloudletKindAzure = "azure"
var CloudletKindDIND = "dind"
var CloudletKindFake = "fake"
var CloudletKindGCP = "gcp"
var CloudletKindOpenStack = "openstack"
cloudlet types
var CloudletResourceUsageDbName = "cloudlet_resource_usage"
Cloudlet resource usage
var ClusterInstCheckpoints = "clusterinst-checkpoints"
var ClusterInstEvent = "clusterinst"
var ClusterInstEventSelectors = []string{ edgeproto.ClusterKeyTagName, edgeproto.ClusterKeyTagOrganization, edgeproto.CloudletKeyTagName, edgeproto.CloudletKeyTagOrganization, edgeproto.CloudletKeyTagFederatedOrganization, }
var CustomMetric = "custom-metric"
var DefaultPlatformFlavorKey = edgeproto.FlavorKey{
Name: "DefaultPlatformFlavor",
}
var DeploymentTypeDocker = "docker"
var DeploymentTypeHelm = "helm"
var DeploymentTypeKubernetes = "kubernetes"
var DeploymentTypeVM = "vm"
var DeveloperMetricsDbName = "metrics"
Metrics common variables - TODO move to edge-cloud-infra after metrics-exporter chagnes
var DeviceMetric = "device-metric"
var DindScriptName = "dind-cluster-v1.14.sh"
DIND script to pull from kubeadm-dind-cluster
var DmeApiMeasurement = "dme-api"
var Download = "download"
var DownsampledMetricsDbName = "downsampled_metrics"
var EdgeEventsMetrics = map[string]struct{}{ LatencyMetric: struct{}{}, DeviceMetric: struct{}{}, CustomMetric: struct{}{}, }
Map used to identify which metrics should go to persistent_metrics db. Value represents the measurement creation status
var EdgeEventsMetricsDbName = "edgeevents_metrics"
EdgeEvents Metrics Influx variables
var EventsDbName = "events"
Instance Lifecycle variables
var GPUResourceLimitName = "nvidia.com/gpu"
var GRPCClientKeepaliveParams = keepalive.ClientParameters{
Time: kpInterval,
Timeout: kpInterval,
}
var GRPCServerKeepaliveEnforcement = keepalive.EnforcementPolicy{ MinTime: 1 * time.Second, }
var GRPCServerKeepaliveParams = keepalive.ServerParameters{
MaxConnectionIdle: 3 * kpInterval,
MaxConnectionAge: infinity,
MaxConnectionAgeGrace: infinity,
Time: kpInterval,
Timeout: kpInterval,
}
var IPAddrAllInterfaces = "0.0.0.0"
var IPAddrLocalHost = "127.0.0.1"
var IPV6AddrAllInterfaces = "::"
var InstanceDown = "DOWN"
var InstanceUp = "UP"
var InternalDockerRegistry = "internal-docker-registry"
var InternalVMRegistry = "internal-vm-registry"
var LatencyMetric = "latency-metric"
var MEXPrometheusAppName = "MEXPrometheusAppName"
var MexAppInstNameLabel = "mexAppInstName"
AppLabels for the application containers
var MexAppInstOrgLabel = "mexAppInstOrg"
var MexAppNameLabel = "mexAppName"
var MexAppVersionLabel = "mexAppVersion"
var MexMetricEndpoint = "mexMetricsEndpoint"
var MexNodePrefix = "mex-k8s-node-"
var MonthlyInterval = "MONTH"
var NFSAutoProvisionAppName = "NFSAutoProvision"
var NetworkSchemePrivateIP = "privateip"
var NetworkSchemePublicIP = "publicip"
network schemes for use by standalone deployments (e.g. DIND)
var NoCreds = ""
var NoDownload = "nodownload"
var OperatingSystemLinux = "linux"
var OperatingSystemMac = "mac"
var OperatorAWS = "aws"
var OperatorAzure = "azure"
var OperatorGCP = "gcp"
special operator types
var PlatosEnablingLayer = "PlatosEnablingLayer"
platform apps
var PrometheusPort = int32(9090)
var ProxyMetricsDefaultListenIP = "127.0.0.1"
var ProxyMetricsListenUDS = "MetricsUDS" // Unix Domain Socket
var ProxyMetricsPort = int32(65121)
var RemoteServerNone = ""
var ResourceTypeK8sLBSvc = "k8s-lb-svc"
resource types
var RootLBHostname = "shared"
var ValidAppDeployments = []string{ DeploymentTypeKubernetes, DeploymentTypeVM, DeploymentTypeHelm, DeploymentTypeDocker, }
var ValidCloudletDeployments = []string{ DeploymentTypeDocker, DeploymentTypeKubernetes, }
var VmRegHeaderMD5 = "X-Checksum-Md5"
var VmRegPath = "/storage/v1/artifacts"
Common API paths
var VmRegPullPath = "/storage/v1/pull"
Functions ¶
func AppInstBeingDeleted ¶
func AppInstToClusterDeployment ¶
Transform AppInst deployment type to ClusterInst deployment type
func AuditStreamInterceptor ¶
func AuditStreamInterceptor(srv interface{}, stream grpc.ServerStream, info *grpc.StreamServerInfo, handler grpc.StreamHandler) error
func AuditUnaryInterceptor ¶
func AuditUnaryInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error)
func AutoProvAppInstOnline ¶
func AutoProvCloudletInfoOnline ¶
func AutoProvCloudletInfoOnline(cloudletInfo *edgeproto.CloudletInfo) bool
func AutoProvCloudletOnline ¶
func BuildReservableClusterName ¶
func BuildReservableClusterName(id int, cloudletKey *edgeproto.CloudletKey) string
func CheckFQDNLengths ¶
DNS names must have labels <= 63 chars, and the total length <= 255 octets (which works out to 253 chars).
func CidrContainsCidr ¶
CidrContainsCidr returns true only if the first CIDR fully contains the second CIDR
func CloudletResourceUsageAlerts ¶
func CloudletResourceUsageAlerts(ctx context.Context, key *edgeproto.CloudletKey, warnings []string) []edgeproto.Alert
Raise the alarm when there are cloudlet resource usage warnings
func DecodeDockerComposeYaml ¶
func DecodeDockerComposeYaml(manifest string) (map[string]DockerContainer, error)
func DecodeK8SYaml ¶
func DeleteAppSecretVars ¶
func DeleteFile ¶
func DeleteSecretVars ¶
func DownloadFile ¶
func FormatDuration ¶
round the given field denoted by digIdx, we mostly want seconds rounded to two digits
func FqdnPrefix ¶
FqdnPrefix is used only for IP-per-service platforms that allocate an IP for each kubernetes service. Because it adds an extra level of DNS label hierarchy and cannot match the wildcard cert, we do not support TLS for it.
func GRPCErrorUnwrap ¶
GRPCError unwraps status.Status errors, this avoids ugly type print outs when various library code converts the error to a string.
func GetAppClientType ¶
func GetAppDeploymentManifest ¶
func GetAppDeploymentManifest(ctx context.Context, authApi RegistryAuthApi, app *edgeproto.App) (string, error)
GetAppDeploymentManifest gets the deployment-specific manifest.
func GetAppInstCloudletScopedName ¶
GetAppInstCloudletScopedName gets the previous key name that was scoped to the cloudlet, if it exists. The current name is scoped to the region and may have been renamed on upgrade.
func GetAppInstCompatibilityVersion ¶
func GetAppInstCompatibilityVersion() uint32
GetAppInstCompatibilityVersion always returns the highest compatibility version
func GetAppSecretVars ¶
func GetArtifactOrgPath ¶
func GetArtifactPullPath ¶
func GetArtifactStoragePath ¶
func GetAuthToken ¶
func GetAutoProvAppInstKey ¶
func GetAutoProvAppInstKey(appKey *edgeproto.AppKey, cloudletKey *edgeproto.CloudletKey) edgeproto.AppInstKey
Generate unique and recognizable name for autoprov deployed instances. Only one auto-provisioned instance per app is allowed per cloudlet.
func GetAvailablePort ¶
func GetCRMCompatibilityVersion ¶
func GetCRMCompatibilityVersion() uint32
GetCRMCompatibilityVersion always returns the highest compatibility version
func GetCertsDirAndFiles ¶
GetCertsDirAndFiles returns certsDir, certFile, keyFile
func GetCloudletKeyHash ¶
func GetCloudletKeyHash(key *edgeproto.CloudletKey) string
GetCloudletKeyHash returns a short hash of the cloudlet key to allow for a deterministic string representing the cloudlet, that does not reveal the cloudlet name (which would likely reveal its location).
func GetClusterInstCloudletScopedName ¶
func GetClusterInstCloudletScopedName(clusterInst *edgeproto.ClusterInst) string
GetClusterInstCloudletScopedName gets the previous key name that was scoped to the cloudlet, if it exists. The current name is scoped to the region and may have been renamed on upgrade.
func GetClusterInstCompatibilityVersion ¶
func GetClusterInstCompatibilityVersion() uint32
GetClusterInstCompatibilityVersion always returns the highest compatibility version
func GetClusterInstVMRequirements ¶
func GetClusterInstVMRequirements(ctx context.Context, clusterInst *edgeproto.ClusterInst, nodeFlavor, masterNodeFlavor, rootLBFlavor *edgeproto.FlavorInfo, isManagedK8s bool) ([]edgeproto.VMResource, error)
GetClusterInstVMRequirements uses the nodeFlavor and masterNodeFlavor if it cannot find a platform flavor
func GetCommonResourceQuotaProps ¶
func GetCommonResourceQuotaProps(additionalResources ...string) []edgeproto.InfraResource
GetCommonResourceQuotaProps returns the common resource quota properties. This is for convenience, it is not required that every platform support these quotas.
func GetDefaultClustKey ¶
func GetDefaultClustKey(cloudletKey edgeproto.CloudletKey, ownerOrg string) *edgeproto.ClusterKey
func GetDefaultMTClustKey ¶
func GetDefaultMTClustKey(cloudletKey edgeproto.CloudletKey) *edgeproto.ClusterKey
func GetDeploymentManifest ¶
func GetDockerDeployType ¶
func GetDockerImageChecksum ¶
func GetDockerImageChecksum(ctx context.Context, imagePath string, auth *RegistryAuth) (string, error)
Return sha256 image digest, requires skopeo installed
func GetFileName ¶
func GetFileNameWithExt ¶
func GetGPUDriverBuildStoragePath ¶
func GetGPUDriverBuildStoragePath(key *edgeproto.GPUDriverKey, region, buildName, ext string) (string, error)
func GetGPUDriverLicenseCloudletStoragePath ¶
func GetGPUDriverLicenseCloudletStoragePath(key *edgeproto.GPUDriverKey, region string, cloudletKey *edgeproto.CloudletKey) (string, error)
func GetGPUDriverLicenseStoragePath ¶
func GetGPUDriverLicenseStoragePath(key *edgeproto.GPUDriverKey, region string) (string, error)
func GetGPUDriverStoragePath ¶
func GetGPUDriverStoragePath(key *edgeproto.GPUDriverKey, region string) (string, error)
func GetInfluxSelectFields ¶
Returns a string of format `"selector","selector",...`
func GetK8sAppRequirements ¶
func GetMappedAccessType ¶
func GetMappedAccessType(accessType edgeproto.AccessType, deployment, deploymentManifest string) (edgeproto.AccessType, error)
GetMappedAccessType gets the default access type for the deployment. As of 2.4.1 only Load Balancer access is supported. Once the UI is updated to remove all references to access type, this can be removed altogether
func GetQueryArgsFromObj ¶
func GetRegistryAuthToken ¶
func GetRemoteManifest ¶
func GetRemoteManifestToFile ¶
func GetRemoteZipDockerManifests ¶
func GetRemoteZipDockerManifests(ctx context.Context, authApi RegistryAuthApi, manifest, zipfile, downloadAction string) ([]map[string]DockerContainer, error)
func GetRootLBFQDNOld ¶
func GetRootLBFQDNOld(key *edgeproto.CloudletKey, domain string) string
Old version of getting the shared root lb, does not match wildcard cert.
func GetRootLBFQDNWildcard ¶
Wildcard cert for all LBs both shared and dedicated
func GetSecretVars ¶
func GetSeverityForAlert ¶
func GetSideCarAppFilter ¶
func GetVMAppRequirements ¶
func GetVMAppRequirements(ctx context.Context, app *edgeproto.App, appInst *edgeproto.AppInst, pfFlavorList []*edgeproto.FlavorInfo, rootLBFlavor *edgeproto.FlavorInfo) ([]edgeproto.VMResource, error)
func GetValidAlertSeverityString ¶
func GetValidAlertSeverityString() string
Helper function - returns the string representations of all valid severities
func GrpcGateway ¶
func GrpcGateway(cfg *GrpcGWConfig) (http.Handler, error)
func GrpcGatewayServe ¶
func IsAlertSeverityValid ¶
func IsAppInstBeingCreatedError ¶
Autoprov relies on detecting if an AppInst is already being created
func IsAppInstBeingDeletedError ¶
Autoprov relies on detecting if an AppInst is already being deleted
func IsClusterInstReqd ¶
func IsDefaultClustKey ¶
func IsDefaultClustKey(clusterKey edgeproto.ClusterKey, cloudletKey edgeproto.CloudletKey) bool
func IsInternalAlert ¶
func IsLabelInternal ¶
Prune labels we don't want to show on the alerts sent to the external alert integrations
func IsMonitoredAlert ¶
func IsPlatformApp ¶
IsPlatformApp true if the developer/app combo is a platform app
func IsPlatformNode ¶
func IsSideCarApp ¶
func IsValidDeploymentType ¶
func Md5SumFile ¶
func ParseGrpcMethod ¶
func ParseMyCloudletKey ¶
func ParseMyCloudletKey(standalone bool, keystr *string, mykey *edgeproto.CloudletKey)
For the DME and CRM that require a cloudlet key to be specified at startup, this function parses the string argument.
func SaveAppSecretVars ¶
func SaveSecretVars ¶
func SendHTTPReq ¶
func SendHTTPReq(ctx context.Context, method, regUrl string, authApi RegistryAuthApi, urlCreds string, reqConfig *RequestConfig, body io.Reader) (*http.Response, error)
* Sends HTTP request to regUrl * Checks if any Auth Credentials is needed by doing a lookup to Vault path * - If it finds auth details, then HTTP request is sent with auth details set in HTTP Header * - else, we assume it to be a public registry which requires no authentication * Following is the flow for Docker Registry v2 authentication: * - Send HTTP request to regUrl with auth (if found in Vault) or else without auth * - If the registry requires authorization, it will return a 401 Unauthorized response with a * WWW-Authenticate header detailing how to authenticate to this registry * - We then make a request to the authorization service for a Bearer token * - The authorization service returns an opaque Bearer token representing the client’s authorized access * - Retry the original request with the Bearer token embedded in the request’s Authorization header * - The Registry authorizes the client by validating the Bearer token and the claim set embedded within * it and begins the session as usual
func SendHTTPReqAuth ¶
func SendHTTPReqAuth(ctx context.Context, method, regUrl string, auth *RegistryAuth, reqConfig *RequestConfig, body io.Reader) (*http.Response, error)
func ServiceFQDN ¶
func StreamRecv ¶
func StreamRecv[Object any](ctx context.Context, stream GRPCStreamRecv[Object], cb func(obj Object) error) error
StreamRecv converts a grpc stream receiver into callbacks
func StreamRecvWithStatus ¶
func StreamRecvWithStatus[Object StatusObj](ctx context.Context, stream GRPCStreamRecv[Object], statusSend func(*edgeproto.Result) error, cb func(obj Object) error) error
StreamRecvWithStatus is like StreamRecv, but for objects that include a StatusInfo object whose new status messages should be sent via the statusSend callback.
func UpdateAppSecretVars ¶
func UpdateSecretVars ¶
func ValidateCloudletResourceQuotas ¶
func ValidateCloudletResourceQuotas(ctx context.Context, quotaProps []edgeproto.InfraResource, curRes map[string]edgeproto.InfraResource, resourceQuotas []edgeproto.ResourceQuota) error
func ValidateDockerRegistryPath ¶
func ValidateDockerRegistryPath(ctx context.Context, regUrl string, authApi RegistryAuthApi) error
func ValidateOvfRegistryPath ¶
func ValidateOvfRegistryPath(ctx context.Context, imgUrl string, authApi RegistryAuthApi) error
func ValidateVMRegistryPath ¶
func ValidateVMRegistryPath(ctx context.Context, imgUrl string, authApi RegistryAuthApi) error
func WrapStream ¶
func WrapStream(stream grpc.ServerStream, ctx context.Context) grpc.ServerStream
Types ¶
type AppInstLabels ¶
AppInstLabels are for labeling objects to track that they belong to an AppInst. The cloudlet key information is omitted because objects to track are on a particular cloudlet, so the cloudlet info is fixed.
func GetAppInstLabels ¶
func GetAppInstLabels(appInst *edgeproto.AppInst) AppInstLabels
func (*AppInstLabels) FromMap ¶
func (s *AppInstLabels) FromMap(labels map[string]string)
func (*AppInstLabels) Map ¶
func (s *AppInstLabels) Map() map[string]string
type AppInstLabelsOld ¶
AppInstLabelsOld are the version of AppInstLabels before the AppInstUniqueNameKey upgrade.
func GetAppInstLabelsOld ¶
func GetAppInstLabelsOld(appInst *edgeproto.AppInst) AppInstLabelsOld
func (*AppInstLabelsOld) FromMap ¶
func (s *AppInstLabelsOld) FromMap(labels map[string]string)
func (*AppInstLabelsOld) Map ¶
func (s *AppInstLabelsOld) Map() map[string]string
type AuditRecvOne ¶
type AuditRecvOne struct { grpc.ServerStream // contains filtered or unexported fields }
func NewAuditRecvOne ¶
func NewAuditRecvOne(stream grpc.ServerStream, ctx context.Context) *AuditRecvOne
func (*AuditRecvOne) Context ¶
func (s *AuditRecvOne) Context() context.Context
func (*AuditRecvOne) RecvMsg ¶
func (s *AuditRecvOne) RecvMsg(m interface{}) error
type AuthTokenResp ¶
type DockerContainer ¶
type DockerContainer struct {
Image string `mapstructure:"image"`
}
type DockerManifest ¶
type DockerManifest struct {
DockerComposeFiles []string
}
type DummyRegistryAuthApi ¶
type DummyRegistryAuthApi struct {
DummyAuth RegistryAuth
}
For unit tests
func (*DummyRegistryAuthApi) GetRegistryAuth ¶
func (s *DummyRegistryAuthApi) GetRegistryAuth(ctx context.Context, imgUrl string) (*RegistryAuth, error)
type EmailAccount ¶
type EmailAccount struct { Email string `json:"email"` User string `json:"user"` Pass string `json:"pass"` Smtp string `json:"smtp"` SmtpPort string `json:"smtpport"` SmtpTLS bool `json:"smtptls"` }
func GetNoreply ¶
func GetNoreply(vaultConfig *vault.Config) (*EmailAccount, error)
type ExecReqInfo ¶
type ExecReqInfo struct { Type ExecReqType InitURL *url.URL Cookies []*http.Cookie }
type ExecReqType ¶
type ExecReqType int
const ( ExecReqConsole ExecReqType = 0 ExecReqShell ExecReqType = 1 )
type GRPCConnCache ¶
func NewGRPCConnCache ¶
func NewGRPCConnCache(addrsByKey map[string]string) *GRPCConnCache
func (*GRPCConnCache) GetConn ¶
func (s *GRPCConnCache) GetConn(ctx context.Context, key string) (*grpc.ClientConn, error)
func (*GRPCConnCache) GetInterval ¶
func (s *GRPCConnCache) GetInterval() time.Duration
func (*GRPCConnCache) Run ¶
func (s *GRPCConnCache) Run(ctx context.Context)
func (*GRPCConnCache) SetConn ¶
func (s *GRPCConnCache) SetConn(key string, conn *grpc.ClientConn)
SetConn allows for manually injecting a client connection. Can be used for unit testing with grpc.bufconn.
func (*GRPCConnCache) Start ¶
func (s *GRPCConnCache) Start()
func (*GRPCConnCache) StartSpan ¶
func (s *GRPCConnCache) StartSpan() opentracing.Span
func (*GRPCConnCache) Stop ¶
func (s *GRPCConnCache) Stop()
type GRPCStreamRecv ¶
type GetPublicCertApi ¶
type GetPublicCertApi interface {
GetPublicCert(ctx context.Context, commonName string) (*vault.PublicCert, error)
}
GetPublicCertApi abstracts the way the public cert is retrieved. Certain services, like DME running on a Cloudlet, may need to connect to the controller to get a public cert from Vault.
type GrpcGWConfig ¶
type GrpcGWConfig struct { ApiAddr string GetCertificate func(*ctls.CertificateRequestInfo) (*ctls.Certificate, error) TlsCertFile string ApiHandles []func(context.Context, *gwruntime.ServeMux, *grpc.ClientConn) error }
type InfluxCreds ¶
func GetInfluxDataAuth ¶
func GetInfluxDataAuth(vaultConfig *vault.Config, region string) (*InfluxCreds, error)
type InstanceEvent ¶
type InstanceEvent string
const ( CREATED InstanceEvent = "CREATED" UPDATE_START InstanceEvent = "UPDATE_START" UPDATE_ERROR InstanceEvent = "UPDATE_ERROR" UPDATE_COMPLETE InstanceEvent = "UPDATE_COMPLETE" DELETED InstanceEvent = "DELETED" DELETE_ERROR InstanceEvent = "DELETE_ERROR" HEALTH_CHECK_FAIL InstanceEvent = "HEALTH_CHECK_FAIL" HEALTH_CHECK_OK InstanceEvent = "HEALTH_CHECK_OK" RESERVED InstanceEvent = "RESERVED" UNRESERVED InstanceEvent = "UNRESERVED" )
type NodeRole ¶
type NodeRole string
NodeRole specifies the role for provisioning a node from ansible
type NodeType ¶
type NodeType int
const ( NodeTypeAppVM NodeType = iota NodeTypeDedicatedRootLB NodeTypePlatformVM NodeTypePlatformHost NodeTypePlatformK8sClusterMaster NodeTypePlatformK8sClusterPrimaryNode NodeTypePlatformK8sClusterSecondaryNode // Cloudlet Compute nodes NodeTypeK8sClusterMaster NodeTypeK8sClusterNode NodeTypeDockerClusterNode )
type OauthTokenResp ¶
type ProtoCodec ¶
type ProtoCodec struct{}
Implements grpc.Codec to allow the more recent versions of grpc to use the gogo protobuf marshaling functions.
func (*ProtoCodec) Marshal ¶
func (s *ProtoCodec) Marshal(v interface{}) ([]byte, error)
func (*ProtoCodec) Name ¶
func (s *ProtoCodec) Name() string
func (*ProtoCodec) Unmarshal ¶
func (s *ProtoCodec) Unmarshal(data []byte, v interface{}) error
type RegistryAuth ¶
type RegistryAuth struct { AuthType string Username string `json:"username"` Password string `json:"password"` Token string `json:"token"` ApiKey string `json:"apikey"` Hostname string `json:"hostname"` Port string `json:"port"` }
func GetAccountAuth ¶
func GetAccountAuth(ctx context.Context, name string, vaultConfig *vault.Config) (*RegistryAuth, error)
Same as registry auth, but is always the user/password of an admin or other user account.
type RegistryAuthApi ¶
type RegistryAuthApi interface {
GetRegistryAuth(ctx context.Context, imgUrl string) (*RegistryAuth, error)
}
type RegistryAuthMgr ¶
type RegistryAuthMgr struct {
// contains filtered or unexported fields
}
func NewRegistryAuthMgr ¶
func NewRegistryAuthMgr(vaultConfig *vault.Config, validDomains string) *RegistryAuthMgr
func (*RegistryAuthMgr) DeleteRegistryAuth ¶
func (s *RegistryAuthMgr) DeleteRegistryAuth(ctx context.Context, host, org string) error
func (*RegistryAuthMgr) GetRegistryImageAuth ¶
func (s *RegistryAuthMgr) GetRegistryImageAuth(ctx context.Context, imgUrl string) (*RegistryAuth, error)
GetRegistryImageAuth gets the credentials for pulling the image.
func (*RegistryAuthMgr) GetRegistryOrgAuth ¶
func (s *RegistryAuthMgr) GetRegistryOrgAuth(ctx context.Context, hostOrURL, org string) (*RegistryAuth, error)
GetRegistryOrgAuth gets the credentials for accessing the image registry. If org is AllOrgs, then admin credentials are returned. Otherwise, credentials are scoped to the org.
func (*RegistryAuthMgr) PutRegistryAuth ¶
func (s *RegistryAuthMgr) PutRegistryAuth(ctx context.Context, host, org string, auth *RegistryAuth, checkAndSet int) error
func (*RegistryAuthMgr) UpgradeRegistryAuth ¶
func (s *RegistryAuthMgr) UpgradeRegistryAuth(ctx context.Context, internalRegistry, org string) error
UpgradeDockerRegistryAuth copies docker credentials from hostname-specific vault path to common internal vault path. This is an upgrade function and can be removed once all existing deployments have been upgraded.
type RegistryTags ¶
type RequestConfig ¶
type SessionInfo ¶
type SessionInfo struct {
Token string
}
type SkopeoInspect ¶
type SkopeoInspectLayer ¶
type StatusObj ¶
type StatusObj interface {
GetStatus() *edgeproto.StatusInfo
}
type StoragePath ¶
type StoragePath struct {
// contains filtered or unexported fields
}
func (*StoragePath) AppendPaths ¶
func (s *StoragePath) AppendPaths(paths ...string) error
func (*StoragePath) String ¶
func (s *StoragePath) String() string
func (*StoragePath) Validate ¶
func (s *StoragePath) Validate() error
type StreamObj ¶
type StreamObj struct {
// contains filtered or unexported fields
}
func (*StreamObj) SetupCleanupTimer ¶
func (sm *StreamObj) SetupCleanupTimer()
type Streamer ¶
type Streamer struct { State edgeproto.StreamState // contains filtered or unexported fields }
func NewStreamer ¶
func NewStreamer() *Streamer
func (*Streamer) Unsubscribe ¶
func (s *Streamer) Unsubscribe(msgCh chan interface{})
type TestPublicCertApi ¶
type TestPublicCertApi struct {
GetCount int
}
TestPublicCertApi implements GetPublicCertApi for unit/e2e testing
func (*TestPublicCertApi) GetPublicCert ¶
func (s *TestPublicCertApi) GetPublicCert(ctx context.Context, commonName string) (*vault.PublicCert, error)
type TrustPolicyExceptionKeyClusterKey ¶
type TrustPolicyExceptionKeyClusterKey struct { TpeKey edgeproto.TrustPolicyExceptionKey ClusterKey edgeproto.ClusterKey }
type VaultPublicCertApi ¶
VaultPublicCertApi implements GetPublicCertApi by connecting directly to Vault.
func (*VaultPublicCertApi) GetPublicCert ¶
func (s *VaultPublicCertApi) GetPublicCert(ctx context.Context, commonName string) (*vault.PublicCert, error)
type VaultRegistryAuthApi ¶
type VaultRegistryAuthApi struct {
RegAuthMgr *RegistryAuthMgr
}
func (*VaultRegistryAuthApi) GetRegistryAuth ¶
func (s *VaultRegistryAuthApi) GetRegistryAuth(ctx context.Context, imgUrl string) (*RegistryAuth, error)
Source Files ¶
- actions.go
- alertnames.go
- audit.go
- autoprov_common.go
- compatibility.go
- deployment.go
- deps.go
- gogo_codec.go
- grpc.go
- grpc_conncache.go
- images.go
- influx.go
- infraresources.go
- kubemf.go
- names.go
- noreply.go
- publiccert.go
- publiccert_selfsigned.go
- registry.go
- secret_vars.go
- storagepath.go
- streamer.go
- trustpolicyexception.go
- utils.go