clustersvc

package
v1.2.5 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2024 License: Apache-2.0 Imports: 24 Imported by: 0

README

Cluster-svc service

cluster-svc runs as a notifyee of MEX controller and listens to cluster instance notifications. When a cluster instance is created this service will add MEX-specific applications to this service. Currently it creates prometheus-operator services whenever a cluster service is created.

  • prometheus-operator - is a metrics collection framework and periodically scrapes the details from k8s. It is deployed as a helm chart

cluster-svc uses controller apis to create edgeproto.App and edgeproto.AppInst for the services using a pre-created flavor and developer

Usage

A typical usage of cluster-svc is as a docker container running on the MEX Platform. For an example see edge-cloud/e2e-tests/setups/mexdemo/mex-cluster-svc-deploy.yml

MCHU-MAC:edge-cloud matthewchu$ cluster-svc -h
Usage of cluster-svc:
  -ctrlAddrs string
    	address to connect to (default "127.0.0.1:55001")
  -d string
    	comma separated list of [etcd api notify dmedb dmereq locapi mexos metrics upgrade]
  -notifyAddrs string
    	Comma separated list of controller notify listener addresses (default "127.0.0.1:50001")
  -prometheus-ports string
    	ports to expose in form "tcp:123,udp:123"
  -r string
    	root directory for testing
  -scrapeInterval duration
    	Metrics collection interval (default 15s)
  -standalone
    	Standalone mode. AppInst data is pre-populated. Dme does not interact with controller. AppInsts can be created directly on Dme using controller AppInst API
  -tls string
    	server tls cert file.  Keyfile and CA file mex-ca.crt must be in same directory

TODO

  1. scrapeInterval should be passed along to Prometheus app helm chart at creation time - currently defaults to 15secs
  2. Need to create a separate flavor for infrastructure services not to conflict with user applications
  3. Need to pass cloudlet and cluster information only when cluster is created to createAppInstCommon
    • EDGECLOUD-386
    • this will allow us to support multiple clusters/cloudlets

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AlertPolicyCache edgeproto.AlertPolicyCache
View Source
var AutoScalePolicyCache edgeproto.AutoScalePolicyCache
View Source
var CloudletCache edgeproto.CloudletCache
View Source
var ClusterInstCache edgeproto.ClusterInstCache
View Source
var MEXPrometheusApp = edgeproto.App{
	Key:           MEXPrometheusAppKey,
	ImagePath:     "https://prometheus-community.github.io/helm-charts:prometheus-community/kube-prometheus-stack",
	Deployment:    cloudcommon.DeploymentTypeHelm,
	DelOpt:        edgeproto.DeleteType_AUTO_DELETE,
	InternalPorts: true,
	Trusted:       true,
	Annotations:   "version=47.5.0",
}

Define prometheus operator App. Version 8.15.14 tested with helm 3.4.2 and kubernetes 1.16

View Source
var MEXPrometheusAppHelmTemplate = `` /* 978-byte string literal not displayed */
View Source
var MEXPrometheusAppKey = edgeproto.AppKey{
	Name:         MEXPrometheusAppName,
	Version:      MEXPrometheusAppVer,
	Organization: edgeproto.OrganizationEdgeCloud,
}
View Source
var MEXPrometheusAppName = cloudcommon.MEXPrometheusAppName
View Source
var MEXPrometheusAppVer = "1.0"
View Source
var NFSAutoProvAppKey = edgeproto.AppKey{
	Name:         NFSAutoProvisionAppName,
	Version:      NFSAutoProvAppVers,
	Organization: edgeproto.OrganizationEdgeCloud,
}
View Source
var NFSAutoProvAppVers = "1.0"
View Source
var NFSAutoProvisionApp = edgeproto.App{
	Key:           NFSAutoProvAppKey,
	ImagePath:     "https://kubernetes-sigs.github.io/nfs-subdir-external-provisioner:nfs-subdir-external-provisioner/nfs-subdir-external-provisioner",
	Deployment:    cloudcommon.DeploymentTypeHelm,
	DelOpt:        edgeproto.DeleteType_AUTO_DELETE,
	InternalPorts: true,
	Trusted:       true,
	Annotations:   "version=4.0.18",
}
View Source
var NFSAutoProvisionAppName = cloudcommon.NFSAutoProvisionAppName
View Source
var NFSAutoProvisionAppTemplate = `nfs:
  path: /share
  server: [[ .Deployment.ClusterIp ]]
storageClass:
  name: standard
  defaultClass: true
`

Functions

func Run

func Run()

Types

This section is empty.

Jump to

Keyboard shortcuts

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