From afa59f361c170373351026f85697b11b56a75f80 Mon Sep 17 00:00:00 2001 From: Zhe Shen Date: Thu, 29 Aug 2024 08:10:24 +0200 Subject: [PATCH] Add GPU/TPU addonplacementscore in node scope and cluster scope for each managed clusters, develop the add-on in addontemplate mode, fix image tag. (#21) Signed-off-by: Zhe Shen --- resource-usage-collect-addon/Makefile | 4 ++-- resource-usage-collect-addon/deploy/kustomization.yaml | 2 +- .../deploy/resources/addon-template.yaml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/resource-usage-collect-addon/Makefile b/resource-usage-collect-addon/Makefile index be91020..5ebacff 100644 --- a/resource-usage-collect-addon/Makefile +++ b/resource-usage-collect-addon/Makefile @@ -20,7 +20,7 @@ PWD=$(shell pwd) # Image URL to use all building/pushing image targets; GO_BUILD_PACKAGES :=./pkg/... IMAGE ?= resource-usage-collect-addon -IMAGE_REGISTRY ?= zheshen +IMAGE_REGISTRY ?= quay.io/haoqing IMAGE_TAG ?= latest IMAGE_NAME ?= $(IMAGE_REGISTRY)/$(IMAGE):$(IMAGE_TAG) @@ -53,7 +53,7 @@ images: ## Build addon binary. .PHONY: deploy deploy: kustomize cp deploy/kustomization.yaml deploy/kustomization.yaml.tmp - cd deploy && $(KUSTOMIZE) edit set image example-addon-image=$(IMAGE_NAME) && $(KUSTOMIZE) edit add configmap image-config --from-literal=IMAGE_NAME=$(IMAGE_NAME) + cd deploy && $(KUSTOMIZE) edit set image example-addon-image=$(IMAGE_NAME) $(KUSTOMIZE) build deploy | $(KUBECTL) apply -f - mv deploy/kustomization.yaml.tmp deploy/kustomization.yaml diff --git a/resource-usage-collect-addon/deploy/kustomization.yaml b/resource-usage-collect-addon/deploy/kustomization.yaml index 22158a3..916e578 100644 --- a/resource-usage-collect-addon/deploy/kustomization.yaml +++ b/resource-usage-collect-addon/deploy/kustomization.yaml @@ -7,7 +7,7 @@ resources: images: - name: example-addon-image - newName: zheshen/resource-usage-collect-addon + newName: quay.io/open-cluster-management/resource-usage-collect-addon newTag: latest apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization diff --git a/resource-usage-collect-addon/deploy/resources/addon-template.yaml b/resource-usage-collect-addon/deploy/resources/addon-template.yaml index 1748a7c..4b3725f 100644 --- a/resource-usage-collect-addon/deploy/resources/addon-template.yaml +++ b/resource-usage-collect-addon/deploy/resources/addon-template.yaml @@ -50,7 +50,7 @@ spec: serviceAccount: resource-usage-collect-agent-sa containers: - name: resource-usage-collect-agent - image: zheshen/resource-usage-collect-addon:latest + image: example-addon-image imagePullPolicy: Always args: - "/addon"