k8s.io/test-infra@v0.0.0-20240520184403-27c6b4c223d8/config/prow/Makefile (about) 1 # Copyright 2021 The Kubernetes Authors. 2 # 3 # Licensed under the Apache License, Version 2.0 (the "License"); 4 # you may not use this file except in compliance with the License. 5 # You may obtain a copy of the License at 6 # 7 # http://www.apache.org/licenses/LICENSE-2.0 8 # 9 # Unless required by applicable law or agreed to in writing, software 10 # distributed under the License is distributed on an "AS IS" BASIS, 11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 # See the License for the specific language governing permissions and 13 # limitations under the License. 14 15 include ../../hack/Makefile.gcloud.mk 16 17 # These are the usual GKE variables. 18 PROJECT ?= k8s-prow 19 CLUSTER ?= prow 20 ZONE ?= us-central1-f 21 22 PROJECT_BUILD ?= k8s-prow-builds 23 CLUSTER_BUILD ?= prow 24 ZONE_BUILD ?= us-central1-f 25 26 JOB_NAMESPACE ?= test-pods 27 28 update-config: get-cluster-credentials 29 kubectl create configmap config --from-file=config.yaml=config.yaml --dry-run=client -o yaml | kubectl replace configmap config -f - 30 31 update-plugins: get-cluster-credentials 32 kubectl create configmap plugins --from-file=plugins.yaml=plugins.yaml --dry-run=client -o yaml | kubectl replace configmap plugins -f - 33 34 deploy-prow: get-cluster-credentials 35 kubectl apply --server-side=true -f ./cluster/prowjob-crd/prowjob_customresourcedefinition.yaml 36 kubectl apply -f ./cluster/ 37 38 # Temporary solution for working around the issue of KES being flaky, see 39 # https://github.com/kubernetes/test-infra/issues/24869#issuecomment-1147530320. 40 # TODO(chaodaiG): remove this once the above issue is fixed. 41 kubectl -n default rollout restart deployment kubernetes-external-secrets 42 43 deploy-build: get-build-cluster-credentials 44 kubectl apply -f ./cluster/build/ 45 46 update-boskos-resources: get-build-cluster-credentials 47 kubectl create configmap resources --from-file=config=./cluster/build/boskos-resources/boskos-resources.yaml --dry-run=client -o yaml | kubectl --namespace=test-pods replace configmap resources -f - 48 49 deploy-monitoring: get-cluster-credentials 50 $(MAKE) -C ./cluster/monitoring apply 51 52 deploy-all: deploy-prow deploy-build deploy-monitoring 53 54 .PHONY: update-config update-plugins deploy-prow deploy-build deploy-monitoring deploy-all 55 56 # The targets below are for breaking glass usages, should not run on a regular 57 # basis 58 59 # Run fix-gencred-refresher will generate kubeconfig for "trusted" build cluster 60 # and store it in GSM, you will need "container.admin" and "secretManager.admin" 61 # permission on k8s-prow GCP project to perform this action. 62 # This target is for solving the bootstrapping problem of gencred refresher, 63 # where it runs in "trusted" build cluster, as a prow job to rotate the 64 # kubeconfig for "trusted" build cluster along with other build clusters. So 65 # when the refresher job failed for more than 2 days, prow will stop working 66 # with "trusted" build cluster and thus not able to schedule gencred refrsher 67 # prow jobs any more. And this is when the admin of this repo need to run this 68 # target manually. 69 fix-gencred-refresher: 70 ../../hack/make-rules/go-run/arbitrary.sh run ./gencred --config=./config/prow/gencred-config/gencred-config.yaml --gke-filter=projects/k8s-prow/locations/us-central1-f/clusters/prow 71 72 .PHONY: fix-gencred-refresher