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

Method ListConfigMaps

pkg/lib/k8s/configmap.go:119–131  ·  view source on GitHub ↗
(opts *kmeta.ListOptions)

Source from the content-addressed store, hash-verified

117}
118
119func (c *Client) ListConfigMaps(opts *kmeta.ListOptions) ([]kcore.ConfigMap, error) {
120 if opts == nil {
121 opts = &kmeta.ListOptions{}
122 }
123 configMapList, err := c.configMapClient.List(context.Background(), *opts)
124 if err != nil {
125 return nil, errors.WithStack(err)
126 }
127 for i := range configMapList.Items {
128 configMapList.Items[i].TypeMeta = _configMapTypeMeta
129 }
130 return configMapList.Items, nil
131}
132
133func (c *Client) ListConfigMapsByLabels(labels map[string]string) ([]kcore.ConfigMap, error) {
134 opts := &kmeta.ListOptions{

Callers 2

Calls 1

ListMethod · 0.65

Tested by

no test coverage detected