Skip to content

Commit

Permalink
fix(apps/prod/tekton/setup): fix the issue arm64 image for prune (#644)
Browse files Browse the repository at this point in the history
Signed-off-by: wuhuizuo <wuhuizuo@126.com>
  • Loading branch information
wuhuizuo authored Jul 19, 2023
1 parent d69e6c2 commit 45f876d
Show file tree
Hide file tree
Showing 3 changed files with 1,079 additions and 1 deletion.
17 changes: 17 additions & 0 deletions apps/prod/prow-worker/gencred.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/usr/bin/env bash

function main() {
local ns=$1
local account=$2
local saSecretName=$(kubectl -n $ns get sa/${account} -o jsonpath='{.secrets[0].name}')
local saToken=$(kubectl -n $ns get secret/${saSecretName} -o jsonpath='{.data.token}' | base64 -d)
local kubeServer=$(kubectl config view --minify -o jsonpath='{.clusters[0].cluster.server}')
local kubeCA=$(kubectl config view --minify -o jsonpath='{.clusters[0].cluster.certificate-authority-data}')

kubectl config set-cluster "${ns}-${account}" --server=$kubeServer --certificate-authority=<(echo $kubeCA | base64 -d) --embed-certs=true --kubeconfig=${ns}-${account}.conf
kubectl config set-credentials ${account} --token=$saToken --kubeconfig=${ns}-${account}.conf
kubectl config set-context "${ns}-${account}" --cluster="${ns}-${account}" --user=${account} --namespace=$ns --kubeconfig=${ns}-${account}.conf
kubectl config use-context "${ns}-${account}" --kubeconfig="${ns}-${account}".conf
}

main "$@"
5 changes: 4 additions & 1 deletion apps/prod/tekton/setup/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ kind: Kustomization
resources:
- namespace.yaml
# renovate: datasource=github-releases depName=tektoncd/operator versioning=semver
- https://github.com/tektoncd/operator/releases/download/v0.55.1/release.yaml
# - https://github.com/tektoncd/operator/releases/download/v0.55.1/release.yaml
# we fixed the image tag to make it runable on arm64 nodes:
# gcr.io/tekton-releases/dogfooding/tkn
- operator-release.yaml
- operator-config.yaml
- ingress-dashboard.yaml
Loading

0 comments on commit 45f876d

Please sign in to comment.