Skip to content

Commit

Permalink
adding kubecost
Browse files Browse the repository at this point in the history
  • Loading branch information
seemywingz committed Dec 17, 2024
1 parent f080a6f commit ebd3ca7
Show file tree
Hide file tree
Showing 4 changed files with 79 additions and 0 deletions.
2 changes: 2 additions & 0 deletions catalogs/devops/kubecost/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Plural Kubecost

14 changes: 14 additions & 0 deletions catalogs/devops/kubecost/kubecost.yaml.liquid
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
global:
grafana:
enabled: false

kubecostFrontend:
enabled: false

serviceMonitor:
enabled: true

server:
global:
external_labels:
cluster_id: {{ context.cluster }}
26 changes: 26 additions & 0 deletions catalogs/devops/kubecost/servicedeployment.yaml.liquid
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
apiVersion: deployments.plural.sh/v1alpha1
kind: ServiceDeployment
metadata:
name: kubecost-{{ context.cluster }}
namespace: apps
spec:
namespace: kubecost
git:
folder: helm/kubecost/{{ context.cluster }}
ref: main
repositoryRef:
kind: GitRepository
name: infra
namespace: infra
helm:
version: "2.5.x"
chart: kubecost
url: https://grafana.github.io/helm-charts
valuesFiles:
- kubecost.yaml.liquid
configuration:
cluster: { ? { context.cluster } }
clusterRef:
kind: Cluster
name: mgmt
namespace: infra
37 changes: 37 additions & 0 deletions setup/catalogs/devops/kubecost.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
apiVersion: deployments.plural.sh/v1alpha1
kind: PrAutomation
metadata:
name: kubecost
spec:
name: kubecost
icon: https://cdn.icon-icons.com/icons2/2699/PNG/512/grafana_logo_icon_171048.png
documentation: |
Sets up Kubecost Kubernetes Cost Monitoring and Management.
creates:
git:
ref: sebastian/prod-2981-set-up-catalog-pipeline # TODO set to main
folder: catalogs/devops/kubecost
templates:
- source: README.md
destination: documentation/kubecost/README.md
external: true
- source: kubecost.yaml.liquid
destination: "helm/kubecost/{{ context.cluster }}/kubecost.yaml.liquid"
external: true
- source: servicedeployment.yaml.liquid
destination: "bootstrap/apps/kubecost/{{ context.cluster }}/servicedeployment.yaml"
external: true
repositoryRef:
name: scaffolds
catalogRef:
name: devops
scmConnectionRef:
name: plural # you'll need to add this ScmConnection manually before this is functional
title: "Kubecost setup ({{ context.cluster }})"
message: |
Sets up Kubecost on {{ context.cluster }} cluster.
identifier: pluralsh/plrl-dev-aws # FIXME
configuration:
- name: cluster
type: STRING
documentation: the cluster you want to deploy to

0 comments on commit ebd3ca7

Please sign in to comment.