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 1c3b18f commit 7b2454f
Showing 1 changed file with 64 additions and 24 deletions.
88 changes: 64 additions & 24 deletions pkg/comp-functions/functions/vshnforgejo/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,41 +100,78 @@ func addForgejo(ctx context.Context, svc *runtime.ServiceRuntime, comp *vshnv1.V
}

values := map[string]any{
"ingress": map[string]any{
"enabled": true,
"hosts": []map[string]any{},
"annotations": map[string]string{
"cert-manager.io/cluster-issuer": "letsencrypt-staging",
},
"tls": []map[string]any{
{
"hosts": []string{},
"secretName": "forgejo-tls",
},
},
},
"gitea": map[string]any{
"metrics": map[string]any{
"enabled": true,
},
"serviceMonitor": map[string]any{
"enabled": true,
},
"admin": map[string]any{
"existingSecret": secretName,
},
"config": map[string]any{
"admin": map[string]any{
"SEND_NOTIFICATION_EMAIL_ON_NEW_USER": true,
},
"cache": map[string]any{
"ADAPTER": "twoqueue",
"HOST": "'{\"size\":100, \"recent_ratio\":0.25, \"ghost_ratio\":0.5}'",
},
"cron": map[string]any{
"ENABLED": true,
"archive_cleanup": map[string]any{
"SCHEDULE": "@hourly",
"OLDER_THAN": "2h",
},
},
"database": map[string]any{
"DB_TYPE": "sqlite3",
},
"session": map[string]any{
"PROVIDER": "memory",
"indexer": map[string]any{
"ISSUE_INDEXER_TYPE": "bleve",
"REPO_INDEXER_ENABLED": true,
},
"cache": map[string]any{
"PROVIDER": "memory",
"lfs": map[string]any{
"PATH": "/data/git/lfs",
},
"log": map[string]any{
"LEVEL": "info",
},
"packages": map[string]any{
"LIMIT_SIZE_CONTAINER": "2 GiB",
},
"queue": map[string]any{
"TYPE": "memory",
"TYPE": "level",
},
"repository": map[string]any{
"ROOT": "/data/git/repositories",
},
"security": map[string]any{
"REVERSE_PROXY_TRUSTED_PROXIES": "*",
},
"server": map[string]any{
"DISABLE_SSH": true,
"LANDING_PAGE": "login",
"LFS_START_SERVER": true,
"MINIMUM_KEY_SIZE": true,
"OFFLINE_MODE": true,
},
"session": map[string]any{
"PROVIDER": "memory",
},
},
"metrics": map[string]any{
"enabled": true,
},
"serviceMonitor": map[string]any{
"enabled": true,
},
},
"ingress": map[string]any{
"annotations": map[string]string{
"cert-manager.io/cluster-issuer": "letsencrypt-staging",
},
"enabled": true,
"hosts": []map[string]any{},
"tls": []map[string]any{
{
"hosts": []string{},
"secretName": "forgejo-tls",
},
},
},
Expand All @@ -153,6 +190,9 @@ func addForgejo(ctx context.Context, svc *runtime.ServiceRuntime, comp *vshnv1.V
"redis-cluster": map[string]any{
"enabled": false,
},
"strategy": map[string]any{
"type": "Recreate",
},
}

for _, host := range comp.Spec.Parameters.Service.FQDN {
Expand Down

0 comments on commit 7b2454f

Please sign in to comment.