added review comments

This commit is contained in:
jerger 2022-07-26 19:35:35 +02:00
parent 889c10c894
commit c286faf084
6 changed files with 13 additions and 18 deletions

View file

@ -18,15 +18,18 @@
(s/def ::fqdn pred/fqdn-string?) (s/def ::fqdn pred/fqdn-string?)
(s/def ::mailer-from pred/bash-env-string?) (s/def ::mailer-from pred/bash-env-string?)
; TODO: Move to pred/host-port? ; TODO: Move to pred/host-port?
; TODO: Review jem - 2022/07/26 - move to common & add unittest
(s/def ::mailer-host-port #(let [split-string (str/split % #":")] (s/def ::mailer-host-port #(let [split-string (str/split % #":")]
(and (= (count split-string) 2) (and (= (count split-string) 2)
(pred/fqdn-string? (first split-string)) (pred/fqdn-string? (first split-string))
; TODO: Move this to pred/port-number? ; TODO: Move this to pred/port-number?
; TODO: Review jem - 2022/07/26 - move to common & add unittest
(let [snd (edn/read-string (second split-string))] (let [snd (edn/read-string (second split-string))]
(and (integer? snd) (and (integer? snd)
(> snd 0) (> snd 0)
(<= snd 65535)))))) (<= snd 65535))))))
;TODO: Maybe move to pred/comma-separated-fqdn-list? ;TODO: Maybe move to pred/comma-separated-fqdn-list?
; TODO: Review jem - 2022/07/26 - move to common & add unittest
(s/def ::service-domain-whitelist #(every? true? (map pred/fqdn-string? (str/split % #",")))) (s/def ::service-domain-whitelist #(every? true? (map pred/fqdn-string? (str/split % #","))))
(s/def ::service-noreply-address string?) (s/def ::service-noreply-address string?)
(s/def ::mailer-user pred/bash-env-string?) (s/def ::mailer-user pred/bash-env-string?)
@ -58,7 +61,7 @@
(yaml/from-string (yaml/load-resource resource-name)))) (yaml/from-string (yaml/load-resource resource-name))))
(defn-spec generate-appini-env pred/map-or-seq? (defn-spec generate-appini-env pred/map-or-seq?
; TODO: fix this to require the merged spec of auth and config instead of any ; TODO: Review jem - 2022/07/26 - as we do not need auth here just hand over config & spec it.
[config any?] [config any?]
(let [{:keys [default-app-name (let [{:keys [default-app-name
fqdn fqdn

View file

@ -61,14 +61,18 @@ data:
#[server] #[server]
GITEA__server__DOMAIN: FQDN GITEA__server__DOMAIN: FQDN
GITEA__server__SSH_DOMAIN: FQDN GITEA__server__SSH_DOMAIN: FQDN
GITEA__server__ROOT_URL: URL GITEA__server__ROOT_URL: URL
# TODO: Review jem - 2022/07/26 - what does http port mean? The outgoning port should be 80 for http // 443 for https!
GITEA__server__HTTP_PORT: "3000" GITEA__server__HTTP_PORT: "3000"
GITEA__server__SSH_PORT: "2222" GITEA__server__SSH_PORT: "2222"
#[service] #[service]
# TODO: Review jem - 2022/07/26 - why? Does not match to whitelisting
GITEA__service__DISABLE_REGISTRATION: "true" GITEA__service__DISABLE_REGISTRATION: "true"
GITEA__service__REQUIRE_SIGNIN_VIEW: "false" GITEA__service__REQUIRE_SIGNIN_VIEW: "false"
# TODO: Review jem - 2022/07/26 - why? Does not match to whitelisting
GITEA__service__REGISTER_EMAIL_CONFIRM: "false" GITEA__service__REGISTER_EMAIL_CONFIRM: "false"
# TODO: Review jem - 2022/07/26 - why? Does not match to whitelisting
GITEA__service__ENABLE_NOTIFY_MAIL: "false" GITEA__service__ENABLE_NOTIFY_MAIL: "false"
GITEA__service__EMAIL_DOMAIN_WHITELIST: WHITELISTDOMAINS GITEA__service__EMAIL_DOMAIN_WHITELIST: WHITELISTDOMAINS
GITEA__service__ALLOW_ONLY_EXTERNAL_REGISTRATION: "false" GITEA__service__ALLOW_ONLY_EXTERNAL_REGISTRATION: "false"
@ -81,19 +85,3 @@ data:
#[session] #[session]
GITEA__session__PROVIDER_CONFIG: /data/gitea/sessions GITEA__session__PROVIDER_CONFIG: /data/gitea/sessions
GITEA__session__PROVIDER: file GITEA__session__PROVIDER: file

View file

@ -18,6 +18,7 @@ spec:
spec: spec:
containers: containers:
- name: gitea - name: gitea
# TODO: Review jem - 2022/07/26 - latest release?
image: gitea/gitea:1.16.9 image: gitea/gitea:1.16.9
imagePullPolicy: IfNotPresent imagePullPolicy: IfNotPresent
# config settings # config settings

View file

@ -3,6 +3,7 @@ kind: Secret
metadata: metadata:
name: gitea-secrets name: gitea-secrets
data: data:
# TODO: Review jem - 2022/07/26 - mixed upper & lowercase??
GITEA__database__USER: DBUSER GITEA__database__USER: DBUSER
GITEA__database__PASSWD: DBPW GITEA__database__PASSWD: DBPW

View file

@ -1,3 +1,4 @@
# TODO: Review jem - 2022/07/26 - move this to provs?
apiVersion: traefik.containo.us/v1alpha1 apiVersion: traefik.containo.us/v1alpha1
kind: Middleware kind: Middleware
metadata: metadata:

View file

@ -26,4 +26,5 @@ spec:
- ReadWriteOnce - ReadWriteOnce
resources: resources:
requests: requests:
# TODO: Review jem - 2022/07/26 - should be configurable & as large as posible ...
storage: 15Gi storage: 15Gi