kubecost / features-bugs

A public repository for filing of Kubecost feature requests and bugs. Please read the issue guidelines before filing an issue here.
0 stars 0 forks source link

[Feature] Allow manage collections through values.yaml #89

Open Hronom opened 5 months ago

Hronom commented 5 months ago

Problem Statement

We wanna have possibility to manage collections in programmatic way through values.yaml as it done with AWS integration. There nos such possibility right now.

Solution Description

Ideally if collections.json can be mounted from external config:

apiVersion: v1
kind: ConfigMap
metadata:
  name: my-config
data:
  collections.json: |
    {
      "key1": "value1",
      "key2": "value2",
      ...
    }
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: my-deployment
spec:
  replicas: 3
  selector:
    matchLabels:
      app: my-app
  template:
    metadata:
      labels:
        app: my-app
    spec:
      containers:
      - name: my-container
        image: my-image
        volumeMounts:
        - name: config-volume
          mountPath: /path/to/config.json
          subPath: config.json
          readOnly: true
      volumes:
      - name: config-volume
        configMap:
          name: my-config

This helps to template this json using helm.

Alternatives

Also it will be even cooler if we can manage it through custom CDR files in Kubernetes. Some controller will run and track whenever Kind: collection created it will update collection in Kubecost UI.

Additional Context

No response

Troubleshooting

dwbrown2 commented 4 months ago

@Hronom we're actually planning this now for an upcoming release! Would you be interested in giving input on early designs?

Hronom commented 4 months ago

@dwbrown2 yes sure

kwombach12 commented 4 months ago

@Hronom Would love to setup some time with you! Here is a link to book time on my calendar.

chipzoller commented 3 months ago

Although the ultimate goal is being able to define these in Helm values, we actually need to expose this programmatically for Kubecost. We have a tracking feature for this internally as KC-253 but will cross-reference this issue now transferred to features-bugs.

kwombach12 commented 1 month ago

Hey @Hronom! Following up on our conversation from some time ago -- we have published API docs for Kubecost Collections to help you programmatically create, view, and manage your Collections. We would love your feedback if you are open to checking it out!