applications

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const RevisionLabel = "serving.knative.dev/revision"

RevisionLabel the label used to show the revision

Variables

This section is empty.

Functions

func DeploymentURL

func DeploymentURL(kc kubernetes.Interface, d *appsv1.Deployment, appName string) string

DeploymentURL returns a deployment URL

func GetAppName

func GetAppName(name string, namespaces ...string) string

func GetEditAppName

func GetEditAppName(name string) string

func GetRemoteDeployments

func GetRemoteDeployments(g gitclient.Interface, env *v1.Environment) (map[string]Deployment, error)

GetRemoteDeployments finds the remote cluster's

func Pods

func Pods(d *appsv1.Deployment) string

Pods returns the ratio of pods that are ready/replicas

func ToDeploymentMap

func ToDeploymentMap(releases []*releasereport.ReleaseInfo) map[string]Deployment

Types

type Application

type Application struct {
	*v1.SourceRepository `json:"sourceRepository"`
	Environments         map[string]Environment `json:"environments"`
}

Application represents an application in jx

func (*Application) Name

func (a *Application) Name() string

Name returns the application name

type Deployment

type Deployment struct {
	Name    string `json:"name,omitempty"`
	Pods    string `json:"pods,omitempty"`
	Version string `json:"version,omitempty"`
	URL     string `json:"url,omitempty"`
	Canary  bool   `json:"canary,omitempty"`
}

Deployment represents an application deployment in a single environment

func CreateDeployment

func CreateDeployment(d *appsv1.Deployment, env *v1.Environment) (Deployment, error)

type Environment

type Environment struct {
	v1.Environment `json:"environment,omitempty"`
	Deployments    []Deployment `json:"deployments,omitempty"`
}

Environment represents an environment in which an application has been deployed

func (*Environment) IsPreview

func (e *Environment) IsPreview() bool

IsPreview returns true if the environment is a preview environment

type List

type List struct {
	Items []Application `json:"applications,omitempty"`
}

List is a collection of applications

func GetApplications

func GetApplications(jxClient jxc.Interface, kubeClient kubernetes.Interface, namespace string, g gitclient.Interface) (List, error)

GetApplications fetches all Applications

func (*List) Environments

func (l *List) Environments() map[string]v1.Environment

Environments loops through all applications in a list and returns a map with all the unique environments

Jump to

Keyboard shortcuts

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