Skip to content

Bulk apply#353

Draft
thokra-nav wants to merge 25 commits intomainfrom
bulk_apply
Draft

Bulk apply#353
thokra-nav wants to merge 25 commits intomainfrom
bulk_apply

Conversation

@thokra-nav
Copy link
Copy Markdown
Contributor

No description provided.

}

func MakeRouter(ctx context.Context, pool *pgxpool.Pool, log logrus.FieldLogger, middlewares ...func(http.Handler) http.Handler) *chi.Mux {
func MakeRouter(ctx context.Context, cfg Config) *chi.Mux {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Det er kanskje unødvendig å kjøre 2 http servere som begge eksponerer paths på ingressen. Vurdere om vi kan samle både http serveren i denne pakka og den som allerede eksisterer i http.go (den som /graphql) i en senere PR

Comment on lines +14 to +28
var ignoredTopLevelFields = map[string]bool{
"status": true,
}

// ignoredMetadataFields are metadata fields managed by the API server.
var ignoredMetadataFields = map[string]bool{
"resourceVersion": true,
"uid": true,
"generation": true,
"creationTimestamp": true,
"managedFields": true,
"selfLink": true,
"deletionTimestamp": true,
"deletionGracePeriodSeconds": true,
}
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Vi bør kanskje ta en ekstra titt på dette. Vi kan kanskje også generelt ignorere endringer til .metadata?
Men av de ressursene som eksisterer i dag så er det noen som ikke har defaulting webhook, så kan være vi må justere litt på hvordan vi gjør diff

@thokra-nav thokra-nav force-pushed the bulk_apply branch 4 times, most recently from 4d5d88b to 9d329ce Compare March 16, 2026 13:15
@sechmann sechmann force-pushed the bulk_apply branch 2 times, most recently from d9b9eab to cbe3638 Compare March 18, 2026 12:34
thokra-nav and others added 21 commits March 20, 2026 13:50
- Move resource activity log types to activitylog package
- Add fallback transformer for unknown resource kinds
- Unify changed field representation and string conversion
- Update GraphQL schema and resolvers for new types
- Require pre-shared key for team API in integration tests
- Update apply endpoint to use path parameters for team and environment
Fix environment name field
Co-authored-by: Vegar Sechmann Molvig <vegar.sechmann.molvig@nav.no>
Use the mise-installed CodeFormat binary in the Lua fmt task instead of downloading a formatter at runtime.
Convert apply to a struct-based HTTP handler, perform team authorization before request parsing, and restore environmentName in per-resource results. NOTE: tests are currently not passing in this branch.
Move team impersonation client creation into kubernetes config and allow rest/apply wiring to override the dynamic client in integration tests. This keeps production behavior while making authorization outcomes deterministic in tests.
…ls in tests

GitHubOIDC now accepts an issuer parameter, returns an error instead of
silently degrading, and is passed as an optional field in rest.Config.
Integration tests simply leave the field nil to skip the middleware.
server

Co-authored-by: Vegar Sechmann Molvig <vegar.sechmann.molvig@nav.no>
Custom error message for psk auth

Co-authored-by: Vegar Sechmann Molvig <vegar.sechmann.molvig@nav.no>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants