From d61eb9dffd1fadcf097b8a8cc47742c8c64cef46 Mon Sep 17 00:00:00 2001 From: ange Date: Wed, 22 May 2024 18:21:43 +0200 Subject: [PATCH] fix: remove -secret from secrets --- manifests/bin/deploy.sh | 14 +++++++------- manifests/common/app.yaml | 2 +- manifests/common/job.yaml | 2 +- manifests/common/renovate.yaml | 2 +- manifests/common/runner.yaml | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/manifests/bin/deploy.sh b/manifests/bin/deploy.sh index f11015f..fd314cc 100755 --- a/manifests/bin/deploy.sh +++ b/manifests/bin/deploy.sh @@ -50,9 +50,9 @@ kcreatesec gitea-admin \ --from-literal=username="$GITEA_USERNAME" \ --from-literal=password="$GITEA_PASSWORD" -kcreatesec gitea-secrets \ - --from-literal=secret_key="$(kgseckey gitea-secrets secret_key || openssl rand -hex 32)" \ - --from-literal=internal_token="$(kgseckey gitea-secrets internal_token || openssl rand -hex 32)" +kcreatesec gitea \ + --from-literal=secret_key="$(kgseckey gitea secret_key || openssl rand -hex 32)" \ + --from-literal=internal_token="$(kgseckey gitea internal_token || openssl rand -hex 32)" kcreatecm gitea \ --from-file=app.ini=<(envsubst "$(env | xargs printf '$%s ')" < config/app.ini) @@ -65,11 +65,11 @@ kubectl rollout restart statefulset app kubectl rollout status sts app -RUNNER_TOKEN="$(kgseckey runner-secret token || kubectl exec app-0 -- gitea actions generate-runner-token)" -kcreatesec runner-secret --from-literal=token="$RUNNER_TOKEN" +kcreatesec runner \ + --from-literal=token="$(kgseckey runner token || kubectl exec app-0 -- gitea actions generate-runner-token)" -RENOVATE_TOKEN="$(kgseckey renovate-secret token || kubectl exec app-0 -- gitea admin user generate-access-token --username "$GITEA_USERNAME" --token-name RENOVATE --scopes 'write:repository,read:user,write:issue,read:organization' | grep -o '[a-f0-9]\+$')" -kcreatesec renovate-secret --from-literal=token="$RENOVATE_TOKEN" +kcreatesec renovate \ + --from-literal=token="$(kgseckey renovate token || kubectl exec app-0 -- gitea admin user generate-access-token --username "$GITEA_USERNAME" --token-name RENOVATE --scopes 'write:repository,read:user,write:issue,read:organization' | grep -o '[a-f0-9]\+$')" kapply common/runner.yaml common/renovate.yaml diff --git a/manifests/common/app.yaml b/manifests/common/app.yaml index e9a7990..e205f85 100644 --- a/manifests/common/app.yaml +++ b/manifests/common/app.yaml @@ -78,7 +78,7 @@ spec: name: gitea - name: secrets secret: - secretName: gitea-secrets + secretName: gitea volumeClaimTemplates: - metadata: name: data diff --git a/manifests/common/job.yaml b/manifests/common/job.yaml index e602597..0281b29 100644 --- a/manifests/common/job.yaml +++ b/manifests/common/job.yaml @@ -29,5 +29,5 @@ spec: name: gitea - name: secrets secret: - secretName: gitea-secrets + secretName: gitea backoffLimit: 4 diff --git a/manifests/common/renovate.yaml b/manifests/common/renovate.yaml index 159e02c..9b175d9 100644 --- a/manifests/common/renovate.yaml +++ b/manifests/common/renovate.yaml @@ -27,5 +27,5 @@ spec: - name: RENOVATE_TOKEN valueFrom: secretKeyRef: - name: runner-secret + name: runner key: token diff --git a/manifests/common/runner.yaml b/manifests/common/runner.yaml index 19fea4c..7bd276f 100644 --- a/manifests/common/runner.yaml +++ b/manifests/common/runner.yaml @@ -36,7 +36,7 @@ spec: - name: GITEA_RUNNER_REGISTRATION_TOKEN valueFrom: secretKeyRef: - name: runner-secret + name: runner key: token volumeMounts: - name: data