From 8dcb9cf5104ce7475e7d2e699505fccf41d3ae1a Mon Sep 17 00:00:00 2001 From: Amarpreet Minhas Date: Sat, 9 Mar 2024 21:18:16 +0000 Subject: [PATCH] upgrade to latest forgejo --- helm/{gitea => forgejo}/external-secrets.yaml | 0 helm/{gitea/forgejo.sh => forgejo/install.sh} | 2 +- helm/{gitea => forgejo}/istio-ingress.yaml | 0 helm/{gitea => forgejo}/pvc.yaml | 0 helm/{gitea => forgejo}/values.yaml | 0 helm/gitea/install.sh | 38 ------------------- 6 files changed, 1 insertion(+), 39 deletions(-) rename helm/{gitea => forgejo}/external-secrets.yaml (100%) rename helm/{gitea/forgejo.sh => forgejo/install.sh} (98%) rename helm/{gitea => forgejo}/istio-ingress.yaml (100%) rename helm/{gitea => forgejo}/pvc.yaml (100%) rename helm/{gitea => forgejo}/values.yaml (100%) delete mode 100755 helm/gitea/install.sh diff --git a/helm/gitea/external-secrets.yaml b/helm/forgejo/external-secrets.yaml similarity index 100% rename from helm/gitea/external-secrets.yaml rename to helm/forgejo/external-secrets.yaml diff --git a/helm/gitea/forgejo.sh b/helm/forgejo/install.sh similarity index 98% rename from helm/gitea/forgejo.sh rename to helm/forgejo/install.sh index e5c956c..384c93a 100755 --- a/helm/gitea/forgejo.sh +++ b/helm/forgejo/install.sh @@ -1,6 +1,6 @@ #!/bin/bash -CHART_VERSION=1.1.2 +CHART_VERSION=4.0.2 NAMESPACE=gitea VAULT_AUTH_NAMESPACE="k8s-teapot" diff --git a/helm/gitea/istio-ingress.yaml b/helm/forgejo/istio-ingress.yaml similarity index 100% rename from helm/gitea/istio-ingress.yaml rename to helm/forgejo/istio-ingress.yaml diff --git a/helm/gitea/pvc.yaml b/helm/forgejo/pvc.yaml similarity index 100% rename from helm/gitea/pvc.yaml rename to helm/forgejo/pvc.yaml diff --git a/helm/gitea/values.yaml b/helm/forgejo/values.yaml similarity index 100% rename from helm/gitea/values.yaml rename to helm/forgejo/values.yaml diff --git a/helm/gitea/install.sh b/helm/gitea/install.sh deleted file mode 100755 index 1225c98..0000000 --- a/helm/gitea/install.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/bash - -CHART_VERSION=9.0.4 -NAMESPACE=gitea -VAULT_AUTH_NAMESPACE="k8s-teapot" - -helm repo add gitea-charts https://dl.gitea.io/charts/ -helm repo update - -kubectl create ns gitea -kubectl create serviceaccount -n ${NAMESPACE} gitea -kubectl apply -n ${NAMESPACE} -f external-secrets.yaml -cat << EOH > gitea.hcl -path "kv/data/git" { - capabilities = ["read"] -} -EOH -vault policy write gitea gitea.hcl -rm gitea.hcl - -HOST_IP=$(ip addr show eth0 | grep -Po 'inet \K[\d.]+') -TOKEN="$(kubectl get secret serviceaccounttoken -n gitea -o go-template='{{ .data.token }}' | base64 -d)" - -vault write auth/${VAULT_AUTH_NAMESPACE}/role/gitea \ - bound_service_account_names=gitea \ - bound_service_account_namespaces=gitea \ - policies=gitea \ - ttl=24h - -vault write auth/${VAULT_AUTH_NAMESPACE}/login role=gitea jwt=${TOKEN} iss=https://${HOST_IP}:6443 - -helm upgrade --install \ - gitea \ - gitea-charts/gitea \ - -f values.yaml \ - -n ${NAMESPACE} \ - --version ${CHART_VERSION} \ - --cleanup-on-fail