Documentation
¶
Index ¶
- type HelmRelease
- type HelmReleaseGraph
- func (r *HelmReleaseGraph) AddLink(source, target string)
- func (r *HelmReleaseGraph) ParseClusterRoleBinding(id string, roleBinding *rbacv1.ClusterRoleBinding)
- func (r *HelmReleaseGraph) ParseManifest(release *HelmRelease)
- func (r *HelmReleaseGraph) ParseResourceOwners(id string, owners []metav1.OwnerReference)
- func (r *HelmReleaseGraph) ParseRoleBinding(id string, roleBinding *rbacv1.RoleBinding)
- func (r *HelmReleaseGraph) ProcessPod(id string, res KubeResource, spec v1.PodSpec, status v1.PodStatus)
- func (r *HelmReleaseGraph) ProcessService(id string, res KubeResource, spec v1.ServiceSpec)
- func (r *HelmReleaseGraph) ProcessServiceAccount(id string, template v1.PodTemplateSpec)
- type KubeAPIJob
- type KubeResource
- type KubeResourceJob
- type KubeResourceJobResult
- type NodeStatus
- type ReleaseLink
- type ReleaseNode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HelmRelease ¶
type HelmRelease struct {
*release.Release
Endpoint string `json:"-"`
User string `json:"-"`
Resources map[string]KubeResource `json:"resources"`
Jobs []KubeResourceJob `json:"-"`
PodJobs map[string]KubeResourceJob `json:"-"`
ManifestErrors bool `json:"-"`
}
HelmRelease represents a Helm Release deployed via Helm
func NewHelmRelease ¶
func NewHelmRelease(info *release.Release, endpoint, user string, jetstream api.PortalProxy) *HelmRelease
NewHelmRelease represents extended info about a Helm Release
func (*HelmRelease) GetPods ¶
func (r *HelmRelease) GetPods() []interface{}
GetPods gets the pod resources for the release
func (*HelmRelease) GetResources ¶
func (r *HelmRelease) GetResources() []interface{}
GetResources gets all fo the resources for the release
func (*HelmRelease) UpdatePods ¶
func (r *HelmRelease) UpdatePods(jetstream api.PortalProxy)
UpdatePods will run the jobs needed to get the pods This uses the selectors to find the pods - so new pods should be picked up
func (*HelmRelease) UpdateResources ¶
func (r *HelmRelease) UpdateResources(jetstream api.PortalProxy)
type HelmReleaseGraph ¶
type HelmReleaseGraph struct {
Release *HelmRelease `json:"-"`
Nodes map[string]ReleaseNode `json:"nodes"`
Links map[string]ReleaseLink `json:"links"`
}
func NewHelmReleaseGraph ¶
func NewHelmReleaseGraph(release *HelmRelease) *HelmReleaseGraph
NewHelmReleaseGraph represents graph of the Helm Release
func (*HelmReleaseGraph) AddLink ¶
func (r *HelmReleaseGraph) AddLink(source, target string)
func (*HelmReleaseGraph) ParseClusterRoleBinding ¶
func (r *HelmReleaseGraph) ParseClusterRoleBinding(id string, roleBinding *rbacv1.ClusterRoleBinding)
func (*HelmReleaseGraph) ParseManifest ¶
func (r *HelmReleaseGraph) ParseManifest(release *HelmRelease)
ParseManifest
func (*HelmReleaseGraph) ParseResourceOwners ¶
func (r *HelmReleaseGraph) ParseResourceOwners(id string, owners []metav1.OwnerReference)
func (*HelmReleaseGraph) ParseRoleBinding ¶
func (r *HelmReleaseGraph) ParseRoleBinding(id string, roleBinding *rbacv1.RoleBinding)
func (*HelmReleaseGraph) ProcessPod ¶
func (r *HelmReleaseGraph) ProcessPod(id string, res KubeResource, spec v1.PodSpec, status v1.PodStatus)
func (*HelmReleaseGraph) ProcessService ¶
func (r *HelmReleaseGraph) ProcessService(id string, res KubeResource, spec v1.ServiceSpec)
func (*HelmReleaseGraph) ProcessServiceAccount ¶
func (r *HelmReleaseGraph) ProcessServiceAccount(id string, template v1.PodTemplateSpec)
type KubeAPIJob ¶
type KubeAPIJob struct {
Jetstream api.PortalProxy
Jobs []KubeResourceJob
}
KubeAPIJob represents a set of jobs to run against the Kube API
func NewKubeAPIJob ¶
func NewKubeAPIJob(jetstream api.PortalProxy, jobs []KubeResourceJob) *KubeAPIJob
NewKubeAPIJob returns a helper that can execute all jobs and return results
func (*KubeAPIJob) Run ¶
func (j *KubeAPIJob) Run() []KubeResourceJobResult
Run will run all of the jobs
type KubeResource ¶
type KubeResource struct {
Kind string `yaml:"kind" json:"kind"`
APIVersion string `yaml:"apiVersion" json:"apiVersion"`
Metadata struct {
Name string `yaml:"name" json:"name"`
Namespace string `yaml:"namespace" json:"namespace"`
} `yaml:"metadata" json:"metadata"`
Resource interface{} `yaml:"resource"`
Manifest bool
}
KubeResource is a simple struct to pull out core common metadata for a Kube resource
type KubeResourceJob ¶
type KubeResourceJob struct {
ID string
Kind string
APIVersion string
Name string
Namespace string
Endpoint string
User string
URL string
Parent string
}
KubeResourceJob = Resource(s) that we need to go and fetch
type KubeResourceJobResult ¶
type KubeResourceJobResult struct {
KubeResourceJob
StatusCode int
Data []byte
}
KubeResourceJobResult is the result from a job
type NodeStatus ¶
type NodeStatus string
NodeStatus represents the status of a node in the graph
const ( // NodeOK indicates OK Status NodeOK NodeStatus = "ok" // NodeWarn indicates Warning Status NodeWarn NodeStatus = "warn" // NodeError indicates Error Status NodeError NodeStatus = "error" // NodeUnknown indicates status is unknown NodeUnknown NodeStatus = "unknown" // NodeNone indicates node has no status NodeNone NodeStatus = "none" )
type ReleaseLink ¶
type ReleaseNode ¶
type ReleaseNode struct {
ID string `json:"id"`
Label string `json:"label"`
Data struct {
Kind string `json:"kind"`
Status NodeStatus `json:"status"`
Metadata struct {
Name string `yaml:"name" json:"name"`
Namespace string `yaml:"namespace" json:"namespace"`
} `yaml:"metadata" json:"metadata"`
} `json:"data"`
}