MCPcopy
hub / github.com/cortexlabs/cortex / ListHPAs

Method ListHPAs

pkg/lib/k8s/hpa.go:149–161  ·  view source on GitHub ↗
(opts *kmeta.ListOptions)

Source from the content-addressed store, hash-verified

147}
148
149func (c *Client) ListHPAs(opts *kmeta.ListOptions) ([]kautoscaling.HorizontalPodAutoscaler, error) {
150 if opts == nil {
151 opts = &kmeta.ListOptions{}
152 }
153 hpaList, err := c.hpaClient.List(context.Background(), *opts)
154 if err != nil {
155 return nil, errors.WithStack(err)
156 }
157 for i := range hpaList.Items {
158 hpaList.Items[i].TypeMeta = _hpaTypeMeta
159 }
160 return hpaList.Items, nil
161}
162
163func (c *Client) ListHPAsByLabels(labels map[string]string) ([]kautoscaling.HorizontalPodAutoscaler, error) {
164 opts := &kmeta.ListOptions{

Callers 2

ListHPAsByLabelsMethod · 0.95
ListHPAsWithLabelKeysMethod · 0.95

Calls 1

ListMethod · 0.65

Tested by

no test coverage detected