Skip to content

Commit

Permalink
Explain the implementation-specific validation nonsense
Browse files Browse the repository at this point in the history
Without the validation, you can supply data that would be correct
that we would need to reject becuase of what we want to do

Co-Authored-By: Youssef Bel Mekki <[email protected]>
Co-Authored-By: sindrerh2 <[email protected]>
  • Loading branch information
3 people committed Nov 12, 2024
1 parent 9dac479 commit 01789b8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pkg/apis/nais.io/v1/naiserator_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,17 @@ type Ingress string
// +kubebuilder:validation:Pattern=`^https:\/\/.+$`
type fromRedirect string

/* - ^ These start with https because we are not using redirects to do redirects,
Instead we are using the rewrite-target annotation and that annotation
does redirects with a 302 iff the parameters are full urls, scheme and all. */

// +kubebuilder:validation:Pattern=`^https:\/\/.+$`
type toRedirect string

/* -^ These start with https because we are not using redirects to do redirects,
Instead we are using the rewrite-target annotation and that annotation
does redirects with a 302 iff the parameters are full urls, scheme and all. */

type Redirect struct {
From fromRedirect `json:"from"`
To toRedirect `json:"to"`
Expand Down

0 comments on commit 01789b8

Please sign in to comment.