fix: remove -secret from secrets

This commit is contained in:
ange 2024-05-22 18:21:43 +02:00
parent a05a759489
commit d61eb9dffd
Signed by: ange
GPG Key ID: 9E0C4157BB7BEB1D
5 changed files with 11 additions and 11 deletions

View File

@ -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

View File

@ -78,7 +78,7 @@ spec:
name: gitea
- name: secrets
secret:
secretName: gitea-secrets
secretName: gitea
volumeClaimTemplates:
- metadata:
name: data

View File

@ -29,5 +29,5 @@ spec:
name: gitea
- name: secrets
secret:
secretName: gitea-secrets
secretName: gitea
backoffLimit: 4

View File

@ -27,5 +27,5 @@ spec:
- name: RENOVATE_TOKEN
valueFrom:
secretKeyRef:
name: runner-secret
name: runner
key: token

View File

@ -36,7 +36,7 @@ spec:
- name: GITEA_RUNNER_REGISTRATION_TOKEN
valueFrom:
secretKeyRef:
name: runner-secret
name: runner
key: token
volumeMounts:
- name: data