k8s.io/test-infra@v0.0.0-20240520184403-27c6b4c223d8/label_sync/Makefile (about)

     1  # Copyright 2017 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  # These are the usual GKE variables.
    16  PROJECT       ?= k8s-prow
    17  ZONE          ?= us-central1-f
    18  CLUSTER       ?= prow
    19  
    20  get-cluster-credentials:
    21  	gcloud container clusters get-credentials "$(CLUSTER)" --project="$(PROJECT)" --zone="$(ZONE)"
    22  
    23  update-config: get-cluster-credentials
    24  	# Oddy the first time requires creating it instead of replacing it...
    25  	kubectl create configmap label-config --from-file=labels.yaml=labels.yaml --dry-run -o yaml | kubectl replace configmap label-config -f -
    26  
    27  label_sync-job: get-cluster-credentials
    28  	kubectl apply -f cluster/label_sync_job.yaml
    29  
    30  label_sync-cronjob: get-cluster-credentials
    31  	kubectl apply -f cluster/label_sync_cron_job.yaml
    32  
    33  .PHONY: label_sync-job label_sync-cronjob bazel get-cluster-credentials