-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[minor] Add support mongo 5.0.23 and 6.0.12 (#1144)
Co-authored-by: Sanjay Prabhakar <sanjay.prabhakar@uk.ibm.com>
- Loading branch information
1 parent
017a0ad
commit 0d13647
Showing
7 changed files
with
181 additions
and
80 deletions.
There are no files selected for viewing
26 changes: 26 additions & 0 deletions
26
ibm/mas_devops/roles/mirror_extras_prepare/vars/mongoce_5.0.23.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
--- | ||
extra_images: | ||
- name: mongodb/mongodb-kubernetes-operator | ||
registry: quay.io | ||
tag: 0.8.3 | ||
digest: sha256:9ef7a689b7f2789b436458a6d5f361ffcb4e182daa6c33d79687e87f268c7761 # 0.8.3-b20231215T000000Z | ||
|
||
- name: mongodb/mongodb-kubernetes-operator-version-upgrade-post-start-hook | ||
registry: quay.io | ||
tag: 1.0.8 | ||
digest: sha256:641ecd0798cd5b49a060df50ad60dc75d964430d6cf9b3d3e91ebc9b19a67a34 # 1.0.8-b20231215T000000Z | ||
|
||
- name: mongodb/mongodb-agent | ||
registry: quay.io | ||
tag: 12.0.25.7724-1 | ||
digest: sha256:ae9a33c87fc623985b26140ed93bb2ea510fd3682279ea50770f9c4d47b20b2c # 12.0.25.7724-1 | ||
|
||
- name: mongodb/mongodb-kubernetes-readinessprobe | ||
registry: quay.io | ||
tag: 1.0.17 | ||
digest: sha256:99013fbeb1dccde1f4995adba188b95ce14b336d587730146d3695cb175fcf03 # 1.0.17-b20231215T000000Z | ||
|
||
- name: ibmmas/mongo | ||
registry: quay.io | ||
tag: 5.0.23 | ||
digest: sha256:2d91d0b38b28660e068a77fea8bc51cfdd97e2b8c236c5eeaacdfa50fa798231 # quay.io/mongodb/mongodb-community-server:5.0.23-ubi8-20231214T080737Z |
26 changes: 26 additions & 0 deletions
26
ibm/mas_devops/roles/mirror_extras_prepare/vars/mongoce_6.0.12.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
--- | ||
extra_images: | ||
- name: mongodb/mongodb-kubernetes-operator | ||
registry: quay.io | ||
tag: 0.8.3 | ||
digest: sha256:9ef7a689b7f2789b436458a6d5f361ffcb4e182daa6c33d79687e87f268c7761 # 0.8.3-b20231215T000000Z | ||
|
||
- name: mongodb/mongodb-kubernetes-operator-version-upgrade-post-start-hook | ||
registry: quay.io | ||
tag: 1.0.8 | ||
digest: sha256:641ecd0798cd5b49a060df50ad60dc75d964430d6cf9b3d3e91ebc9b19a67a34 # 1.0.8-b20231215T000000Z | ||
|
||
- name: mongodb/mongodb-agent | ||
registry: quay.io | ||
tag: 12.0.25.7724-1 | ||
digest: sha256:ae9a33c87fc623985b26140ed93bb2ea510fd3682279ea50770f9c4d47b20b2c # 12.0.25.7724-1 | ||
|
||
- name: mongodb/mongodb-kubernetes-readinessprobe | ||
registry: quay.io | ||
tag: 1.0.17 | ||
digest: sha256:99013fbeb1dccde1f4995adba188b95ce14b336d587730146d3695cb175fcf03 # 1.0.17-b20231215T000000Z | ||
|
||
- name: ibmmas/mongo | ||
registry: quay.io | ||
tag: 6.0.12 | ||
digest: sha256:64ed5175850c3be8bd2976823e245141c4e6a7046102136f8c333850dbe6a399 # quay.io/mongodb/mongodb-community-server:6.0.12-ubi8-20231214T084821Z |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
105 changes: 105 additions & 0 deletions
105
ibm/mas_devops/roles/mongodb/tasks/determine-ibmcatalog-tag.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
--- | ||
# The MongoDB version is based on the chosen ibm-operator-catalog. However the | ||
# ibm-operator-catalog does not explicitly include information about the mongo version. | ||
# | ||
# The configuration files in common_vars/casebundles do specify the MongoDB | ||
# version for each of the MAS published ibm-operator-catalog catalogs. | ||
# | ||
# To determine which common_vars/casebundles configuration file to use, this role | ||
# extracts the catalog_tag from the ibm-operator-catalog's displayName. | ||
# | ||
# For example: | ||
# displayName: IBM Maximo Operators (v8-230926-amd64) | ||
# | ||
# catalog_tag is v8-230926-amd64 | ||
# MongoDB version will be determined by loading common_vars/casebundles/v8-230926-amd64.yml | ||
# | ||
# And FINALLY... | ||
# If the MongoDB version cannot be determined from the above logic, | ||
# the MongoDB version will be determined by the last configuration file in | ||
# common_vars/casebundles/ | ||
# | ||
# And if still it cannot be determined because perhaps its not specified in the | ||
# configuration file, a default value will be used. | ||
|
||
# List the common_vars/casebundle configuration files if last_catalog_tag is not defined | ||
- block: | ||
- name: "List yml files in common_vars/casebundles folder" | ||
find: | ||
paths: "{{ role_path }}/../../common_vars/casebundles" | ||
patterns: "*.yml" | ||
file_type: "file" | ||
register: find_result | ||
|
||
- debug: | ||
var: find_result | ||
|
||
# Determine the last configuration file in the list just in case we need it later | ||
- set_fact: | ||
last_catalog_tag: "{{ find_result['files'] | map(attribute='path') | map('regex_replace', '^.*/(.*).yml$', '\\1') | sort |last }}" | ||
when: find_result is defined | ||
when: last_catalog_tag is not defined or last_catalog_tag == "" | ||
|
||
# Display the Last Catalog Version | ||
- name: "Display the Last Catalog Version" | ||
debug: | ||
msg: | ||
- "Last Catalog Version ............................ {{ last_catalog_tag }}" | ||
|
||
# 1. Get the IBM Catalog if available | ||
# ----------------------------------------------------------------------------- | ||
- name: "Lookup ibm-operator-catalog" | ||
kubernetes.core.k8s_info: | ||
api_version: operators.coreos.com/v1alpha1 | ||
name: ibm-operator-catalog | ||
namespace: openshift-marketplace | ||
kind: CatalogSource | ||
register: catalog_lookup | ||
|
||
- name: "Determine catalog version from catalog displayName" | ||
block: | ||
# extract the catalog tag from displayName | ||
- set_fact: | ||
catalog_tag: "{{ catalog_lookup.resources[0].spec.displayName.split('(')[1].split(')')[0].split(' ')[0] }}" | ||
when: | ||
- catalog_lookup is defined | ||
- catalog_lookup.resources is defined | ||
- catalog_lookup.resources | length > 0 | ||
- catalog_lookup.resources[0].spec is defined | ||
- catalog_lookup.resources[0].spec.displayName is defined | ||
- '"(" in catalog_lookup.resources[0].spec.displayName' | ||
|
||
- name: Check if file exists in casebundles | ||
stat: | ||
path: "{{ role_path }}/../../common_vars/casebundles/{{ catalog_tag }}.yml" | ||
register: file_exists_result | ||
when: catalog_tag is defined and catalog_tag != "" | ||
|
||
# use last_catalog_tag if the casebundles file does not exist | ||
- set_fact: | ||
catalog_tag: "{{ last_catalog_tag }}" | ||
when: | ||
- file_exists_result is defined | ||
- file_exists_result.stat is defined | ||
- file_exists_result.stat.exists is defined | ||
- not file_exists_result.stat.exists | ||
- last_catalog_tag is defined and last_catalog_tag != "" | ||
|
||
# use last_catalog_tag if unable to get catalog_tag from displayName | ||
- set_fact: | ||
catalog_tag: "{{ last_catalog_tag }}" | ||
when: | ||
- catalog_tag is not defined | ||
- last_catalog_tag is defined and last_catalog_tag != "" | ||
|
||
rescue: | ||
# use the last_catalog_tag when the catalog_tag cannot be determined from the displayName | ||
- set_fact: | ||
catalog_tag: "{{ last_catalog_tag }}" | ||
when: last_catalog_tag is defined and last_catalog_tag != "" | ||
|
||
- name: "Catalog Version" | ||
debug: | ||
msg: | ||
- "Catalog Version ............................ {{ catalog_tag }}" | ||
when: catalog_tag is defined and catalog_tag != "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters