From 1922e7b0ca970fc849383c93a9de17625be0f03f Mon Sep 17 00:00:00 2001 From: nikmohan123 <154277636+nikmohan123@users.noreply.github.com> Date: Thu, 14 Mar 2024 18:42:38 -0500 Subject: [PATCH 1/6] docs: Documentation on minValues in NodePool requirement. (#5853) Co-authored-by: nikmohan --- examples/v1beta1/minValues-family.yaml | 52 ++++++++++++++ examples/v1beta1/minValues-multiple-keys.yaml | 56 +++++++++++++++ website/content/en/docs/concepts/nodepools.md | 69 +++++++++++++++++++ .../content/en/preview/concepts/nodepools.md | 69 +++++++++++++++++++ .../content/en/v0.35/concepts/nodepools.md | 69 +++++++++++++++++++ 5 files changed, 315 insertions(+) create mode 100644 examples/v1beta1/minValues-family.yaml create mode 100644 examples/v1beta1/minValues-multiple-keys.yaml diff --git a/examples/v1beta1/minValues-family.yaml b/examples/v1beta1/minValues-family.yaml new file mode 100644 index 000000000000..30a54e737f89 --- /dev/null +++ b/examples/v1beta1/minValues-family.yaml @@ -0,0 +1,52 @@ +# This example will use spot instance type for all provisioned instances +# and enforces minValues to instance families which means at least that number of unique instance +# families is required by the scheduler for the NodeClaim creation. +--- +apiVersion: karpenter.sh/v1beta1 +kind: NodePool +metadata: + name: spot + annotations: + kubernetes.io/description: "NodePool for provisioning spot capacity" +spec: + template: + spec: + requirements: + - key: karpenter.sh/capacity-type + operator: In + values: ["spot"] + - key: kubernetes.io/arch + operator: In + values: ["amd64"] + - key: kubernetes.io/os + operator: In + values: ["linux"] + - key: karpenter.k8s.aws/instance-category + operator: In + values: ["c", "m", "r"] + - key: karpenter.k8s.aws/instance-family + operator: Exists + minValues: 5 + - key: karpenter.k8s.aws/instance-generation + operator: Gt + values: ["2"] + nodeClassRef: + apiVersion: karpenter.k8s.aws/v1beta1 + kind: EC2NodeClass + name: default +--- +apiVersion: karpenter.k8s.aws/v1beta1 +kind: EC2NodeClass +metadata: + name: default + annotations: + kubernetes.io/description: "General purpose EC2NodeClass for running Amazon Linux 2 nodes" +spec: + amiFamily: AL2 # Amazon Linux 2 + role: "KarpenterNodeRole-${CLUSTER_NAME}" # replace with your cluster name + subnetSelectorTerms: + - tags: + karpenter.sh/discovery: "${CLUSTER_NAME}" # replace with your cluster name + securityGroupSelectorTerms: + - tags: + karpenter.sh/discovery: "${CLUSTER_NAME}" # replace with your cluster name \ No newline at end of file diff --git a/examples/v1beta1/minValues-multiple-keys.yaml b/examples/v1beta1/minValues-multiple-keys.yaml new file mode 100644 index 000000000000..1fa780147d8b --- /dev/null +++ b/examples/v1beta1/minValues-multiple-keys.yaml @@ -0,0 +1,56 @@ +# This example will use spot instance type for all provisioned instances and enforces minValues to various keys where it is defined i.e +# at least 2 unique instance families from [c,m,r], 5 unique instance families [eg: "m5","m5d","m5dn","c5","c5d","c4" etc], 2 unique instance types [eg: "c5.2xlarge","c4.xlarge" etc] are required by the scheduler for the NodeClaim creation. +# This ensures minimum flexiblity required to schedule pods into spot nodes. +--- +apiVersion: karpenter.sh/v1beta1 +kind: NodePool +metadata: + name: spot + annotations: + kubernetes.io/description: "NodePool for provisioning spot capacity" +spec: + template: + spec: + requirements: + - key: karpenter.sh/capacity-type + operator: In + values: ["spot"] + - key: kubernetes.io/arch + operator: In + values: ["amd64"] + - key: kubernetes.io/os + operator: In + values: ["linux"] + - key: karpenter.k8s.aws/instance-category + operator: In + values: ["c", "m", "r"] + minValues: 2 + - key: karpenter.k8s.aws/instance-family + operator: Exists + minValues: 5 + - key: node.kubernetes.io/instance-type + operator: Exists + minValues: 2 + - key: karpenter.k8s.aws/instance-generation + operator: Gt + values: ["2"] + nodeClassRef: + apiVersion: karpenter.k8s.aws/v1beta1 + kind: EC2NodeClass + name: default +--- +apiVersion: karpenter.k8s.aws/v1beta1 +kind: EC2NodeClass +metadata: + name: default + annotations: + kubernetes.io/description: "General purpose EC2NodeClass for running Amazon Linux 2 nodes" +spec: + amiFamily: AL2 # Amazon Linux 2 + role: "KarpenterNodeRole-${CLUSTER_NAME}" # replace with your cluster name + subnetSelectorTerms: + - tags: + karpenter.sh/discovery: "${CLUSTER_NAME}" # replace with your cluster name + securityGroupSelectorTerms: + - tags: + karpenter.sh/discovery: "${CLUSTER_NAME}" # replace with your cluster name \ No newline at end of file diff --git a/website/content/en/docs/concepts/nodepools.md b/website/content/en/docs/concepts/nodepools.md index 93efff341595..f890569adea3 100644 --- a/website/content/en/docs/concepts/nodepools.md +++ b/website/content/en/docs/concepts/nodepools.md @@ -71,6 +71,12 @@ spec: - key: "karpenter.k8s.aws/instance-category" operator: In values: ["c", "m", "r"] + # minValues here enforces the scheduler to consider at least that number of unique instance-category to schedule the pods. + minValues: 2 + - key: "karpenter.k8s.aws/instance-family" + operator: In + values: ["m5","m5d","c5","c5d","c4","r4"] + minValues: 5 - key: "karpenter.k8s.aws/instance-cpu" operator: In values: ["4", "8", "16", "32"] @@ -224,6 +230,69 @@ Karpenter prioritizes Spot offerings if the NodePool allows Spot and on-demand i Karpenter also allows `karpenter.sh/capacity-type` to be used as a topology key for enforcing topology-spread. +Along with the combination of [key,operator,values] in the requirements, Karpenter also supports `minValues` in the NodePool requirements block, allowing the scheduler to be aware of user-specified flexibility minimums while scheduling pods to a cluster. If Karpenter cannot meet this minimum flexibility for each key when scheduling a pod, it will fail the scheduling loop for that NodePool, either falling back to another NodePool which meets the pod requirements or failing scheduling the pod altogether. + +For example, the below spec will use spot instance type for all provisioned instances and enforces `minValues` to various keys where it is defined +i.e at least 2 unique instance families from [c,m,r], 5 unique instance families [eg: "m5","m5d","r4","c5","c5d","c4" etc], 10 unique instance types [eg: "c5.2xlarge","c4.xlarge" etc] is required for scheduling the pods. + +```yaml +spec: + template: + spec: + requirements: + - key: kubernetes.io/arch + operator: In + values: ["amd64"] + - key: kubernetes.io/os + operator: In + values: ["linux"] + - key: karpenter.k8s.aws/instance-category + operator: In + values: ["c", "m", "r"] + minValues: 2 + - key: karpenter.k8s.aws/instance-family + operator: Exists + minValues: 5 + - key: node.kubernetes.io/instance-type + operator: Exists + minValues: 10 + - key: karpenter.k8s.aws/instance-generation + operator: Gt + values: ["2"] +``` + +Note that `minValues` can be used with multiple operators and multiple requirements. And if the `minValues` are defined with multiple operators for the same requirement key, scheduler considers the max of all the `minValues` for that requirement. For example, the below spec requires scheduler to consider at least 5 instance-family to schedule the pods. + +```yaml +spec: + template: + spec: + requirements: + - key: kubernetes.io/arch + operator: In + values: ["amd64"] + - key: kubernetes.io/os + operator: In + values: ["linux"] + - key: karpenter.k8s.aws/instance-category + operator: In + values: ["c", "m", "r"] + minValues: 2 + - key: karpenter.k8s.aws/instance-family + operator: Exists + minValues: 5 + - key: karpenter.k8s.aws/instance-family + operator: In + values: ["m5","m5d","c5","c5d","c4","r4"] + minValues: 3 + - key: node.kubernetes.io/instance-type + operator: Exists + minValues: 10 + - key: karpenter.k8s.aws/instance-generation + operator: Gt + values: ["2"] +``` + {{% alert title="Recommended" color="primary" %}} Karpenter allows you to be extremely flexible with your NodePools by only constraining your instance types in ways that are absolutely necessary for your cluster. By default, Karpenter will enforce that you specify the `spec.template.spec.requirements` field, but will not enforce that you specify any requirements within the field. If you choose to specify `requirements: []`, this means that you will completely flexible to _all_ instance types that your cloud provider supports. diff --git a/website/content/en/preview/concepts/nodepools.md b/website/content/en/preview/concepts/nodepools.md index d524445f6133..8964c5dd4781 100644 --- a/website/content/en/preview/concepts/nodepools.md +++ b/website/content/en/preview/concepts/nodepools.md @@ -71,6 +71,12 @@ spec: - key: "karpenter.k8s.aws/instance-category" operator: In values: ["c", "m", "r"] + # minValues here enforces the scheduler to consider at least that number of unique instance-category to schedule the pods. + minValues: 2 + - key: "karpenter.k8s.aws/instance-family" + operator: In + values: ["m5","m5d","c5","c5d","c4","r4"] + minValues: 5 - key: "karpenter.k8s.aws/instance-cpu" operator: In values: ["4", "8", "16", "32"] @@ -224,6 +230,69 @@ Karpenter prioritizes Spot offerings if the NodePool allows Spot and on-demand i Karpenter also allows `karpenter.sh/capacity-type` to be used as a topology key for enforcing topology-spread. +Along with the combination of [key,operator,values] in the requirements, Karpenter also supports `minValues` in the NodePool requirements block, allowing the scheduler to be aware of user-specified flexibility minimums while scheduling pods to a cluster. If Karpenter cannot meet this minimum flexibility for each key when scheduling a pod, it will fail the scheduling loop for that NodePool, either falling back to another NodePool which meets the pod requirements or failing scheduling the pod altogether. + +For example, the below spec will use spot instance type for all provisioned instances and enforces `minValues` to various keys where it is defined +i.e at least 2 unique instance families from [c,m,r], 5 unique instance families [eg: "m5","m5d","r4","c5","c5d","c4" etc], 10 unique instance types [eg: "c5.2xlarge","c4.xlarge" etc] is required for scheduling the pods. + +```yaml +spec: + template: + spec: + requirements: + - key: kubernetes.io/arch + operator: In + values: ["amd64"] + - key: kubernetes.io/os + operator: In + values: ["linux"] + - key: karpenter.k8s.aws/instance-category + operator: In + values: ["c", "m", "r"] + minValues: 2 + - key: karpenter.k8s.aws/instance-family + operator: Exists + minValues: 5 + - key: node.kubernetes.io/instance-type + operator: Exists + minValues: 10 + - key: karpenter.k8s.aws/instance-generation + operator: Gt + values: ["2"] +``` + +Note that `minValues` can be used with multiple operators and multiple requirements. And if the `minValues` are defined with multiple operators for the same requirement key, scheduler considers the max of all the `minValues` for that requirement. For example, the below spec requires scheduler to consider at least 5 instance-family to schedule the pods. + +```yaml +spec: + template: + spec: + requirements: + - key: kubernetes.io/arch + operator: In + values: ["amd64"] + - key: kubernetes.io/os + operator: In + values: ["linux"] + - key: karpenter.k8s.aws/instance-category + operator: In + values: ["c", "m", "r"] + minValues: 2 + - key: karpenter.k8s.aws/instance-family + operator: Exists + minValues: 5 + - key: karpenter.k8s.aws/instance-family + operator: In + values: ["m5","m5d","c5","c5d","c4","r4"] + minValues: 3 + - key: node.kubernetes.io/instance-type + operator: Exists + minValues: 10 + - key: karpenter.k8s.aws/instance-generation + operator: Gt + values: ["2"] +``` + {{% alert title="Recommended" color="primary" %}} Karpenter allows you to be extremely flexible with your NodePools by only constraining your instance types in ways that are absolutely necessary for your cluster. By default, Karpenter will enforce that you specify the `spec.template.spec.requirements` field, but will not enforce that you specify any requirements within the field. If you choose to specify `requirements: []`, this means that you will completely flexible to _all_ instance types that your cloud provider supports. diff --git a/website/content/en/v0.35/concepts/nodepools.md b/website/content/en/v0.35/concepts/nodepools.md index cb85d5988475..9937cd29a095 100644 --- a/website/content/en/v0.35/concepts/nodepools.md +++ b/website/content/en/v0.35/concepts/nodepools.md @@ -71,6 +71,12 @@ spec: - key: "karpenter.k8s.aws/instance-category" operator: In values: ["c", "m", "r"] + # minValues here enforces the scheduler to consider at least that number of unique instance-category to schedule the pods. + minValues: 2 + - key: "karpenter.k8s.aws/instance-family" + operator: In + values: ["m5","m5d","c5","c5d","c4","r4"] + minValues: 5 - key: "karpenter.k8s.aws/instance-cpu" operator: In values: ["4", "8", "16", "32"] @@ -224,6 +230,69 @@ Karpenter prioritizes Spot offerings if the NodePool allows Spot and on-demand i Karpenter also allows `karpenter.sh/capacity-type` to be used as a topology key for enforcing topology-spread. +Along with the combination of [key,operator,values] in the requirements, Karpenter also supports `minValues` in the NodePool requirements block, allowing the scheduler to be aware of user-specified flexibility minimums while scheduling pods to a cluster. If Karpenter cannot meet this minimum flexibility for each key when scheduling a pod, it will fail the scheduling loop for that NodePool, either falling back to another NodePool which meets the pod requirements or failing scheduling the pod altogether. + +For example, the below spec will use spot instance type for all provisioned instances and enforces `minValues` to various keys where it is defined +i.e at least 2 unique instance families from [c,m,r], 5 unique instance families [eg: "m5","m5d","r4","c5","c5d","c4" etc], 10 unique instance types [eg: "c5.2xlarge","c4.xlarge" etc] is required for scheduling the pods. + +```yaml +spec: + template: + spec: + requirements: + - key: kubernetes.io/arch + operator: In + values: ["amd64"] + - key: kubernetes.io/os + operator: In + values: ["linux"] + - key: karpenter.k8s.aws/instance-category + operator: In + values: ["c", "m", "r"] + minValues: 2 + - key: karpenter.k8s.aws/instance-family + operator: Exists + minValues: 5 + - key: node.kubernetes.io/instance-type + operator: Exists + minValues: 10 + - key: karpenter.k8s.aws/instance-generation + operator: Gt + values: ["2"] +``` + +Note that `minValues` can be used with multiple operators and multiple requirements. And if the `minValues` are defined with multiple operators for the same requirement key, scheduler considers the max of all the `minValues` for that requirement. For example, the below spec requires scheduler to consider at least 5 instance-family to schedule the pods. + +```yaml +spec: + template: + spec: + requirements: + - key: kubernetes.io/arch + operator: In + values: ["amd64"] + - key: kubernetes.io/os + operator: In + values: ["linux"] + - key: karpenter.k8s.aws/instance-category + operator: In + values: ["c", "m", "r"] + minValues: 2 + - key: karpenter.k8s.aws/instance-family + operator: Exists + minValues: 5 + - key: karpenter.k8s.aws/instance-family + operator: In + values: ["m5","m5d","c5","c5d","c4","r4"] + minValues: 3 + - key: node.kubernetes.io/instance-type + operator: Exists + minValues: 10 + - key: karpenter.k8s.aws/instance-generation + operator: Gt + values: ["2"] +``` + {{% alert title="Recommended" color="primary" %}} Karpenter allows you to be extremely flexible with your NodePools by only constraining your instance types in ways that are absolutely necessary for your cluster. By default, Karpenter will enforce that you specify the `spec.template.spec.requirements` field, but will not enforce that you specify any requirements within the field. If you choose to specify `requirements: []`, this means that you will completely flexible to _all_ instance types that your cloud provider supports. From 73239313c1d860440c5221c19500c0f6213cd699 Mon Sep 17 00:00:00 2001 From: Jonathan Innis Date: Thu, 14 Mar 2024 18:22:05 -0700 Subject: [PATCH 2/6] chore: Bump karpenter to latest HEAD (#5871) --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 46421a87c585..19e20f5433b5 100644 --- a/go.mod +++ b/go.mod @@ -28,7 +28,7 @@ require ( k8s.io/utils v0.0.0-20240102154912-e7106e64919e knative.dev/pkg v0.0.0-20231010144348-ca8c009405dd sigs.k8s.io/controller-runtime v0.17.2 - sigs.k8s.io/karpenter v0.35.1-0.20240311230445-343eb7580913 + sigs.k8s.io/karpenter v0.35.1-0.20240314163853-c6b8b811c3d0 sigs.k8s.io/yaml v1.4.0 ) diff --git a/go.sum b/go.sum index 722875ed5fde..ddff08f3e845 100644 --- a/go.sum +++ b/go.sum @@ -757,8 +757,8 @@ sigs.k8s.io/controller-runtime v0.17.2 h1:FwHwD1CTUemg0pW2otk7/U5/i5m2ymzvOXdbeG sigs.k8s.io/controller-runtime v0.17.2/go.mod h1:+MngTvIQQQhfXtwfdGw/UOQ/aIaqsYywfCINOtwMO/s= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= -sigs.k8s.io/karpenter v0.35.1-0.20240311230445-343eb7580913 h1:ldnc5SBfq/5lMXt1NSQMPr/ONvGwfoD6Cf/uCptFEGY= -sigs.k8s.io/karpenter v0.35.1-0.20240311230445-343eb7580913/go.mod h1:DYnwDaoy2AhZwL2Ie96RGVu15+K6P5AJkSAtpPCRy8k= +sigs.k8s.io/karpenter v0.35.1-0.20240314163853-c6b8b811c3d0 h1:IKGl5MC8nx4SO8z5nuLI1+CwOD+ej/AQowh5Iurj8uQ= +sigs.k8s.io/karpenter v0.35.1-0.20240314163853-c6b8b811c3d0/go.mod h1:yb+1r5cysByx1xePT48lMHZU6EKlqOUNJiP1phbvFVc= sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4= sigs.k8s.io/structured-merge-diff/v4 v4.4.1/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= From f167e3ce9dfbb5fef84f80794dae954024685be7 Mon Sep 17 00:00:00 2001 From: Steve Hipwell Date: Fri, 15 Mar 2024 02:27:50 +0000 Subject: [PATCH 3/6] chore: Added ArtifactHub Helm metadata (#5843) Signed-off-by: Steve Hipwell --- charts/karpenter-crd/artifacthub-repo.yaml | 7 +++++++ charts/karpenter/artifacthub-repo.yaml | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/charts/karpenter-crd/artifacthub-repo.yaml b/charts/karpenter-crd/artifacthub-repo.yaml index e69de29bb2d1..194c8d2496ea 100644 --- a/charts/karpenter-crd/artifacthub-repo.yaml +++ b/charts/karpenter-crd/artifacthub-repo.yaml @@ -0,0 +1,7 @@ +repositoryID: fda7ffc4-4672-4218-8264-321ec3b4e3cc +owners: [] +# - name: awsadmin1 +# email: artifacthub1@aws.com +ignore: + - name: karpenter-crd + version: (?:^\d+$)|(?:^v?0\.0\.0)|(?:^v?\d+\-) diff --git a/charts/karpenter/artifacthub-repo.yaml b/charts/karpenter/artifacthub-repo.yaml index e69de29bb2d1..48d9ca7ce581 100644 --- a/charts/karpenter/artifacthub-repo.yaml +++ b/charts/karpenter/artifacthub-repo.yaml @@ -0,0 +1,7 @@ +repositoryID: 356cb63f-9ee3-4956-9c20-003e416715c7 +owners: [] +# - name: awsadmin1 +# email: artifacthub1@aws.com +ignore: + - name: karpenter + version: (?:^\d+$)|(?:^v?0\.0\.0)|(?:^v?\d+\-) From 62faff89b3e1115525ec24a30a68253fa7f7e873 Mon Sep 17 00:00:00 2001 From: Jonathan Innis Date: Fri, 15 Mar 2024 09:43:51 -0700 Subject: [PATCH 4/6] ci: Fix helm chart push for artifacthub file (#5873) --- hack/release/common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hack/release/common.sh b/hack/release/common.sh index e81170125114..450dbf984803 100644 --- a/hack/release/common.sh +++ b/hack/release/common.sh @@ -97,7 +97,7 @@ publishHelmChart() { # https://github.com/aws/containers-roadmap/issues/1074 temp=$(mktemp) echo {} > "${temp}" - oras push "${oci_repo}/${helm_chart}:artifacthub.io" --config "${temp}:application/vnd.cncf.artifacthub.config.v1+yaml" "${ah_config_file_name}:application/vnd.cncf.artifacthub.repository-metadata.layer.v1.yaml" + oras push "${oci_repo}${helm_chart}:artifacthub.io" --config "${temp}:application/vnd.cncf.artifacthub.config.v1+yaml" "${ah_config_file_name}:application/vnd.cncf.artifacthub.repository-metadata.layer.v1.yaml" fi helm dependency update "${helm_chart}" helm lint "${helm_chart}" From 354fdda6d5bae46bb2924dbf6684fc9a6d6a84f0 Mon Sep 17 00:00:00 2001 From: Erez Zarum Date: Fri, 15 Mar 2024 19:05:12 +0200 Subject: [PATCH 5/6] docs: fix kompat tools to support semantic versioning correctly (#5859) --- tools/kompat/pkg/kompat/kompat.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/kompat/pkg/kompat/kompat.go b/tools/kompat/pkg/kompat/kompat.go index a13e8131b389..75772ab3596c 100644 --- a/tools/kompat/pkg/kompat/kompat.go +++ b/tools/kompat/pkg/kompat/kompat.go @@ -195,7 +195,7 @@ func (k Kompat) Markdown(_ ...Options) string { if c.MaxK8sVersion == "" || c.MinK8sVersion == c.MaxK8sVersion { headers = append(headers, fmt.Sprintf("\\>= `%s`", c.MinK8sVersion)) } else { - headers = append(headers, fmt.Sprintf("`%s` - `%s`", c.MinK8sVersion, c.MaxK8sVersion)) + headers = append(headers, fmt.Sprintf("\\>= `%s` \\<= `%s`", c.MinK8sVersion, c.MaxK8sVersion)) } data = append(data, c.AppVersion) } @@ -368,7 +368,7 @@ func semverRange(semvers []string, allSemvers ...string) string { return fmt.Sprintf("\\>= %s", strings.ReplaceAll(semvers[0], ".x", "")) } } - return fmt.Sprintf("%s - %s", semvers[0], semvers[len(semvers)-1]) + return fmt.Sprintf("\\>= %s \\<= %s", strings.ReplaceAll(semvers[0], ".x", ""), strings.ReplaceAll(semvers[len(semvers)-1], ".x", "")) } func sortSemvers(semvers []string) { From a4d93bddd603e3a9465f054641ce3e5b7fd988ad Mon Sep 17 00:00:00 2001 From: Jason Deal Date: Fri, 15 Mar 2024 12:15:04 -0700 Subject: [PATCH 6/6] fix: only upload artifacthub metadata to release repo (#5875) --- hack/release/common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hack/release/common.sh b/hack/release/common.sh index 450dbf984803..04a1c26286d4 100644 --- a/hack/release/common.sh +++ b/hack/release/common.sh @@ -91,7 +91,7 @@ publishHelmChart() { yq e -i ".version = \"${version}\"" "charts/${helm_chart}/Chart.yaml" cd charts - if [[ -s "${ah_config_file_name}" ]]; then + if [[ -s "${ah_config_file_name}" ]] && [[ "$oci_repo" == "${RELEASE_REPO_ECR}" ]]; then # ECR requires us to create an empty config file for an alternative # media type artifact push rather than /dev/null # https://github.com/aws/containers-roadmap/issues/1074