nais / api

MIT License
1 stars 0 forks source link

Workloads missing resource-specs is not reporting cost #9

Closed jhrv closed 3 months ago

jhrv commented 7 months ago

Workloads not configuring any resource requirements in manifest is not showing any cost. Utilization is still reported.

Example: https://console.nav.cloud.nais.io/team/tbd/prod-gcp/app/spekemat-slakter/manifest

apiVersion: nais.io/v1alpha1
kind: Application
metadata:
  labels:
    team: tbd
  name: spekemat-slakter
  namespace: tbd
spec:
  accessPolicy:
    outbound:
      rules:
      - application: spekemat
  azure:
    application:
      enabled: true
      tenant: nav.no
  env:
  - name: KAFKA_RAPID_TOPIC
    value: tbd.rapid.v1
  - name: KAFKA_CONSUMER_GROUP_ID
    value: tbd-spekemat-v1
  - name: KAFKA_RESET_POLICY
    value: latest
  image: europe-north1-docker.pkg.dev/nais-management-233d/tbd/helse-spekemat-slakter:2024.02.16-22.10-c1252ac
  kafka:
    pool: nav-prod
  liveness:
    path: /isalive
  preStopHook:
    http:
      path: /stop
  prometheus:
    path: /metrics
  readiness:
    path: /isready
  replicas:
    max: 24
    min: 2
    scalingStrategy:
      kafka:
        consumerGroup: tbd-spekemat-v1
        threshold: 200
        topic: tbd.rapid.v1
  secureLogs:
    enabled: true
  strategy:
    type: RollingUpdate
Screenshot 2024-02-23 at 08 19 04 image Screenshot 2024-02-23 at 08 20 15

When not specifying resource-specs, each pod will default to this:

    resources:
      limits:
        memory: 512Mi
      requests:
        cpu: 200m
        memory: 256Mi

This should at least be visible cost-wise, but also informed clearly that these values are defaulted to when not configured.

rbjornstad commented 3 months ago

This is apparently not an issue anymore.