Skip to content
This repository was archived by the owner on Jun 2, 2025. It is now read-only.

Commit 7565edc

Browse files
Merge pull request #25 from mikeshng/add-helm-altsource
Add repo.altSource to provide alternative source to fetch the helm chart from if repo.source failed
2 parents bd016ee + a19d4d6 commit 7565edc

File tree

8 files changed

+491
-25
lines changed

8 files changed

+491
-25
lines changed

.github/workflows/go-postsubmit.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,7 @@ jobs:
3030
with:
3131
go-version: ${{ env.GO_VERSION }}
3232
- name: install imagebuilder
33-
run: |
34-
sudo apt-get install -y libvshadow-utils.
35-
go install -tags no_libsubid github.com/openshift/imagebuilder/cmd/[email protected]
33+
run: go install github.com/openshift/imagebuilder/cmd/[email protected]
3634
- name: images
3735
run: make build-images
3836
- name: push

.github/workflows/go-presubmit.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ jobs:
6262
with:
6363
go-version: ${{ env.GO_VERSION }}
6464
- name: install imagebuilder
65-
run: go install -tags no_libsubid github.com/openshift/imagebuilder/cmd/[email protected]
65+
run: go install github.com/openshift/imagebuilder/cmd/[email protected]
6666
- name: build-images
6767
run: make build-images
6868

@@ -96,7 +96,7 @@ jobs:
9696
with:
9797
go-version: ${{ env.GO_VERSION }}
9898
- name: install imagebuilder
99-
run: go install -tags no_libsubid github.com/openshift/imagebuilder/cmd/[email protected]
99+
run: go install github.com/openshift/imagebuilder/cmd/[email protected]
100100
- name: build-images
101101
run: make build-images
102102
- name: setup kind

deploy/hub-common/apps.open-cluster-management.io_helmreleases_crd.yaml

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,125 @@ spec:
160160
description: SourceTypeEnum types of sources
161161
type: string
162162
type: object
163+
altSource:
164+
description: AltSource holds the url toward the helm-chart
165+
properties:
166+
configMapRef:
167+
description: Configuration parameters to access the helm-repo defined
168+
in the CatalogSource
169+
properties:
170+
apiVersion:
171+
description: API version of the referent.
172+
type: string
173+
fieldPath:
174+
description: 'If referring to a piece of an object instead of
175+
an entire object, this string should contain a valid JSON/Go
176+
field access statement, such as desiredState.manifest.containers[2].
177+
For example, if the object reference is to a container within
178+
a pod, this would take on a value like: "spec.containers{name}"
179+
(where "name" refers to the name of the container that triggered
180+
the event) or if no container name is specified "spec.containers[2]"
181+
(container with index 2 in this pod). This syntax is chosen
182+
only to have some well-defined way of referencing a part of
183+
an object. TODO: this design is not final and this field is
184+
subject to change in the future.'
185+
type: string
186+
kind:
187+
description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
188+
type: string
189+
name:
190+
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
191+
type: string
192+
namespace:
193+
description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
194+
type: string
195+
resourceVersion:
196+
description: 'Specific resourceVersion to which this reference
197+
is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency'
198+
type: string
199+
uid:
200+
description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
201+
type: string
202+
type: object
203+
insecureSkipVerify:
204+
description: InsecureSkipVerify is used to skip repo server's TLS
205+
certificate verification
206+
type: boolean
207+
secretRef:
208+
description: Secret to use to access the helm-repo defined in the
209+
CatalogSource.
210+
properties:
211+
apiVersion:
212+
description: API version of the referent.
213+
type: string
214+
fieldPath:
215+
description: 'If referring to a piece of an object instead of
216+
an entire object, this string should contain a valid JSON/Go
217+
field access statement, such as desiredState.manifest.containers[2].
218+
For example, if the object reference is to a container within
219+
a pod, this would take on a value like: "spec.containers{name}"
220+
(where "name" refers to the name of the container that triggered
221+
the event) or if no container name is specified "spec.containers[2]"
222+
(container with index 2 in this pod). This syntax is chosen
223+
only to have some well-defined way of referencing a part of
224+
an object. TODO: this design is not final and this field is
225+
subject to change in the future.'
226+
type: string
227+
kind:
228+
description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
229+
type: string
230+
name:
231+
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
232+
type: string
233+
namespace:
234+
description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
235+
type: string
236+
resourceVersion:
237+
description: 'Specific resourceVersion to which this reference
238+
is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency'
239+
type: string
240+
uid:
241+
description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
242+
type: string
243+
type: object
244+
github:
245+
description: GitHub provides the parameters to access the helm-chart
246+
located in a github repo
247+
properties:
248+
branch:
249+
type: string
250+
chartPath:
251+
type: string
252+
urls:
253+
items:
254+
type: string
255+
type: array
256+
type: object
257+
git:
258+
description: Git provides the parameters to access the helm-chart
259+
located in a git repo
260+
properties:
261+
branch:
262+
type: string
263+
chartPath:
264+
type: string
265+
urls:
266+
items:
267+
type: string
268+
type: array
269+
type: object
270+
helmRepo:
271+
description: HelmRepo provides the urls to retrieve the helm-chart
272+
properties:
273+
urls:
274+
items:
275+
type: string
276+
type: array
277+
type: object
278+
type:
279+
description: SourceTypeEnum types of sources
280+
type: string
281+
type: object
163282
version:
164283
description: Version is the chart version
165284
type: string

deploy/managed-common/apps.open-cluster-management.io_helmreleases_crd.yaml

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,125 @@ spec:
160160
description: SourceTypeEnum types of sources
161161
type: string
162162
type: object
163+
altSource:
164+
description: AltSource holds the url toward the helm-chart
165+
properties:
166+
configMapRef:
167+
description: Configuration parameters to access the helm-repo defined
168+
in the CatalogSource
169+
properties:
170+
apiVersion:
171+
description: API version of the referent.
172+
type: string
173+
fieldPath:
174+
description: 'If referring to a piece of an object instead of
175+
an entire object, this string should contain a valid JSON/Go
176+
field access statement, such as desiredState.manifest.containers[2].
177+
For example, if the object reference is to a container within
178+
a pod, this would take on a value like: "spec.containers{name}"
179+
(where "name" refers to the name of the container that triggered
180+
the event) or if no container name is specified "spec.containers[2]"
181+
(container with index 2 in this pod). This syntax is chosen
182+
only to have some well-defined way of referencing a part of
183+
an object. TODO: this design is not final and this field is
184+
subject to change in the future.'
185+
type: string
186+
kind:
187+
description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
188+
type: string
189+
name:
190+
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
191+
type: string
192+
namespace:
193+
description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
194+
type: string
195+
resourceVersion:
196+
description: 'Specific resourceVersion to which this reference
197+
is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency'
198+
type: string
199+
uid:
200+
description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
201+
type: string
202+
type: object
203+
insecureSkipVerify:
204+
description: InsecureSkipVerify is used to skip repo server's TLS
205+
certificate verification
206+
type: boolean
207+
secretRef:
208+
description: Secret to use to access the helm-repo defined in the
209+
CatalogSource.
210+
properties:
211+
apiVersion:
212+
description: API version of the referent.
213+
type: string
214+
fieldPath:
215+
description: 'If referring to a piece of an object instead of
216+
an entire object, this string should contain a valid JSON/Go
217+
field access statement, such as desiredState.manifest.containers[2].
218+
For example, if the object reference is to a container within
219+
a pod, this would take on a value like: "spec.containers{name}"
220+
(where "name" refers to the name of the container that triggered
221+
the event) or if no container name is specified "spec.containers[2]"
222+
(container with index 2 in this pod). This syntax is chosen
223+
only to have some well-defined way of referencing a part of
224+
an object. TODO: this design is not final and this field is
225+
subject to change in the future.'
226+
type: string
227+
kind:
228+
description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
229+
type: string
230+
name:
231+
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
232+
type: string
233+
namespace:
234+
description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
235+
type: string
236+
resourceVersion:
237+
description: 'Specific resourceVersion to which this reference
238+
is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency'
239+
type: string
240+
uid:
241+
description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
242+
type: string
243+
type: object
244+
github:
245+
description: GitHub provides the parameters to access the helm-chart
246+
located in a github repo
247+
properties:
248+
branch:
249+
type: string
250+
chartPath:
251+
type: string
252+
urls:
253+
items:
254+
type: string
255+
type: array
256+
type: object
257+
git:
258+
description: Git provides the parameters to access the helm-chart
259+
located in a git repo
260+
properties:
261+
branch:
262+
type: string
263+
chartPath:
264+
type: string
265+
urls:
266+
items:
267+
type: string
268+
type: array
269+
type: object
270+
helmRepo:
271+
description: HelmRepo provides the urls to retrieve the helm-chart
272+
properties:
273+
urls:
274+
items:
275+
type: string
276+
type: array
277+
type: object
278+
type:
279+
description: SourceTypeEnum types of sources
280+
type: string
281+
type: object
163282
version:
164283
description: Version is the chart version
165284
type: string

0 commit comments

Comments
 (0)