Skip to content

Commit 9142471

Browse files
authored
Merge pull request #563 from mbaldessari/main-gitea
Allow originRepo to be set via make install and main.git parameters
2 parents af69b30 + ec340b1 commit 9142471

8 files changed

Lines changed: 17 additions & 5 deletions

clustergroup/values.schema.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,10 @@
8181
"revision"
8282
],
8383
"properties": {
84+
"repoUpstreamURL": {
85+
"type": "string",
86+
"description": "Upstream URL of the pattern's git repository. When set an in-cluster gitea instance gets spawned and repoURL is ignored"
87+
},
8488
"repoURL": {
8589
"type": "string",
8690
"description": "URL of the pattern's git repository"

operator-install/templates/pattern.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ metadata:
66
spec:
77
clusterGroupName: {{ .Values.main.clusterGroupName }}
88
gitSpec:
9+
{{- if .Values.main.git.repoUpstreamURL }}
10+
originRepo: {{ .Values.main.git.repoUpstreamURL }}
11+
{{- end }} {{/* if .Values.main.git.repoUpstreamURL */}}
912
targetRepo: {{ .Values.main.git.repoURL }}
1013
targetRevision: {{ .Values.main.git.revision }}
1114
{{- if and .Values.main.tokenSecret .Values.main.tokenSecretNamespace }}

operator-install/values.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ global:
33

44
main:
55
git:
6+
# Uncommenting this will set the `originRepo` with the below value
7+
# when `originRepo` is set, an in-cluster gitea will automatically be spawned.
8+
# In this case `originRepo` will point to the upstream repository and `targetRepo`
9+
# will point to the internal in-cluster gitea mirror
10+
# repoUpstreamURL: https://github.com/validatedpatterns/multicloud-gitops
611
repoURL: https://github.com/pattern-clone/mypattern
712
revision: main
813

tests/operator-install-industrial-edge-factory.expected.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ metadata:
2222
namespace: openshift-operators
2323
spec:
2424
clusterGroupName: example
25-
gitSpec:
25+
gitSpec:
2626
targetRepo: https://github.com/pattern-clone/mypattern
2727
targetRevision: main
2828
multiSourceConfig:

tests/operator-install-industrial-edge-hub.expected.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ metadata:
2222
namespace: openshift-operators
2323
spec:
2424
clusterGroupName: example
25-
gitSpec:
25+
gitSpec:
2626
targetRepo: https://github.com/pattern-clone/mypattern
2727
targetRevision: main
2828
multiSourceConfig:

tests/operator-install-medical-diagnosis-hub.expected.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ metadata:
2222
namespace: openshift-operators
2323
spec:
2424
clusterGroupName: example
25-
gitSpec:
25+
gitSpec:
2626
targetRepo: https://github.com/pattern-clone/mypattern
2727
targetRevision: main
2828
multiSourceConfig:

tests/operator-install-naked.expected.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ metadata:
2222
namespace: openshift-operators
2323
spec:
2424
clusterGroupName: default
25-
gitSpec:
25+
gitSpec:
2626
targetRepo: https://github.com/pattern-clone/mypattern
2727
targetRevision: main
2828
multiSourceConfig:

tests/operator-install-normal.expected.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ metadata:
2222
namespace: openshift-operators
2323
spec:
2424
clusterGroupName: example
25-
gitSpec:
25+
gitSpec:
2626
targetRepo: https://github.com/pattern-clone/mypattern
2727
targetRevision: main
2828
multiSourceConfig:

0 commit comments

Comments
 (0)