nais / naiserator

Naiserator creates a full set of Kubernetes application infrastructure based on a single application spec.
MIT License
41 stars 12 forks source link

Gjør `.gcp.sqlInstances[].tier` påkrevd #552

Closed kimtore closed 1 month ago

kimtore commented 1 month ago

Her er det mange som i dag lener seg på default-verdien db-f1-micro. Det er ønskelig at man bruker små instanser i dev, men uheldigvis bærer man ofte konfigurasjonen med seg til prod.

Dette kan løses ved å gjøre verdien påkrevd.

Mange apper kommer til å feile sync, så sørg for å legge inn en fornuftig feilmelding som blant annet skal nevne at tidligere default-verdi var db-f1-micro og link til dokumentasjon eller løsning på fix:

"DB instance tier missing, previous value was db-f1-micro (recommended only for development); closest recommended value for production use is db-custom-?-????"

Her må vi finne en fornuftig default-verdi å anbefale.

Ref oppsummeringen fra @mortenlj:

Vi ønsker ikke å ha forskjellige defaults per miljø, da det øker kompleksiteten både for oss og for dere. Det vi har diskutert, og som kanskje er en "løsning" i fremtiden er å ikke ha en default, slik at man er nødt til å ta stilling til valget før man får deployet.

Original post: https://nav-it.slack.com/archives/C5KUST8N6/p1723705725135559

Reasonable-Solutions commented 1 month ago

Note: The db-f1-micro and db-g1-small machine types aren't included in the Cloud SQL SLA. These machine types are configured to use a shared-core CPU, and are designed to provide low-cost test and development instances only. Don't use them for production instances.

[...] Don't use them for production instances

I have a feeling this will be a good change, in many ways. However, we should probably offer some recommendations for instance choice here. 1 core, 1gb?

The rollout here should probably be a deprecation warning
"This field will be required after mmddy, the current default is db-f1-micro. If you like db-f1-micro use that" and then make it required with an error "required field missing, default value is [...], the closest instance type to db-f1-micro recommended for production use is: db-custom-1-1000"

kimtore commented 1 month ago

Unsure about deprecation warning because there is no clear way of signalling that, unless we make something generic in Console? Can't really expect people to read their pipeline success logs.

As for recommendations, totally behind that.

Reasonable-Solutions commented 1 month ago

Can't really expect people to read their pipeline success logs.

😢

We could do a $GITHUB_STEP_SUMMARY and get something like https://github.com/navikt/statusplattform-nais-operator/actions/runs/9870134892#summary-27255225231

(still, we can't expect people to read it)

kimtore commented 1 month ago

Yes, we could, but... still unsure if it'll make any difference. I believe in #nais-announcements though.