Skip to content

Commit

Permalink
adding FQDN webhook checker
Browse files Browse the repository at this point in the history
  • Loading branch information
wejdross committed Jan 23, 2025
1 parent 7b2454f commit 29edda4
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 6 deletions.
5 changes: 3 additions & 2 deletions apis/vshn/v1/dbaas_vshn_Forgejo.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,9 @@ type VSHNForgejoServiceSpec struct {
// This also enables strict hostname checking for this FQDN.
FQDN []string `json:"fqdn,omitempty"`

// Forgejosettings contains additional Forgejo settings.
Forgejosettings string `json:"forgejosettings,omitempty"`
// AdminEmail contains the email address of the admin user.
// If it's not set, admin user is going to be: [email protected]
AdminEmail string `json:"adminEmail,omitempty"`

// +kubebuilder:validation:Enum="besteffort";"guaranteed"
// +kubebuilder:default="besteffort"
Expand Down
6 changes: 4 additions & 2 deletions crds/vshn.appcat.vshn.io_vshnforgejoes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4834,8 +4834,10 @@ spec:
service:
description: Service contains Forgejo DBaaS specific properties
properties:
forgejosettings:
description: Forgejosettings contains additional Forgejo settings.
adminEmail:
description: |-
AdminEmail contains the email address of the admin user.
If it's not set, admin user is going to be: [email protected]
type: string
fqdn:
description: |-
Expand Down
6 changes: 4 additions & 2 deletions crds/vshn.appcat.vshn.io_xvshnforgejoes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5558,8 +5558,10 @@ spec:
service:
description: Service contains Forgejo DBaaS specific properties
properties:
forgejosettings:
description: Forgejosettings contains additional Forgejo settings.
adminEmail:
description: |-
AdminEmail contains the email address of the admin user.
If it's not set, admin user is going to be: [email protected]
type: string
fqdn:
description: |-
Expand Down
4 changes: 4 additions & 0 deletions pkg/comp-functions/functions/vshnforgejo/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,10 @@ func addForgejo(ctx context.Context, svc *runtime.ServiceRuntime, comp *vshnv1.V
values["podSecurityContext"] = securityContext["podSecurityContext"]
}

if comp.Spec.Parameters.Service.AdminEmail != "" {
values["gitea"].(map[string]any)["config"].(map[string]any)["admin"].(map[string]any)["ADMIN_EMAIL"] = comp.Spec.Parameters.Service.AdminEmail
}

release, err := common.NewRelease(ctx, svc, comp, values)
if err != nil {
return err
Expand Down

0 comments on commit 29edda4

Please sign in to comment.