Skip to content

Commit

Permalink
feat: upgrade to kubecost v2
Browse files Browse the repository at this point in the history
Signed-off-by: Tarun Gupta Akirala <[email protected]>
  • Loading branch information
takirala committed Jan 6, 2025
1 parent fd6670b commit b016074
Show file tree
Hide file tree
Showing 19 changed files with 767 additions and 215 deletions.
10 changes: 10 additions & 0 deletions common/helm-repositories/kubecost.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
apiVersion: source.toolkit.fluxcd.io/v1beta2
kind: HelmRepository
metadata:
name: kubecost
namespace: kommander-flux
spec:
interval: 10m
timeout: 1m
url: "${helmMirrorURL:=https://kubecost.github.io/cost-analyzer/}"
1 change: 1 addition & 0 deletions common/helm-repositories/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ resources:
- kommander-ui.yaml
- kommander.yaml
- kube-logging.yaml
- kubecost.yaml
- kubefed.yaml
- kubetunnel.yaml
- mesosphere-repos.yaml
Expand Down
130 changes: 0 additions & 130 deletions services/kubecost/0.37.9/defaults/cm.yaml

This file was deleted.

84 changes: 0 additions & 84 deletions services/kubecost/0.37.9/kubecost.yaml

This file was deleted.

26 changes: 26 additions & 0 deletions services/kubecost/2.5.0/cosi-storage.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: kubecost-cosi-storage
namespace: ${releaseNamespace}
spec:
force: true
prune: true
wait: true
interval: 10m
retryInterval: 1m
path: ./services/kubecost/2.5.0/cosi-storage
sourceRef:
kind: GitRepository
name: management
namespace: kommander-flux
timeout: 1m
dependsOn:
- name: todo-move-to-konvoy
namespace: ${releaseNamespace}
postBuild:
substitute:
releaseNamespace: ${releaseNamespace}
substituteFrom:
- kind: ConfigMap
name: substitution-vars
35 changes: 35 additions & 0 deletions services/kubecost/2.5.0/cosi-storage/cosi-bucket.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
apiVersion: helm.toolkit.fluxcd.io/v2beta2
kind: HelmRelease
metadata:
name: kubecost-cosi-storage
namespace: ${releaseNamespace}
spec:
chart:
spec:
chart: cosi-bucket-kit
sourceRef:
kind: HelmRepository
name: mesosphere.github.io-charts-stable
namespace: kommander-flux
version: 0.0.1-alpha.0
interval: 15s
install:
crds: CreateReplace
remediation:
retries: 30
createNamespace: true
upgrade:
crds: CreateReplace
remediation:
retries: 30
releaseName: kubecost-cosi-storage
targetNamespace: ${releaseNamespace}
valuesFrom:
- kind: ConfigMap
name: kubecost-2.5.0-d2iq-defaults
valuesKey: ${releaseNamespace}-namespace-${kubecostClusterMode}-values.yaml # This will ensure non kommander namespace installs do not get cosi buckets.
optional: true
- kind: ConfigMap
name: kubecost-overrides
optional: true
---
4 changes: 4 additions & 0 deletions services/kubecost/2.5.0/cosi-storage/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- cosi-bucket.yaml
Loading

0 comments on commit b016074

Please sign in to comment.