Fix Gitea c:
This commit is contained in:
@@ -1,54 +1,51 @@
|
|||||||
(ns k8s.services.gitea.service)
|
(ns k8s.services.gitea.service)
|
||||||
|
|
||||||
(def config
|
(def config
|
||||||
{:stack [:vault:prepare :k8s:pvc :k8s:deployment :k8s:service :k8s:httproute]
|
{:stack [:vault:prepare :k8s:pvc :k8s:deployment :k8s:service :k8s:httproute :k8s:tcproute]
|
||||||
:image-port 3000
|
|
||||||
:app-namespace "generic"
|
:app-namespace "generic"
|
||||||
:app-name "gitea"
|
:app-name "gitea"
|
||||||
|
:image-port 3000
|
||||||
:k8s:pvc-opts
|
:k8s:pvc-opts
|
||||||
{"gitea-data" {:storageClass "juicefs-sc" :accessModes ["ReadWriteMany"] :storage "1Ti"}
|
{:metadata {:name "gitea-state"
|
||||||
"gitea-config" {:storageClass "juicefs-sc" :accessModes ["ReadWriteMany"] :storage "1Gi"}}
|
:namespace "generic"}
|
||||||
|
:spec {:storageClassName "juicefs-sc"
|
||||||
|
:accessModes ["ReadWriteMany"]
|
||||||
|
:resources {:requests {:storage "1Ti"}}}}
|
||||||
|
|
||||||
:k8s:deployment-opts
|
:k8s:deployment-opts
|
||||||
{:spec
|
{:spec
|
||||||
{:template
|
{:template
|
||||||
{:spec
|
{:metadata {:annotations {"backup.velero.io/backup-volumes" "gitea-state"}}
|
||||||
{:initContainers
|
:spec
|
||||||
[{:name "init-permissions"
|
{:containers
|
||||||
:image "busybox:latest"
|
|
||||||
:command ["sh" "-c" "chown -R 1000:1000 /var/lib/gitea && chown -R 1000:1000 /etc/gitea"]
|
|
||||||
:volumeMounts [{:name "gitea-data" :mountPath "/var/lib/gitea"}
|
|
||||||
{:name "gitea-config" :mountPath "/etc/gitea"}]
|
|
||||||
:securityContext {:runAsUser 0 :runAsGroup 0}}]
|
|
||||||
|
|
||||||
:containers
|
|
||||||
[{:name 'app-name
|
[{:name 'app-name
|
||||||
:image '(str repo "/" app-name ":latest-rootless")
|
:image '(str repo "/" app-name ":latest-rootless")
|
||||||
|
:command ["/usr/local/bin/gitea"]
|
||||||
|
:args ["web"
|
||||||
|
"-c" "/var/lib/gitea/custom/conf/app.ini"]
|
||||||
:env [{:name "TZ" :value "America/Chicago"}]
|
:env [{:name "TZ" :value "America/Chicago"}]
|
||||||
:envFrom [{:secretRef {:name "gitea-secrets"}}]
|
:envFrom [{:secretRef {:name "gitea-secrets"}}]
|
||||||
:ports [{:name "http" :containerPort 3000}
|
:ports [{:name "ssh" :containerPort 2222}]
|
||||||
{:name "ssh" :containerPort 2222}]
|
|
||||||
|
|
||||||
:volumeMounts [{:name "gitea-data" :mountPath "/var/lib/gitea"}
|
:volumeMounts [{:name "gitea-state" :mountPath "/var/lib/gitea"}]}]
|
||||||
{:name "gitea-config" :mountPath "/etc/gitea"}]}]
|
|
||||||
|
|
||||||
:volumes
|
:volumes
|
||||||
[{:name "gitea-data" :persistentVolumeClaim {:claimName "gitea-data"}}
|
[{:name "gitea-state"
|
||||||
{:name "gitea-config" :persistentVolumeClaim {:claimName "gitea-config"}}]}}}}
|
:persistentVolumeClaim {:claimName "gitea-state"}}]}}}}
|
||||||
|
|
||||||
:k8s:service-opts
|
:k8s:service-opts
|
||||||
{:spec
|
{:spec
|
||||||
{:type "NodePort"
|
{:type "NodePort"
|
||||||
:selector {:app "gitea"}
|
:selector {:app "gitea"}
|
||||||
:ports [
|
:ports [{:name 'app-name :port 3000 :targetPort 3000}
|
||||||
{:name 'app-name :port 3000 :targetPort 3000}
|
|
||||||
|
|
||||||
{:name "ssh"
|
{:name "ssh"
|
||||||
:port 22
|
:port 22
|
||||||
:targetPort 2222
|
:targetPort 2222
|
||||||
:nodePort 30022
|
:nodePort 30022}]}}
|
||||||
}]}}
|
:k8s:httproute-opts {:spec {::hostnames ['host]
|
||||||
|
:rules [{:matches [{:path {:type "PathPrefix"
|
||||||
|
:value "/"}}]
|
||||||
|
:backendRefs [{:name 'app-name
|
||||||
|
:port 3000}]}]}}})
|
||||||
|
|
||||||
:k8s:httproute-opts {:spec {::hostnames ['host]}}})
|
|
||||||
Reference in New Issue
Block a user