cluster

Infrastructure files for Nordgedanken and Midnightthoughts.
git clone git://archive.git.mtrnord.blog/MTRNord/cluster.git
Log | Files | Refs | README

release.yaml (1801B)


      1 apiVersion: helm.toolkit.fluxcd.io/v2
      2 kind: HelmRelease
      3 metadata:
      4   name: opencost
      5   namespace: opencost
      6 spec:
      7   releaseName: opencost
      8   interval: 30m
      9   chart:
     10     spec:
     11       chart: opencost
     12       sourceRef:
     13         kind: HelmRepository
     14         name: opencost
     15         namespace: opencost
     16       interval: 1h
     17   install:
     18     remediation:
     19       retries: 3
     20   upgrade:
     21     remediation:
     22       retries: 3
     23   values:
     24     opencost:
     25       exporter:
     26         defaultClusterId: "midnighthtoughts"
     27         defaultCloudBackend: custom
     28         extraEnv:
     29           USE_CSV_PROVIDER: "true"
     30           CSV_PATH: "/etc/opencost/pricing/hetzner.csv"
     31           PROM_CLUSTER_ID_LABEL: cluster
     32           KUBECOST_SCRAPE_INTERVAL: 1m
     33         extraVolumeMounts:
     34           - name: hetzner-pricing
     35             mountPath: /etc/opencost/pricing
     36             readOnly: true
     37       prometheus:
     38         external:
     39           enabled: true
     40           url: http://thanos-query-frontend.monitoring.svc.cluster.local:10902
     41         internal:
     42           enabled: false
     43     extraVolumes:
     44       - name: hetzner-pricing
     45         configMap:
     46           name: hetzner-pricing-csv
     47 ---
     48 apiVersion: monitoring.coreos.com/v1
     49 kind: ServiceMonitor
     50 metadata:
     51   name: opencost
     52   namespace: opencost
     53 spec:
     54   endpoints:
     55     - port: http
     56       path: /metrics
     57   selector:
     58     matchLabels:
     59       app.kubernetes.io/instance: opencost
     60   namespaceSelector:
     61     matchNames:
     62       - opencost
     63 ---
     64 apiVersion: gateway.networking.k8s.io/v1
     65 kind: HTTPRoute
     66 metadata:
     67   name: opencost
     68   namespace: opencost
     69 spec:
     70   parentRefs:
     71     - name: envoy-gateway
     72       namespace: envoy-gateway
     73   hostnames:
     74     - opencost.k8s.midnightthoughts.space
     75   rules:
     76     - backendRefs:
     77         - name: opencost
     78           port: 9090
     79       timeouts:
     80         request: 240s
     81         backendRequest: 0s