nais / api Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
Earlier today, for a team which used more than requested of cpu/memory, the following query would result in an error:
query Overview($team: Slug!) {
currentResourceUtilizationForTeam(team: $team) {
cpu {
utilization
estimatedAnnualOverageCost
}
memory {
utilization
estimatedAnnualOverageCost
}
}
resourceUtilizationTrendForTeam(team: $team) {
cpuUtilizationTrend
memoryUtilizationTrend
}
}
Both currentResourceUtilizationForTeam
and resourceUtilizationTrendForTeam
would fail because of the following query would return no rows:
SELECT
SUM(usage)::double precision AS usage,
SUM(request)::double precision AS request,
timestamp
FROM
resource_utilization_metrics
WHERE
team_slug = @team_slug
AND resource_type = @resource_type
AND timestamp = @timestamp
AND request > usage
GROUP BY
timestamp;
The problem is likely AND request > usage
which was added to solve nais/console-backend#40
I made a workaround in 0a5cd99 which returns empty data when there's no rows.
When deploying an application, when new instances are starting up they are reported as "FAILING". This results in the app itself is reported as failing, which is not correct. It's just starting up.
This should be corrected so that users don't think something is wrong when it's not
Alle medlemmer av et team, ikke bare owners bør kunne endre slack alert-kanaler.
Har ikke sjekket dagens kode, men mulig det fortsatt er slik..
ref: https://nav-it.slack.com/archives/C050DP53VPH/p1707295683898859
nais-console@tenantdomain
til nais-admin
.nais-admins
. Den gamle console-admins
kan da fjernesWorkloads 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
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.