inventory

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: May 27, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CertManagerName                          = "CertManager"
	CertManagerRecordName                    = "certManager"
	CertManagerVersionEnv                    = "CERT_MANAGER_VERSION"
	CertManagerYamlEnv                       = "CERT_MANAGER_YAML"
	CertManagerDefaultYamlFileTmpl           = "https://github.com/jetstack/cert-manager/releases/download/%s%s/cert-manager.yaml"
	CertManagerDefaultYamlFileTmplInRegionCN = "https://openfunction.sh1a.qingstor.com/cert-manager/%s%s/cert-manager.yaml"
)
View Source
const (
	DaprName       = "Dapr"
	DaprRecordName = "dapr"
	DaprVersionEnv = "DAPR_VERSION"
)
View Source
const (
	IngressName                          = "IngressNginx"
	IngressRecordName                    = "ingress"
	IngressVersionEnv                    = "INGRESS_NGINX_VERSION"
	IngressYamlEnv                       = "INGRESS_NGINX_YAML"
	IngressDefaultYamlFileTmpl           = "https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-%s%s/deploy/static/provider/cloud/deploy.yaml"
	IngressDefaultYamlFileTmplInRegionCN = "https://openfunction.sh1a.qingstor.com/ingress-nginx/%s%s/deploy.yml"
)
View Source
const (
	DefaultDaprVersion                          = "1.5.1"
	DefaultKedaVersion                          = "2.4.0"
	DefaultKnativeServingVersionOnK8Sv117       = "0.21.1"
	DefaultKnativeServingVersionOnK8Sv118       = "0.23.3"
	DefaultKnativeServingVersionOnK8Sv119       = "0.25.2"
	DefaultKnativeServingVersionOnK8Sv120       = "1.0.1"
	DefaultKourierVersionOnK8Sv117              = "0.21.0"
	DefaultKourierVersionOnK8Sv118              = "0.23.0"
	DefaultKourierVersionOnK8Sv119              = "0.25.0"
	DefaultKourierVersionOnK8Sv120              = "1.0.1"
	DefaultServingDefaultDomainVersionOnK8Sv117 = "0.21.1"
	DefaultServingDefaultDomainVersionOnK8Sv118 = "0.23.3"
	DefaultServingDefaultDomainVersionOnK8Sv119 = "0.25.2"
	DefaultServingDefaultDomainVersionOnK8Sv120 = "1.0.1"
	DefaultTektonPipelinesVersionOnK8Sv117      = "0.23.0"
	DefaultTektonPipelinesVersionOnK8Sv118      = "0.26.0"
	DefaultTektonPipelinesVersionOnK8Sv119      = "0.29.0"
	DefaultTektonPipelinesVersionOnK8Sv120      = "0.30.0"
	DefaultShipwrightVersion                    = "0.6.1"
	DefaultCertManagerVersion                   = "1.5.4"
	DefaultIngressNginxVersion                  = "1.1.0"
	DefaultOpenFunctionVersion                  = "0.4.0"
)
View Source
const (
	KedaName                          = "Keda"
	KedaRecordName                    = "keda"
	KedaVersionEnv                    = "KEDA_VERSION"
	KedaYamlEnv                       = "KEDA_YAML"
	KedaDefaultYamlFileTmpl           = "https://github.com/kedacore/keda/releases/download/%s%s/keda-%s.yaml"
	KedaDefaultYamlFileTmplInRegionCN = "https://openfunction.sh1a.qingstor.com/keda/%s%s/keda-%s.yaml"
)
View Source
const (
	KnativeServingName                          = "Knative Serving"
	KnativeServingRecordName                    = "knativeServing"
	KnativeServingVersionEnv                    = "KNATIVE_SERVING_VERSION"
	KnativeServingCrdYamlEnv                    = "KNATIVE_SERVING_CRD_YAML"
	KnativeServingCoreYamlEnv                   = "KNATIVE_SERVING_CORE_YAML"
	KnativeServingDefaultYamlFileTmpl           = "https://github.com/knative/serving/releases/download/%s%s/serving-%s.yaml"
	KnativeServingDefaultYamlFileTmplInRegionCN = "https://openfunction.sh1a.qingstor.com/knative/serving/%s%s/serving-%s.yml"
)
View Source
const (
	KourierName                          = "Kourier"
	KourierRecordName                    = "kourier"
	KourierVersionEnv                    = "KOURIER_VERSION"
	KourierYamlEnv                       = "KOURIER_YAML"
	KourierDefaultYamlFileTmpl           = "https://github.com/knative-sandbox/net-kourier/releases/download/%s%s/kourier.yaml"
	KourierDefaultYamlFileTmplInRegionCN = "https://openfunction.sh1a.qingstor.com/knative/net-kourier/%s%s/kourier.yml"
)
View Source
const (
	OpenFunctionName                          = "OpenFunction"
	OpenFunctionRecordName                    = "openFunction"
	OpenFunctionYamlEnv                       = "OPENFUNCTION_YAML"
	OpenFunctionDefaultYamlFileTmpl           = "https://github.com/OpenFunction/OpenFunction/releases/download/%s%s/bundle.yaml"
	OpenFunctionDefaultYamlFileTmplInRegionCN = "https://openfunction.sh1a.qingstor.com/openfunction/%s%s/bundle.yml"
)
View Source
const (
	ServingDefaultDomainName                          = "DefaultDomain"
	ServingDefaultDomainRecordName                    = "defaultDomain"
	ServingDefaultDomainVersionEnv                    = "DEFAULT_DOMAIN_VERSION"
	ServingDefaultDomainYamlEnv                       = "DEFAULT_DOMAIN_YAML"
	ServingDefaultDomainDefaultYamlFileTmpl           = "https://github.com/knative/serving/releases/download/%s%s/serving-default-domain.yaml"
	ServingDefaultDomainDefaultYamlFileTmplInRegionCN = "https://openfunction.sh1a.qingstor.com/knative/serving/%s%s/serving-default-domain.yml"
)
View Source
const (
	ShipwrightName                          = "Shipwright"
	ShipwrightRecordName                    = "shipwright"
	ShipwrightVersionEnv                    = "SHIPWRIGHT_VERSION"
	ShipwrightYamlEnv                       = "SHIPWRIGHT_YAML"
	ShipwrightDefaultYamlFileTmpl           = "https://openfunction.sh1a.qingstor.com/shipwright/%s%s/release.yaml"
	ShipwrightDefaultYamlFileTmplInRegionCN = "https://openfunction.sh1a.qingstor.com/shipwright/zh-%s%s/release.yaml"
)
View Source
const (
	TektonPipelinesName                          = "Tekton Pipelines"
	TektonPipelinesRecordName                    = "tektonPipelines"
	TektonPipelinesVersionEnv                    = "TEKTON_PIPELINES_VERSION"
	TektonPipelinesYamlEnv                       = "TEKTON_PIPELINES_YAML"
	TektonPipelinesDefaultYamlFileTmpl           = "https://storage.googleapis.com/tekton-releases/pipeline/previous/%s%s/release.yaml"
	TektonPipelinesDefaultYamlFileTmplInRegionCN = "https://openfunction.sh1a.qingstor.com/tekton/pipeline/%s%s/release.yml"
)

Variables

This section is empty.

Functions

func GetInventory

func GetInventory(
	cl *k8s.Clientset,
	regionCN bool,
	withKnative bool,
	withKeda bool,
	withDapr bool,
	withShipwright bool,
	withCertManager bool,
	withIngress bool,
	openFunctionVersion string,
) (map[string]Interface, error)

func GetVersionMap

func GetVersionMap(inventory map[string]Interface) map[string]string

func NewCertManager

func NewCertManager(serverVersion string, regionCN bool) (*certManager, error)

func NewDapr

func NewDapr(serverVersion string, regionCN bool) (*dapr, error)

func NewDefaultDomain

func NewDefaultDomain(serverVersion string, regionCN bool) (*defaultDomain, error)

func NewIngressNginx

func NewIngressNginx(serverVersion string, regionCN bool) (*ingress, error)

func NewKeda

func NewKeda(serverVersion string, regionCN bool) (*keda, error)

func NewKnativeServing

func NewKnativeServing(serverVersion string, regionCN bool) (*knativeServing, error)

func NewKourier

func NewKourier(serverVersion string, regionCN bool) (*kourier, error)

func NewOpenFunction

func NewOpenFunction(serverVersion string, openFunctionVersion string, regionCN bool) (*openFunction, error)

func NewShipwright

func NewShipwright(serverVersion string, regionCN bool) (*shipwright, error)

func NewTektonPipelines

func NewTektonPipelines(serverVersion string, regionCN bool) (*tektonPipelines, error)

Types

type Interface

type Interface interface {
	GetVersion() string
	GetYamlFile(version string) (map[string]string, error)
}

type Record

type Record struct {
	OpenFunction    string `yaml:"openFunction"`
	KnativeServing  string `yaml:"knativeServing,omitempty"`
	Kourier         string `yaml:"kourier,omitempty"`
	DefaultDomain   string `yaml:"defaultDomain,omitempty"`
	Keda            string `yaml:"keda,omitempty"`
	Dapr            string `yaml:"dapr,omitempty"`
	TektonPipelines string `yaml:"tektonPipelines,omitempty"`
	Shipwright      string `yaml:"shipwright,omitempty"`
	CertManager     string `yaml:"certManager,omitempty"`
	Ingress         string `yaml:"ingress,omitempty"`
}

func NewRecord

func NewRecord(inventoryMap map[string]string) (*Record, error)

func (*Record) ToMap

func (r *Record) ToMap(humanize bool) map[string]string

func (*Record) Update

func (r *Record) Update(newRecord *Record)

Jump to

Keyboard shortcuts

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