Skip to content

Commit

Permalink
Merge pull request validatedpatterns#231 from claudiol/common-automat…
Browse files Browse the repository at this point in the history
…ic-update

Automatic common/ update
  • Loading branch information
claudiol authored Oct 27, 2023
2 parents 20b0434 + 0a3bbeb commit eb119a8
Show file tree
Hide file tree
Showing 14 changed files with 172 additions and 4 deletions.
4 changes: 2 additions & 2 deletions common/ansible/playbooks/iib-ci/lookup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
connection: local
gather_facts: false
vars:
rh_url: "https://datagrepper.engineering.redhat.com/raw?topic=/topic/VirtualTopic.eng.ci.redhat-container-image.index.built&contains=%s&rows_per_page=20"
rh_url: "https://datagrepper.engineering.redhat.com/raw?topic=/topic/VirtualTopic.eng.ci.redhat-container-image.index.built&delta=15780000&contains=%s"
operator: "openshift-gitops-1-gitops-operator-bundle"
ocp_versions: {}
tasks:
- name: Set url fact
ansible.builtin.set_fact:
url: "{{ rh_url | format(operator + ':v') }}"
url: "{{ rh_url | format(operator) }}"

- name: Fetch URI
ansible.builtin.uri:
Expand Down
7 changes: 6 additions & 1 deletion common/ansible/roles/iib_ci/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@
A set of ansible plays to fetch an IIB (Image Index Bundle, aka a container created by the operator sdk
that contains a bunch of references to operators that can be installed in an OpenShift cluster)

Run `make lookup` to see which IIBs are available.
Run `ansible-playbook common/ansible/playbooks/iib-ci/lookup.yml` to see which IIBs are available (defaults to
openshift-gitops). If you want to look up IIBs for a different operator run:
`ansible-playbook -e operator=acm-operator common/ansible/playbooks/iib-ci/lookup.yml`

You can also try running curl manually via:
`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"`

Typically IIB are prerelease stuff that lives on some internal boxes. What these scripts do is fetch
the IIB internally, mirror it to the registry inside the cluster, parse all the needed images and mirror
Expand Down
2 changes: 1 addition & 1 deletion common/clustergroup/templates/plumbing/applications.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ spec:
path: {{ .path }}
{{- end }}
{{- if .plugin }}
plugin: {{ .plugin }}
plugin: {{ .plugin | toPrettyJson }}
{{- end }}
{{- if not .kustomize }}
helm:
Expand Down
13 changes: 13 additions & 0 deletions common/operator-install/templates/pattern-operator-configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: patterns-operator-config
namespace: openshift-operators
data:
gitops.catalogSource: {{ .Values.main.gitops.operatorSource }}
gitops.channel: {{ .Values.main.gitops.channel }}

# gitops.sourceNamespace: GitOpsDefaultCatalogSourceNamespace
# gitops.installApprovalPlan: GitOpsDefaultApprovalPlan
# gitops.ManualSync: GitOpsDefaultManualSync
# gitops.name: GitOpsDefaultPackageName
Original file line number Diff line number Diff line change
@@ -1,4 +1,19 @@
---
# Source: pattern-install/templates/pattern-operator-configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: patterns-operator-config
namespace: openshift-operators
data:
gitops.catalogSource: redhat-operators
gitops.channel: gitops-1.8

# gitops.sourceNamespace: GitOpsDefaultCatalogSourceNamespace
# gitops.installApprovalPlan: GitOpsDefaultApprovalPlan
# gitops.ManualSync: GitOpsDefaultManualSync
# gitops.name: GitOpsDefaultPackageName
---
# Source: pattern-install/templates/pattern.yaml
apiVersion: gitops.hybrid-cloud-patterns.io/v1alpha1
kind: Pattern
Expand Down
15 changes: 15 additions & 0 deletions common/tests/operator-install-industrial-edge-hub.expected.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,19 @@
---
# Source: pattern-install/templates/pattern-operator-configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: patterns-operator-config
namespace: openshift-operators
data:
gitops.catalogSource: redhat-operators
gitops.channel: gitops-1.8

# gitops.sourceNamespace: GitOpsDefaultCatalogSourceNamespace
# gitops.installApprovalPlan: GitOpsDefaultApprovalPlan
# gitops.ManualSync: GitOpsDefaultManualSync
# gitops.name: GitOpsDefaultPackageName
---
# Source: pattern-install/templates/pattern.yaml
apiVersion: gitops.hybrid-cloud-patterns.io/v1alpha1
kind: Pattern
Expand Down
15 changes: 15 additions & 0 deletions common/tests/operator-install-medical-diagnosis-hub.expected.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,19 @@
---
# Source: pattern-install/templates/pattern-operator-configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: patterns-operator-config
namespace: openshift-operators
data:
gitops.catalogSource: redhat-operators
gitops.channel: gitops-1.8

# gitops.sourceNamespace: GitOpsDefaultCatalogSourceNamespace
# gitops.installApprovalPlan: GitOpsDefaultApprovalPlan
# gitops.ManualSync: GitOpsDefaultManualSync
# gitops.name: GitOpsDefaultPackageName
---
# Source: pattern-install/templates/pattern.yaml
apiVersion: gitops.hybrid-cloud-patterns.io/v1alpha1
kind: Pattern
Expand Down
15 changes: 15 additions & 0 deletions common/tests/operator-install-naked.expected.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,19 @@
---
# Source: pattern-install/templates/pattern-operator-configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: patterns-operator-config
namespace: openshift-operators
data:
gitops.catalogSource: redhat-operators
gitops.channel: gitops-1.8

# gitops.sourceNamespace: GitOpsDefaultCatalogSourceNamespace
# gitops.installApprovalPlan: GitOpsDefaultApprovalPlan
# gitops.ManualSync: GitOpsDefaultManualSync
# gitops.name: GitOpsDefaultPackageName
---
# Source: pattern-install/templates/pattern.yaml
apiVersion: gitops.hybrid-cloud-patterns.io/v1alpha1
kind: Pattern
Expand Down
15 changes: 15 additions & 0 deletions common/tests/operator-install-normal.expected.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,19 @@
---
# Source: pattern-install/templates/pattern-operator-configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: patterns-operator-config
namespace: openshift-operators
data:
gitops.catalogSource: redhat-operators
gitops.channel: gitops-1.8

# gitops.sourceNamespace: GitOpsDefaultCatalogSourceNamespace
# gitops.installApprovalPlan: GitOpsDefaultApprovalPlan
# gitops.ManualSync: GitOpsDefaultManualSync
# gitops.name: GitOpsDefaultPackageName
---
# Source: pattern-install/templates/pattern.yaml
apiVersion: gitops.hybrid-cloud-patterns.io/v1alpha1
kind: Pattern
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,19 @@
---
# Source: pattern-install/templates/pattern-operator-configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: patterns-operator-config
namespace: openshift-operators
data:
gitops.catalogSource: redhat-operators
gitops.channel: gitops-1.8

# gitops.sourceNamespace: GitOpsDefaultCatalogSourceNamespace
# gitops.installApprovalPlan: GitOpsDefaultApprovalPlan
# gitops.ManualSync: GitOpsDefaultManualSync
# gitops.name: GitOpsDefaultPackageName
---
# Source: pattern-install/templates/pattern.yaml
apiVersion: gitops.hybrid-cloud-patterns.io/v1alpha1
kind: Pattern
Expand Down
15 changes: 15 additions & 0 deletions tests/common-operator-install-industrial-edge-hub.expected.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,19 @@
---
# Source: pattern-install/templates/pattern-operator-configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: patterns-operator-config
namespace: openshift-operators
data:
gitops.catalogSource: redhat-operators
gitops.channel: gitops-1.8

# gitops.sourceNamespace: GitOpsDefaultCatalogSourceNamespace
# gitops.installApprovalPlan: GitOpsDefaultApprovalPlan
# gitops.ManualSync: GitOpsDefaultManualSync
# gitops.name: GitOpsDefaultPackageName
---
# Source: pattern-install/templates/pattern.yaml
apiVersion: gitops.hybrid-cloud-patterns.io/v1alpha1
kind: Pattern
Expand Down
15 changes: 15 additions & 0 deletions tests/common-operator-install-medical-diagnosis-hub.expected.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,19 @@
---
# Source: pattern-install/templates/pattern-operator-configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: patterns-operator-config
namespace: openshift-operators
data:
gitops.catalogSource: redhat-operators
gitops.channel: gitops-1.8

# gitops.sourceNamespace: GitOpsDefaultCatalogSourceNamespace
# gitops.installApprovalPlan: GitOpsDefaultApprovalPlan
# gitops.ManualSync: GitOpsDefaultManualSync
# gitops.name: GitOpsDefaultPackageName
---
# Source: pattern-install/templates/pattern.yaml
apiVersion: gitops.hybrid-cloud-patterns.io/v1alpha1
kind: Pattern
Expand Down
15 changes: 15 additions & 0 deletions tests/common-operator-install-naked.expected.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,19 @@
---
# Source: pattern-install/templates/pattern-operator-configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: patterns-operator-config
namespace: openshift-operators
data:
gitops.catalogSource: redhat-operators
gitops.channel: gitops-1.8

# gitops.sourceNamespace: GitOpsDefaultCatalogSourceNamespace
# gitops.installApprovalPlan: GitOpsDefaultApprovalPlan
# gitops.ManualSync: GitOpsDefaultManualSync
# gitops.name: GitOpsDefaultPackageName
---
# Source: pattern-install/templates/pattern.yaml
apiVersion: gitops.hybrid-cloud-patterns.io/v1alpha1
kind: Pattern
Expand Down
15 changes: 15 additions & 0 deletions tests/common-operator-install-normal.expected.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,19 @@
---
# Source: pattern-install/templates/pattern-operator-configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: patterns-operator-config
namespace: openshift-operators
data:
gitops.catalogSource: redhat-operators
gitops.channel: gitops-1.8

# gitops.sourceNamespace: GitOpsDefaultCatalogSourceNamespace
# gitops.installApprovalPlan: GitOpsDefaultApprovalPlan
# gitops.ManualSync: GitOpsDefaultManualSync
# gitops.name: GitOpsDefaultPackageName
---
# Source: pattern-install/templates/pattern.yaml
apiVersion: gitops.hybrid-cloud-patterns.io/v1alpha1
kind: Pattern
Expand Down

0 comments on commit eb119a8

Please sign in to comment.