Skip to content

Commit 84ac25d

Browse files
authored
Merge pull request #108 from claudiol/common-automatic-update
Automatic common/ update
2 parents 7a66342 + 629a54c commit 84ac25d

23 files changed

Lines changed: 219 additions & 31 deletions

common/acm/templates/policies/application-policies.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ spec:
6969
# Requires ACM 2.6 or higher (I could not come up with something less terrible to get maj.min)
7070
- name: global.clusterVersion
7171
value: '{{ `{{ printf "%d.%d" ((semver (lookup "operator.openshift.io/v1" "OpenShiftControllerManager" "" "cluster").status.version).Major) ((semver (lookup "operator.openshift.io/v1" "OpenShiftControllerManager" "" "cluster").status.version).Minor) }}` }}'
72+
- name: global.localClusterName
73+
value: '{{ `{{ (split "." (lookup "config.openshift.io/v1" "Ingress" "" "cluster").spec.domain)._1 }}` }}'
7274
- name: global.clusterPlatform
7375
value: {{ $.Values.global.clusterPlatform }}
7476
- name: clusterGroup.name

common/ansible/playbooks/iib-ci/lookup.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
connection: local
55
gather_facts: false
66
vars:
7-
rh_url: "https://datagrepper.engineering.redhat.com/raw?topic=/topic/VirtualTopic.eng.ci.redhat-container-image.index.built&contains=%s&rows_per_page=20"
7+
rh_url: "https://datagrepper.engineering.redhat.com/raw?topic=/topic/VirtualTopic.eng.ci.redhat-container-image.index.built&delta=15780000&contains=%s"
88
operator: "openshift-gitops-1-gitops-operator-bundle"
99
ocp_versions: {}
1010
tasks:
1111
- name: Set url fact
1212
ansible.builtin.set_fact:
13-
url: "{{ rh_url | format(operator + ':v') }}"
13+
url: "{{ rh_url | format(operator) }}"
1414

1515
- name: Fetch URI
1616
ansible.builtin.uri:

common/ansible/roles/iib_ci/README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,12 @@
33
A set of ansible plays to fetch an IIB (Image Index Bundle, aka a container created by the operator sdk
44
that contains a bunch of references to operators that can be installed in an OpenShift cluster)
55

6-
Run `make lookup` to see which IIBs are available.
6+
Run `ansible-playbook common/ansible/playbooks/iib-ci/lookup.yml` to see which IIBs are available (defaults to
7+
openshift-gitops). If you want to look up IIBs for a different operator run:
8+
`ansible-playbook -e operator=acm-operator common/ansible/playbooks/iib-ci/lookup.yml`
9+
10+
You can also try running curl manually via:
11+
`curl -sSL "https://datagrepper.engineering.redhat.com/raw?topic=/topic/VirtualTopic.eng.ci.redhat-container-image.index.built&delta=15780000&contains=acm-operator" | jq ".raw_messages[].msg"`
712

813
Typically IIB are prerelease stuff that lives on some internal boxes. What these scripts do is fetch
914
the IIB internally, mirror it to the registry inside the cluster, parse all the needed images and mirror

common/clustergroup/templates/plumbing/applications.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ spec:
5252
path: {{ .path }}
5353
{{- end }}
5454
{{- if .plugin }}
55-
plugin: {{ .plugin }}
55+
plugin: {{ .plugin | toPrettyJson }}
5656
{{- end }}
5757
{{- if not .kustomize }}
5858
helm:

common/operator-install/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Update CRD
2+
3+
In order to update the CRD, copy the following file from the last released patterns operator version:
4+
`cp -v patterns-operator/config/crd/bases/gitops.hybrid-cloud-patterns.io_patterns.yaml ./crds/`

common/operator-install/crds/gitops.hybrid-cloud-patterns.io_patterns.yaml

Lines changed: 25 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1+
---
12
apiVersion: apiextensions.k8s.io/v1
23
kind: CustomResourceDefinition
34
metadata:
45
annotations:
56
controller-gen.kubebuilder.io/version: v0.11.4
6-
creationTimestamp: null
77
name: patterns.gitops.hybrid-cloud-patterns.io
88
spec:
99
group: gitops.hybrid-cloud-patterns.io
@@ -72,30 +72,10 @@ spec:
7272
type: array
7373
gitOpsSpec:
7474
properties:
75-
manualApproval:
76-
description: 'Require manual confirmation before installing and
77-
upgrading operators. Default: False'
78-
type: boolean
7975
manualSync:
8076
description: 'Require manual intervention before Argo will sync
8177
new content. Default: False'
8278
type: boolean
83-
operatorCSV:
84-
description: Specific version of openshift-gitops to deploy. Requires
85-
UseCSV=True
86-
type: string
87-
operatorChannel:
88-
description: 'Channel to deploy openshift-gitops from. Default:
89-
gitops-1.8'
90-
type: string
91-
operatorSource:
92-
description: 'Source to deploy openshift-gitops from. Default:
93-
redhat-operators'
94-
type: string
95-
useCSV:
96-
description: 'Dangerous. Force a specific version to be installed.
97-
Default: False'
98-
type: boolean
9979
type: object
10080
gitSpec:
10181
properties:
@@ -163,8 +143,32 @@ spec:
163143
status:
164144
description: PatternStatus defines the observed state of Pattern
165145
properties:
146+
analyticsSent:
147+
default: 0
148+
type: integer
149+
analyticsUUID:
150+
type: string
166151
appClusterDomain:
167152
type: string
153+
applications:
154+
items:
155+
description: PatternApplicationInfo defines the Applications Status
156+
for the Pattern. This structure is part of the PatternStatus as
157+
an array The Application Status will be included as part of the
158+
Observed state of Pattern
159+
properties:
160+
healthMessage:
161+
type: string
162+
healthStatus:
163+
type: string
164+
name:
165+
type: string
166+
namespace:
167+
type: string
168+
syncStatus:
169+
type: string
170+
type: object
171+
type: array
168172
clusterDomain:
169173
type: string
170174
clusterID:
@@ -218,9 +222,3 @@ spec:
218222
storage: true
219223
subresources:
220224
status: {}
221-
status:
222-
acceptedNames:
223-
kind: ""
224-
plural: ""
225-
conditions: null
226-
storedVersions: null
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
apiVersion: v1
2+
kind: ConfigMap
3+
metadata:
4+
name: patterns-operator-config
5+
namespace: openshift-operators
6+
data:
7+
gitops.catalogSource: {{ .Values.main.gitops.operatorSource }}
8+
gitops.channel: {{ .Values.main.gitops.channel }}
9+
10+
# gitops.sourceNamespace: GitOpsDefaultCatalogSourceNamespace
11+
# gitops.installApprovalPlan: GitOpsDefaultApprovalPlan
12+
# gitops.ManualSync: GitOpsDefaultManualSync
13+
# gitops.name: GitOpsDefaultPackageName

common/tests/acm-industrial-edge-hub.expected.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,8 @@ spec:
233233
# Requires ACM 2.6 or higher (I could not come up with something less terrible to get maj.min)
234234
- name: global.clusterVersion
235235
value: '{{ printf "%d.%d" ((semver (lookup "operator.openshift.io/v1" "OpenShiftControllerManager" "" "cluster").status.version).Major) ((semver (lookup "operator.openshift.io/v1" "OpenShiftControllerManager" "" "cluster").status.version).Minor) }}'
236+
- name: global.localClusterName
237+
value: '{{ (split "." (lookup "config.openshift.io/v1" "Ingress" "" "cluster").spec.domain)._1 }}'
236238
- name: global.clusterPlatform
237239
value: aws
238240
- name: clusterGroup.name

common/tests/acm-medical-diagnosis-hub.expected.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,8 @@ spec:
224224
# Requires ACM 2.6 or higher (I could not come up with something less terrible to get maj.min)
225225
- name: global.clusterVersion
226226
value: '{{ printf "%d.%d" ((semver (lookup "operator.openshift.io/v1" "OpenShiftControllerManager" "" "cluster").status.version).Major) ((semver (lookup "operator.openshift.io/v1" "OpenShiftControllerManager" "" "cluster").status.version).Minor) }}'
227+
- name: global.localClusterName
228+
value: '{{ (split "." (lookup "config.openshift.io/v1" "Ingress" "" "cluster").spec.domain)._1 }}'
227229
- name: global.clusterPlatform
228230
value: aws
229231
- name: clusterGroup.name

common/tests/acm-normal.expected.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -627,6 +627,8 @@ spec:
627627
# Requires ACM 2.6 or higher (I could not come up with something less terrible to get maj.min)
628628
- name: global.clusterVersion
629629
value: '{{ printf "%d.%d" ((semver (lookup "operator.openshift.io/v1" "OpenShiftControllerManager" "" "cluster").status.version).Major) ((semver (lookup "operator.openshift.io/v1" "OpenShiftControllerManager" "" "cluster").status.version).Minor) }}'
630+
- name: global.localClusterName
631+
value: '{{ (split "." (lookup "config.openshift.io/v1" "Ingress" "" "cluster").spec.domain)._1 }}'
630632
- name: global.clusterPlatform
631633
value: aws
632634
- name: clusterGroup.name
@@ -721,6 +723,8 @@ spec:
721723
# Requires ACM 2.6 or higher (I could not come up with something less terrible to get maj.min)
722724
- name: global.clusterVersion
723725
value: '{{ printf "%d.%d" ((semver (lookup "operator.openshift.io/v1" "OpenShiftControllerManager" "" "cluster").status.version).Major) ((semver (lookup "operator.openshift.io/v1" "OpenShiftControllerManager" "" "cluster").status.version).Minor) }}'
726+
- name: global.localClusterName
727+
value: '{{ (split "." (lookup "config.openshift.io/v1" "Ingress" "" "cluster").spec.domain)._1 }}'
724728
- name: global.clusterPlatform
725729
value: aws
726730
- name: clusterGroup.name

0 commit comments

Comments
 (0)