-
Notifications
You must be signed in to change notification settings - Fork 716
Maintainers only
Starting on 17/May/2024
there is a new asset lifecycle in place.
We will keep only the relevant assets in the corresponding branch.
This means a cycle of always 3 active branches, with each branch always holding up to 2 previous versions before it.
In a nutshell:
- release-v2.7 hold chart versions for Rancher: (2.5; 2.6; 2.7)
- release-v2.8 hold chart versions for Rancher: (2.6; 2.7; 2.8)
- release-v2.9 hold chart versions for Rancher: (2.7; 2.8; 2.9)
flowchart LR;
subgraph BigBox[Assets Lifecycle]
direction LR
subgraph A[release-v2.7]
direction LR
A1[10.1.2] --- A2[100.0.0+up0.0.0] --- A3[102.0.0+up0.0.0]
end
subgraph B[release-v2.8]
direction LR
B1[100.0.0+up0.0.0] --- B2[102.0.0+up0.0.0] --- B3[103.0.0+up0.0.0]
end
subgraph C[release-v2.9]
direction LR
C1[102.0.0+up0.0.0] --- C2[103.0.0+up0.0.0] --- C3[104.0.0+up0.0.0]
end
A2 -.-> B1
A3 -.-> B2
B2 -.-> C1
B3 -.-> C2
end
---
## How to resolve patch failures
- This guide will help you resolve patch failure errors like the one shown below.
time="2023-12-01T13:45:56+05:30" level=info msg="Pulling k8snetworkplumbingwg/sriov-network-operator@bcab8844d807ee1db558533248273ccd492874bb/deployment/sriov-network-operator from upstream into charts" time="2023-12-01T13:46:31+05:30" level=info msg="Loading dependencies for chart" time="2023-12-01T13:46:31+05:30" level=info msg="Pulling https://github.com/kubernetes-sigs/node-feature-discovery/releases/download/v0.14.1/node-feature-discovery-chart-0.14.1.tgz from upstream into charts" time="2023-12-01T13:46:33+05:30" level=info msg="Loading dependencies for chart" time="2023-12-01T13:46:33+05:30" level=info msg="Applying changes from generated-changes" time="2023-12-01T13:46:33+05:30" level=info msg="Updating chart metadata with dependencies" time="2023-12-01T13:46:33+05:30" level=warning msg="Detected 'apiVersion:v2' within Chart.yaml; these types of charts require additional testing" time="2023-12-01T13:46:33+05:30" level=info msg="Applying changes from generated-changes" time="2023-12-01T13:46:33+05:30" level=info msg="Applying: generated-changes/patch/Chart.yaml.patch" time="2023-12-01T13:46:33+05:30" level=error msg="\npatching file Chart.yaml\nHunk #1 FAILED at 1.\n1 out of 1 hunk FAILED -- saving rejects to file Chart.yaml.rej\n" time="2023-12-01T13:46:33+05:30" level=fatal msg="encountered error while preparing main chart: encountered error while trying to apply changes to charts: unable to generate a patch with error: exit status 1"
- This patch failure occurred when running `make prepare` on the `rancher-sriov` package. The patch file Chart.yaml.patch failed to apply here. So, how do you fix these kinds of patch failures.
### Solution
- First, we move out the patch file `Chart.yaml.patch` out of `generated-changes` folder. Here, for example, I am moving the patch file to the github repo directory.
charts$ mv packages/rancher-sriov/generated-changes/patch/Chart.yaml.patch ./
- Later, we run `make prepare` again. If any of the patch files fail, we move out in the similar manner and run `make prepare` again.
- Now, we manually apply the Chart.yaml.patch onto `./packages/rancher-sriov/charts/Chart.yaml`. After manually applying the patch file
##### *Chart.yaml.patch*
```--- charts-original/Chart.yaml
+++ charts/Chart.yaml
@@ -1,17 +1,29 @@
+annotations:
+ catalog.cattle.io/auto-install: sriov-crd=match
+ catalog.cattle.io/certified: rancher
+ catalog.cattle.io/experimental: "true"
+ catalog.cattle.io/kube-version: '>= 1.16.0-0 < 1.28.0-0'
+ catalog.cattle.io/namespace: cattle-sriov-system
+ catalog.cattle.io/os: linux
+ catalog.cattle.io/permits-os: linux
+ catalog.cattle.io/rancher-version: '>= 2.8.0-0 < 2.9.0-0'
+ catalog.cattle.io/release-name: sriov
+ catalog.cattle.io/upstream-version: 1.2.0
apiVersion: v2
-appVersion: 1.1.0
-dependencies:
-- condition: rancher-nfd.enabled
- name: rancher-nfd
- repository: file://./charts/rancher-nfd
+appVersion: 1.2.0
description: SR-IOV network operator configures and manages SR-IOV networks in the
kubernetes cluster
home: https://github.com/k8snetworkplumbingwg/sriov-network-operator
+icon: https://charts.rancher.io/assets/logos/sr-iov.svg
keywords:
- sriov
+- Networking
kubeVersion: '>= 1.16.0'
-name: sriov-network-operator
+maintainers:
+- email: [email protected]
+ name: Rancher Labs
+name: sriov
sources:
-- https://github.com/k8snetworkplumbingwg/sriov-network-operator
+- https://github.com/rancher/charts
type: application
version: 0.1.0
the ./packages/rancher-sriov/charts/Chart.yaml
is modified from
apiVersion: v2
appVersion: 1.1.0
dependencies:
- condition: rancher-nfd.enabled
name: rancher-nfd
repository: file://./charts/rancher-nfd
version: 0.14.1
description: SR-IOV network operator configures and manages SR-IOV networks in the
kubernetes cluster
home: https://github.com/k8snetworkplumbingwg/sriov-network-operator
keywords:
- sriov
kubeVersion: '>= 1.16.0'
name: sriov-network-operator
sources:
- https://github.com/k8snetworkplumbingwg/sriov-network-operator
type: application
version: 0.1.0
to
annotations:
catalog.cattle.io/auto-install: sriov-crd=match
catalog.cattle.io/certified: rancher
catalog.cattle.io/experimental: "true"
catalog.cattle.io/kube-version: '>= 1.16.0-0 < 1.28.0-0'
catalog.cattle.io/namespace: cattle-sriov-system
catalog.cattle.io/os: linux
catalog.cattle.io/permits-os: linux
catalog.cattle.io/rancher-version: '>= 2.8.0-0 < 2.9.0-0'
catalog.cattle.io/release-name: sriov
catalog.cattle.io/upstream-version: 1.2.0
apiVersion: v2
appVersion: 1.2.0
description: SR-IOV network operator configures and manages SR-IOV networks in the
kubernetes cluster
home: https://github.com/k8snetworkplumbingwg/sriov-network-operator
icon: https://charts.rancher.io/assets/logos/sr-iov.svg
keywords:
- sriov
- Networking
kubeVersion: '>= 1.16.0'
name: sriov
maintainers:
- email: [email protected]
name: Rancher Labs
sources:
- https://github.com/rancher/charts
type: application
version: 0.1.0
That's all. maker prepare
is completed. Make sure to delete the Chart.yaml.patch
in the repo directory
charts$ rm Chart.yaml.patch