Documentation ¶
Index ¶
- Constants
- func DeploymentURL(kc kubernetes.Interface, d *appsv1.Deployment, appName string) string
- func GetAppName(name string, namespaces ...string) string
- func GetEditAppName(name string) string
- func GetRemoteDeployments(g gitclient.Interface, env *v1.Environment) (map[string]Deployment, error)
- func Pods(d *appsv1.Deployment) string
- func ToDeploymentMap(releases []*releasereport.ReleaseInfo) map[string]Deployment
- type Application
- type Deployment
- type Environment
- type List
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 GetEditAppName ¶
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
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
Click to show internal directories.
Click to hide internal directories.