Skip to content

Commit

Permalink
Add source impls
Browse files Browse the repository at this point in the history
Co-Authored-By: Youssef Bel Mekki <[email protected]>
Co-Authored-By: sindrerh2 <[email protected]>
  • Loading branch information
3 people committed Nov 6, 2024
1 parent 50142b0 commit dfa5d00
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
5 changes: 5 additions & 0 deletions pkg/apis/nais.io/v1/get_set.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ func (in *Naisjob) GetIngress() []Ingress {
return nil
}

// As Jobs don't have ingresses, they also do not have redirects
func (in *Naisjob) GetRedirects() []Redirect {
return nil
}

func (in *Naisjob) GetImage() string {
return in.Spec.Image
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/apis/nais.io/v1/naiserator_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@ type fromRedirect string
// +kubebuilder:validation:Pattern=`^https:\/\/.+$`
type toRedirect string

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

type IDPorten struct {
Expand Down
4 changes: 4 additions & 0 deletions pkg/apis/nais.io/v1alpha1/get_set.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,10 @@ func (in *Application) GetIngress() []nais_io_v1.Ingress {
return in.Spec.Ingresses
}

func (in *Application) GetRedirects() []nais_io_v1.Redirect {
return in.Spec.Redirects
}

func (in *Application) GetLeaderElection() bool {
return in.Spec.LeaderElection
}
Expand Down

0 comments on commit dfa5d00

Please sign in to comment.