mirror of
https://github.com/amkartashov/gf-k8s.git
synced 2026-01-10 17:39:43 +00:00
forgejo: continue
This commit is contained in:
parent
139861a92a
commit
bf8d3e1c88
5 changed files with 88 additions and 40 deletions
21
README.rst
21
README.rst
|
|
@ -160,7 +160,7 @@ ArgoCD bootstrap
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
argocd login --grpc-web argocd.ioot.xyz
|
argocd login --grpc-web argocd.ioot.xyz --sso
|
||||||
argocd repo add git@github.com:amkartashov/gf-k8s --ssh-private-key-path ~/.ssh/argocd.ioot.xyz
|
argocd repo add git@github.com:amkartashov/gf-k8s --ssh-private-key-path ~/.ssh/argocd.ioot.xyz
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -204,10 +204,23 @@ ArgoCD bootstrap
|
||||||
argocd app set argocd/grafana --parameter githubClientSecret=REPLACE
|
argocd app set argocd/grafana --parameter githubClientSecret=REPLACE
|
||||||
argocd app set argocd/grafana --parameter adminPassword=`pwgen -1 12`
|
argocd app set argocd/grafana --parameter adminPassword=`pwgen -1 12`
|
||||||
|
|
||||||
* Reset forgejo password
|
* Create new Oauth application https://github.com/settings/applications/new:
|
||||||
|
|
||||||
.. code-block:: bash
|
* Application name: git.ioot.xyz
|
||||||
argocd app set argocd/forgejo --parameter adminPassword=`pwgen -1 12`
|
* Homepage URL: https://git.ioot.xyz/
|
||||||
|
* Authorization callback URL: https://git.ioot.xyz/user/oauth2/GitHub/callback
|
||||||
|
* Update client secret and admin password:
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
argocd app set argocd/forgejo --parameter 'gitea.oauth[0].key=REPLACE'
|
||||||
|
argocd app set argocd/forgejo --parameter 'gitea.oauth[0].secret=REPLACE'
|
||||||
|
argocd app set argocd/forgejo --parameter gitea.admin.password=`pwgen -1 12`
|
||||||
|
argocd app set argocd/forgejo --parameter gitea.config.database.PASSWD=$(\
|
||||||
|
kubectl --context gullfaxi -n forgejo get secret \
|
||||||
|
postgresql-app -o jsonpath='{.data.password}' \
|
||||||
|
| base64 -d \
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
* Remove secret ``kubectl --context gullfaxi -n argocd delete secret argocd-initial-admin-secret``.
|
* Remove secret ``kubectl --context gullfaxi -n argocd delete secret argocd-initial-admin-secret``.
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,8 @@ apiVersion: argoproj.io/v1alpha1
|
||||||
kind: Application
|
kind: Application
|
||||||
metadata:
|
metadata:
|
||||||
name: cloudnative-pg
|
name: cloudnative-pg
|
||||||
|
labels:
|
||||||
|
app-type: operator
|
||||||
spec:
|
spec:
|
||||||
destination:
|
destination:
|
||||||
server: https://kubernetes.default.svc
|
server: https://kubernetes.default.svc
|
||||||
|
|
|
||||||
|
|
@ -29,41 +29,50 @@ spec:
|
||||||
selfHeal: true
|
selfHeal: true
|
||||||
syncOptions:
|
syncOptions:
|
||||||
- CreateNamespace=true
|
- CreateNamespace=true
|
||||||
sources:
|
source:
|
||||||
- repoURL: codeberg.org/forgejo-contrib
|
repoURL: codeberg.org/forgejo-contrib
|
||||||
chart: forgejo
|
chart: forgejo
|
||||||
targetRevision: 0.12.1
|
targetRevision: 0.12.1
|
||||||
helm:
|
helm:
|
||||||
valuesObject:
|
valuesObject:
|
||||||
memcached:
|
memcached:
|
||||||
enabled: false
|
enabled: false
|
||||||
postgresql:
|
postgresql:
|
||||||
enabled: false
|
enabled: false
|
||||||
test:
|
test:
|
||||||
enabled: false
|
enabled: false
|
||||||
ingress:
|
ingress:
|
||||||
|
enabled: true
|
||||||
|
className: nginx
|
||||||
|
annotations:
|
||||||
|
cert-manager.io/cluster-issuer: letsencrypt
|
||||||
|
hosts:
|
||||||
|
- host: git.ioot.xyz
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: Prefix
|
||||||
|
tls:
|
||||||
|
- secretName: forgejo-tls
|
||||||
|
hosts:
|
||||||
|
- git.ioot.xyz
|
||||||
|
gitea:
|
||||||
|
admin:
|
||||||
|
username: amkartashov
|
||||||
|
# password: reset_in_argocd
|
||||||
|
email: "a@ioot.xyz"
|
||||||
|
oauth:
|
||||||
|
- name: GitHub
|
||||||
|
provider: github
|
||||||
|
config:
|
||||||
|
database:
|
||||||
|
DB_TYPE: postgres
|
||||||
|
HOST: postgresql-rw
|
||||||
|
NAME: gitea
|
||||||
|
USER: gitea
|
||||||
|
# PASSWD: reset_in_argocd
|
||||||
|
service:
|
||||||
|
DISABLE_REGISTRATION: "true"
|
||||||
|
metrics:
|
||||||
enabled: true
|
enabled: true
|
||||||
className: nginx
|
serviceMonitor:
|
||||||
annotations:
|
|
||||||
kubernetes.io/tls-acme: "true"
|
|
||||||
hosts:
|
|
||||||
- host: git.ioot.xyz
|
|
||||||
paths:
|
|
||||||
- path: /
|
|
||||||
pathType: Prefix
|
|
||||||
tls:
|
|
||||||
- secretName: forgejo-tls
|
|
||||||
hosts:
|
|
||||||
- git.ioot.xyz
|
|
||||||
gitea:
|
|
||||||
admin:
|
|
||||||
username: admin
|
|
||||||
password: reset_in_argocd
|
|
||||||
email: "a@ioot.xyz"
|
|
||||||
metrics:
|
|
||||||
enabled: true
|
enabled: true
|
||||||
serviceMonitor:
|
|
||||||
enabled: true
|
|
||||||
- repoURL: git@github.com:amkartashov/gf-k8s.git
|
|
||||||
targetRevision: main
|
|
||||||
path: state/gullfaxi/apps/forgejo/manifests
|
|
||||||
|
|
|
||||||
19
state/gullfaxi/apps/forgejo/postgresql/application.yaml
Normal file
19
state/gullfaxi/apps/forgejo/postgresql/application.yaml
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
apiVersion: argoproj.io/v1alpha1
|
||||||
|
kind: Application
|
||||||
|
metadata:
|
||||||
|
name: forgejo-postgres
|
||||||
|
spec:
|
||||||
|
destination:
|
||||||
|
server: https://kubernetes.default.svc
|
||||||
|
namespace: forgejo
|
||||||
|
project: apps
|
||||||
|
syncPolicy:
|
||||||
|
automated:
|
||||||
|
prune: true
|
||||||
|
selfHeal: true
|
||||||
|
syncOptions:
|
||||||
|
- CreateNamespace=true
|
||||||
|
source:
|
||||||
|
repoURL: git@github.com:amkartashov/gf-k8s.git
|
||||||
|
targetRevision: main
|
||||||
|
path: state/gullfaxi/apps/forgejo/postgresql/manifests
|
||||||
|
|
@ -8,3 +8,8 @@ spec:
|
||||||
primaryUpdateStrategy: unsupervised
|
primaryUpdateStrategy: unsupervised
|
||||||
storage:
|
storage:
|
||||||
size: 10Gi
|
size: 10Gi
|
||||||
|
bootstrap:
|
||||||
|
initdb:
|
||||||
|
database: gitea
|
||||||
|
localeCollate: en_US.UTF-8
|
||||||
|
localeCType: en_US.UTF-8
|
||||||
Loading…
Reference in a new issue