Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions common/acm/templates/multiclusterhub.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
{{- $channel := "" }}
{{- if .Values.acm.mce_operator.channel }}
{{- $channel = printf ",\"channel\": \"%s\"" .Values.acm.mce_operator.channel }}
{{- end }}
apiVersion: operator.open-cluster-management.io/v1
kind: MultiClusterHub
metadata:
name: multiclusterhub
namespace: open-cluster-management
annotations:
argocd.argoproj.io/sync-wave: "-1"
{{- if kindIs "map" .Values.clusterGroup.subscriptions }}
installer.open-cluster-management.io/mce-subscription-spec: '{"source": "{{ default "redhat-operators" .Values.clusterGroup.subscriptions.acm.source }}" }'
{{- end }}
installer.open-cluster-management.io/mce-subscription-spec: '{"source": "{{ default "redhat-operators" .Values.acm.mce_operator.source }}" {{- $channel }} }'
spec: {}
2 changes: 1 addition & 1 deletion common/acm/templates/policies/ocp-gitops-policy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ spec:
labels:
operators.coreos.com/openshift-gitops-operator.openshift-operators: ''
spec:
channel: {{ default "gitops-1.11" .Values.main.gitops.channel }}
channel: {{ default "gitops-1.12" .Values.main.gitops.channel }}
installPlanApproval: Automatic
name: openshift-gitops-operator
source: redhat-operators
Expand Down
11 changes: 10 additions & 1 deletion common/acm/values.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
main:
gitops:
channel: "gitops-1.11"
channel: "gitops-1.12"

global:
extraValueFiles: []
Expand Down Expand Up @@ -30,6 +30,15 @@ clusterGroup:
# - name: clusterGroup
# value: region-one

acm:
# Just used for IIB testing, drives the source and channel for the MCE
# subscription triggered by ACM
mce_operator:
source: redhat-operators
channel: null



secretStore:
name: vault-backend
kind: ClusterSecretStore
38 changes: 33 additions & 5 deletions common/ansible/roles/iib_ci/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,23 +38,51 @@ oc patch configs.imageregistry.operator.openshift.io cluster --type merge --patc
oc patch configs.imageregistry.operator.openshift.io cluster --type merge --patch '{"spec":{"storage":{"emptyDir":{}}}}'
```

### Gitops operator

Then in case of the `openshift-gitops-operator` we would install with:

```sh
export CHANNEL=$(oc get -n openshift-marketplace packagemanifests -l "catalog=iib-${IIB}" --field-selector "metadata.name=${OPERATOR}" -o jsonpath='{.items[0].status.defaultChannel}')
make EXTRA_HELM_OPTS="--set main.gitops.operatorSource=iib-${IIB} --set main.gitops.channel=${CHANNEL}" install
```

To install ACM (`export OPERATOR=advanced-cluster-management`) or any other
operator (except the gitops one) from an IIB we would call the following as a
final step:
### ACM operator

The advanced-cluster-management operator is a little bit more complex than the others because it
also installes another operator called MCE multicluster-engine. So to install ACM you typically
need two IIBs (one for acm and one for mce). With those two at hand, do the following (the ordering must be
consistent: the first IIB corresponds to the first OPERATOR, etc).

```sh
export OPERATOR=advanced-cluster-management,multicluster-engine
export INDEX_IMAGES=registry-proxy.engineering.redhat.com/rh-osbs/iib:713808,registry-proxy.engineering.redhat.com/rh-osbs/iib:718034
make load-iib
```

Once the IIBs are loaded into the cluster we need to run the following steps:

```sh
export ACM_CHANNEL=$(oc get -n openshift-marketplace packagemanifests -l "catalog=iib-713808" --field-selector "metadata.name=advanced-cluster-management" -o jsonpath='{.items[0].status.defaultChannel}')
export MCE_CHANNEL=$(oc get -n openshift-margetplace packagemanifests -l "catalog=iib-718034" --field-selector "metadata.name=multicluster-engine" -o jsonpath='{.items[0].status.defaultChannel}')
make EXTRA_HELM_OPTS="--set main.extraParameters[0].name=clusterGroup.subscriptions.acm.source --set main.extraParameters[0].value=iib-713808 \
--set main.extraParameters[1].name=clusterGroup.subscriptions.acm.channel --set main.extraParameters[1].value=${ACM_CHANNEL} \
--set main.extraParameters[2].name=acm.mce_operator.source --set main.extraParameters[2].value="iib-718034" \
--set main.extraParameters[3].name=acm.mce_operator.channel --set main.extraParameters[3].value=${MCE_CHANNEL}" install
```

*Note*: In this case the `acm` in `clusterGroup.subscriptions.acm.*` is the name of the key in the subscriptions in `values-hub.yaml`

### Other operators

To install operators other than gitops and acm do the following:

```sh
export CHANNEL=$(oc get -n openshift-marketplace packagemanifests -l "catalog=iib-${IIB}" --field-selector "metadata.name=${OPERATOR}" -o jsonpath='{.items[0].status.defaultChannel}')
make EXTRA_HELM_OPTS="--set main.extraParameters[0].name=clusterGroup.subscriptions.acm.source --set main.extraParameters[0].value=iib-${IIB} --set main.extraParameters[1].name=clusterGroup.subscriptions.acm.channel --set main.extraParameters[1].value=${CHANNEL}" install
make EXTRA_HELM_OPTS="--set main.extraParameters[0].name=clusterGroup.subscriptions.<subname>.source --set main.extraParameters[0].value=iib-${IIB} --set main.extraParameters[1].name=clusterGroup.subscriptions.<subname>.channel --set main.extraParameters[1].value=${CHANNEL}" install
```

*Note*: In this case `acm` is the name of the subscription in `values-hub.yaml`
*Note*: Replace `<subname>` with the actual name of the subscription dictionary in `values-hub.yaml`

## Useful commands

Expand Down
2 changes: 1 addition & 1 deletion common/clustergroup/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ description: A Helm chart to create per-clustergroup ArgoCD applications and any
keywords:
- pattern
name: clustergroup
version: 0.8.4
version: 0.8.5
2 changes: 1 addition & 1 deletion common/operator-install/templates/pattern.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ spec:
tokenSecretNamespace: {{ .Values.main.tokenSecretNamespace }}
{{- end }} {{/* if and .Values.main.tokenSecret .Values.main.tokenSecretNamespace */}}
gitOpsSpec:
operatorChannel: {{ default "gitops-1.11" .Values.main.gitops.channel }}
operatorChannel: {{ default "gitops-1.12" .Values.main.gitops.channel }}
operatorSource: {{ default "redhat-operators" .Values.main.gitops.operatorSource }}
multiSourceConfig:
enabled: {{ .Values.main.multiSourceConfig.enabled }}
Expand Down
2 changes: 1 addition & 1 deletion common/operator-install/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ main:
revision: main

gitops:
channel: "gitops-1.11"
channel: "gitops-1.12"
operatorSource: redhat-operators

multiSourceConfig:
Expand Down
2 changes: 1 addition & 1 deletion common/reference-output.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ metadata:
labels:
operators.coreos.com/openshift-gitops-operator.openshift-operators: ""
spec:
channel: gitops-1.11
channel: gitops-1.12
installPlanApproval: Automatic
name: openshift-gitops-operator
source: redhat-operators
Expand Down
3 changes: 2 additions & 1 deletion common/tests/acm-industrial-edge-factory.expected.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ metadata:
namespace: open-cluster-management
annotations:
argocd.argoproj.io/sync-wave: "-1"
installer.open-cluster-management.io/mce-subscription-spec: '{"source": "redhat-operators" }'
spec: {}
---
# Source: acm/templates/policies/ocp-gitops-policy.yaml
Expand Down Expand Up @@ -109,7 +110,7 @@ spec:
labels:
operators.coreos.com/openshift-gitops-operator.openshift-operators: ''
spec:
channel: gitops-1.11
channel: gitops-1.12
installPlanApproval: Automatic
name: openshift-gitops-operator
source: redhat-operators
Expand Down
2 changes: 1 addition & 1 deletion common/tests/acm-industrial-edge-hub.expected.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ spec:
labels:
operators.coreos.com/openshift-gitops-operator.openshift-operators: ''
spec:
channel: gitops-1.11
channel: gitops-1.12
installPlanApproval: Automatic
name: openshift-gitops-operator
source: redhat-operators
Expand Down
2 changes: 1 addition & 1 deletion common/tests/acm-medical-diagnosis-hub.expected.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ spec:
labels:
operators.coreos.com/openshift-gitops-operator.openshift-operators: ''
spec:
channel: gitops-1.11
channel: gitops-1.12
installPlanApproval: Automatic
name: openshift-gitops-operator
source: redhat-operators
Expand Down
2 changes: 1 addition & 1 deletion common/tests/acm-naked.expected.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ spec:
labels:
operators.coreos.com/openshift-gitops-operator.openshift-operators: ''
spec:
channel: gitops-1.11
channel: gitops-1.12
installPlanApproval: Automatic
name: openshift-gitops-operator
source: redhat-operators
Expand Down
2 changes: 1 addition & 1 deletion common/tests/acm-normal.expected.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -806,7 +806,7 @@ spec:
labels:
operators.coreos.com/openshift-gitops-operator.openshift-operators: ''
spec:
channel: gitops-1.11
channel: gitops-1.12
installPlanApproval: Automatic
name: openshift-gitops-operator
source: redhat-operators
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ metadata:
namespace: openshift-operators
data:
gitops.catalogSource: redhat-operators
gitops.channel: gitops-1.11
gitops.channel: gitops-1.12

# gitops.sourceNamespace: GitOpsDefaultCatalogSourceNamespace
# gitops.installApprovalPlan: GitOpsDefaultApprovalPlan
Expand All @@ -26,7 +26,7 @@ spec:
targetRepo: https://github.com/pattern-clone/mypattern
targetRevision: main
gitOpsSpec:
operatorChannel: gitops-1.11
operatorChannel: gitops-1.12
operatorSource: redhat-operators
multiSourceConfig:
enabled: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ metadata:
namespace: openshift-operators
data:
gitops.catalogSource: redhat-operators
gitops.channel: gitops-1.11
gitops.channel: gitops-1.12

# gitops.sourceNamespace: GitOpsDefaultCatalogSourceNamespace
# gitops.installApprovalPlan: GitOpsDefaultApprovalPlan
Expand All @@ -26,7 +26,7 @@ spec:
targetRepo: https://github.com/pattern-clone/mypattern
targetRevision: main
gitOpsSpec:
operatorChannel: gitops-1.11
operatorChannel: gitops-1.12
operatorSource: redhat-operators
multiSourceConfig:
enabled: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ metadata:
namespace: openshift-operators
data:
gitops.catalogSource: redhat-operators
gitops.channel: gitops-1.11
gitops.channel: gitops-1.12

# gitops.sourceNamespace: GitOpsDefaultCatalogSourceNamespace
# gitops.installApprovalPlan: GitOpsDefaultApprovalPlan
Expand All @@ -26,7 +26,7 @@ spec:
targetRepo: https://github.com/pattern-clone/mypattern
targetRevision: main
gitOpsSpec:
operatorChannel: gitops-1.11
operatorChannel: gitops-1.12
operatorSource: redhat-operators
multiSourceConfig:
enabled: false
Expand Down
4 changes: 2 additions & 2 deletions common/tests/operator-install-naked.expected.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ metadata:
namespace: openshift-operators
data:
gitops.catalogSource: redhat-operators
gitops.channel: gitops-1.11
gitops.channel: gitops-1.12

# gitops.sourceNamespace: GitOpsDefaultCatalogSourceNamespace
# gitops.installApprovalPlan: GitOpsDefaultApprovalPlan
Expand All @@ -26,7 +26,7 @@ spec:
targetRepo: https://github.com/pattern-clone/mypattern
targetRevision: main
gitOpsSpec:
operatorChannel: gitops-1.11
operatorChannel: gitops-1.12
operatorSource: redhat-operators
multiSourceConfig:
enabled: false
Expand Down
4 changes: 2 additions & 2 deletions common/tests/operator-install-normal.expected.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ metadata:
namespace: openshift-operators
data:
gitops.catalogSource: redhat-operators
gitops.channel: gitops-1.11
gitops.channel: gitops-1.12

# gitops.sourceNamespace: GitOpsDefaultCatalogSourceNamespace
# gitops.installApprovalPlan: GitOpsDefaultApprovalPlan
Expand All @@ -26,7 +26,7 @@ spec:
targetRepo: https://github.com/pattern-clone/mypattern
targetRevision: main
gitOpsSpec:
operatorChannel: gitops-1.11
operatorChannel: gitops-1.12
operatorSource: redhat-operators
multiSourceConfig:
enabled: false
Expand Down
3 changes: 2 additions & 1 deletion tests/common-acm-industrial-edge-factory.expected.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ metadata:
namespace: open-cluster-management
annotations:
argocd.argoproj.io/sync-wave: "-1"
installer.open-cluster-management.io/mce-subscription-spec: '{"source": "redhat-operators" }'
spec: {}
---
# Source: acm/templates/policies/ocp-gitops-policy.yaml
Expand Down Expand Up @@ -109,7 +110,7 @@ spec:
labels:
operators.coreos.com/openshift-gitops-operator.openshift-operators: ''
spec:
channel: gitops-1.11
channel: gitops-1.12
installPlanApproval: Automatic
name: openshift-gitops-operator
source: redhat-operators
Expand Down
2 changes: 1 addition & 1 deletion tests/common-acm-industrial-edge-hub.expected.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ spec:
labels:
operators.coreos.com/openshift-gitops-operator.openshift-operators: ''
spec:
channel: gitops-1.11
channel: gitops-1.12
installPlanApproval: Automatic
name: openshift-gitops-operator
source: redhat-operators
Expand Down
2 changes: 1 addition & 1 deletion tests/common-acm-medical-diagnosis-hub.expected.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ spec:
labels:
operators.coreos.com/openshift-gitops-operator.openshift-operators: ''
spec:
channel: gitops-1.11
channel: gitops-1.12
installPlanApproval: Automatic
name: openshift-gitops-operator
source: redhat-operators
Expand Down
2 changes: 1 addition & 1 deletion tests/common-acm-naked.expected.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ spec:
labels:
operators.coreos.com/openshift-gitops-operator.openshift-operators: ''
spec:
channel: gitops-1.11
channel: gitops-1.12
installPlanApproval: Automatic
name: openshift-gitops-operator
source: redhat-operators
Expand Down
2 changes: 1 addition & 1 deletion tests/common-acm-normal.expected.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -806,7 +806,7 @@ spec:
labels:
operators.coreos.com/openshift-gitops-operator.openshift-operators: ''
spec:
channel: gitops-1.11
channel: gitops-1.12
installPlanApproval: Automatic
name: openshift-gitops-operator
source: redhat-operators
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ metadata:
namespace: openshift-operators
data:
gitops.catalogSource: redhat-operators
gitops.channel: gitops-1.11
gitops.channel: gitops-1.12

# gitops.sourceNamespace: GitOpsDefaultCatalogSourceNamespace
# gitops.installApprovalPlan: GitOpsDefaultApprovalPlan
Expand All @@ -26,7 +26,7 @@ spec:
targetRepo: https://github.com/pattern-clone/mypattern
targetRevision: main
gitOpsSpec:
operatorChannel: gitops-1.11
operatorChannel: gitops-1.12
operatorSource: redhat-operators
multiSourceConfig:
enabled: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ metadata:
namespace: openshift-operators
data:
gitops.catalogSource: redhat-operators
gitops.channel: gitops-1.11
gitops.channel: gitops-1.12

# gitops.sourceNamespace: GitOpsDefaultCatalogSourceNamespace
# gitops.installApprovalPlan: GitOpsDefaultApprovalPlan
Expand All @@ -26,7 +26,7 @@ spec:
targetRepo: https://github.com/pattern-clone/mypattern
targetRevision: main
gitOpsSpec:
operatorChannel: gitops-1.11
operatorChannel: gitops-1.12
operatorSource: redhat-operators
multiSourceConfig:
enabled: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ metadata:
namespace: openshift-operators
data:
gitops.catalogSource: redhat-operators
gitops.channel: gitops-1.11
gitops.channel: gitops-1.12

# gitops.sourceNamespace: GitOpsDefaultCatalogSourceNamespace
# gitops.installApprovalPlan: GitOpsDefaultApprovalPlan
Expand All @@ -26,7 +26,7 @@ spec:
targetRepo: https://github.com/pattern-clone/mypattern
targetRevision: main
gitOpsSpec:
operatorChannel: gitops-1.11
operatorChannel: gitops-1.12
operatorSource: redhat-operators
multiSourceConfig:
enabled: true
Expand Down
Loading