Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(apps/prod/tekton/setup): fix the issue arm64 image for prune #644

Merged
merged 1 commit into from
Jul 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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:/tektoncd/operator/releases/download/v0.55.1/release.yaml
# - https:/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