Skip to content

Commit f84adef

Browse files
Merge branch 'stable' into 1906-automatically-determine-volumebindingmode-of-config-pvc
2 parents 4f6156d + 9913f14 commit f84adef

File tree

13 files changed

+788
-462
lines changed

13 files changed

+788
-462
lines changed

Makefile

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
11
.PHONY: install build lint pyinstaller clean
22

3-
venv:
4-
python3 -m venv venv
3+
.venv:
4+
python3 -m venv .venv
55

66
clean:
7-
rm -rf venv
7+
rm -rf .venv
88

9-
install: venv
10-
. venv/bin/activate && python -m pip install --editable .[dev]
9+
install: .venv
10+
. .venv/bin/activate && python -m pip install --editable .[dev]
1111

12-
build: venv
12+
build: .venv
1313
rm -f README.rst
14-
. venv/bin/activate && python -m build
14+
. .venv/bin/activate && python -m build
1515

1616
# Note: "make install" needs to be ran once before this target will work, but we
1717
# don't want to set it as a dependency otherwise it unnecessarily slows down
1818
# fast implement/test cycles. "make install" created an editable install of the
1919
# package which is linked to the files you are editing so there is no need to
2020
# re-install after each change.
2121
unit-test:
22-
. venv/bin/activate && pytest test/src/mock
22+
. .venv/bin/activate && pytest test/src/mock
2323

24-
lint: venv
24+
lint: .venv
2525
rm -f README.rst
26-
. venv/bin/activate && flake8 src --count --select=E9,F63,F7,F82 --show-source --statistics && flake8 src --count --exit-zero --max-complexity=10 --max-line-length=200 --statistics
26+
. .venv/bin/activate && flake8 src --count --select=E9,F63,F7,F82 --show-source --statistics && flake8 src --count --exit-zero --max-complexity=10 --max-line-length=200 --statistics
2727

2828
pyinstaller: venv
2929
rm -f README.rst
30-
. venv/bin/activate && pyinstaller src/mas-upgrade --onefile --noconfirm --add-data="src/mas/devops/templates/ibm-mas-tekton.yaml:mas/devops/templates" --add-data="src/mas/devops/templates/subscription.yml.j2:mas/devops/templates/" --add-data="src/mas/devops/templates/pipelinerun-upgrade.yml.j2:mas/devops/templates/"
30+
. .venv/bin/activate && pyinstaller src/mas-upgrade --onefile --noconfirm --add-data="src/mas/devops/templates/ibm-mas-tekton.yaml:mas/devops/templates" --add-data="src/mas/devops/templates/subscription.yml.j2:mas/devops/templates/" --add-data="src/mas/devops/templates/pipelinerun-upgrade.yml.j2:mas/devops/templates/"

src/mas/devops/aiservice.py

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# *****************************************************************************
2+
# Copyright (c) 2025 IBM Corporation and other Contributors.
3+
#
4+
# All rights reserved. This program and the accompanying materials
5+
# are made available under the terms of the Eclipse Public License v1.0
6+
# which accompanies this distribution, and is available at
7+
# http://www.eclipse.org/legal/epl-v10.html
8+
#
9+
# *****************************************************************************
10+
11+
import logging
12+
from openshift.dynamic import DynamicClient
13+
from openshift.dynamic.exceptions import NotFoundError, ResourceNotFoundError, UnauthorizedError
14+
15+
from .ocp import listInstances
16+
from .olm import getSubscription
17+
18+
logger = logging.getLogger(__name__)
19+
20+
21+
def listAiServiceInstances(dynClient: DynamicClient) -> list:
22+
"""
23+
Get a list of AI Service instances on the cluster
24+
"""
25+
return listInstances(dynClient, "aiservice.ibm.com/v1", "AIServiceApp")
26+
27+
28+
def verifyAiServiceInstance(dynClient: DynamicClient, instanceId: str) -> bool:
29+
"""
30+
Validate that the chosen AI Service instance exists
31+
"""
32+
try:
33+
aiserviceAPI = dynClient.resources.get(api_version="aiservice.ibm.com/v1", kind="AIServiceApp")
34+
aiserviceAPI.get(name=instanceId, namespace=f"aiservice-{instanceId}")
35+
return True
36+
except NotFoundError:
37+
print("NOT FOUND")
38+
return False
39+
except ResourceNotFoundError:
40+
# The AIServiceApp CRD has not even been installed in the cluster
41+
print("RESOURCE NOT FOUND")
42+
return False
43+
except UnauthorizedError as e:
44+
logger.error(f"Error: Unable to verify AI Service instance due to failed authorization: {e}")
45+
return False
46+
47+
48+
def getAiserviceChannel(dynClient: DynamicClient, instanceId: str) -> str:
49+
"""
50+
Get the AI Service channel from the subscription
51+
"""
52+
aiserviceSubscription = getSubscription(dynClient, f"aiservice-{instanceId}", "ibm-aiservice")
53+
if aiserviceSubscription is None:
54+
return None
55+
else:
56+
return aiserviceSubscription.spec.channel
Lines changed: 142 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,142 @@
1+
---
2+
# Case bundle configuration for IBM Maximo Operator Catalog 251224 (AMD64)
3+
# -----------------------------------------------------------------------------
4+
# In the future this won't be necessary as we'll be able to mirror from the
5+
# catalog itself, but not everything in the catalog supports this yet (including MAS)
6+
# so we need to use the CASE bundle mirror process still.
7+
8+
catalog_digest: sha256:b23d1c6d4b901da4fe1e8e2d3b42affbfcbac0ebbb8506a2d7e9634005ff924f #TBC
9+
10+
ocp_compatibility:
11+
- 4.16
12+
- 4.17
13+
- 4.18
14+
- 4.19
15+
16+
# Dependencies
17+
# -----------------------------------------------------------------------------
18+
ibm_licensing_version: 4.2.17 # Operator version 4.2.14 (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-licensing)
19+
common_svcs_version: 4.13.0 # Operator version 4.13.0 (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-cp-common-services)
20+
common_svcs_version_1: 4.11.0 # Additional version 4.11.0
21+
22+
cp4d_platform_version: 5.2.0+20250709.170324 # Operator version 5.2.0 (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-cp-datacore/)
23+
ibm_zen_version: 6.2.0+20250530.152516.232 # For CPD5 ibm-zen has to be explicitily mirrored
24+
25+
db2u_version: 7.3.1+20250821.161005.16793 # Operator version 110509.0.6 to find the version 7.3.1+20250821.161005.16793, search db2u-operator digest on repo (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-db2uoperator)
26+
events_version: 5.0.1 # Operator version 5.0.1 (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-events-operator)
27+
uds_version: 2.0.12 # Operator version 2.0.12 # sticking to 2.0.12 version # Please do Not Change
28+
sls_version: 3.12.3 # Operator version 3.10.0 (https://github.ibm.com/maximoappsuite/ibm-sls/releases)
29+
tsm_version: 1.7.2 # Operator version 1.5.4 (https://github.ibm.com/maximoappsuite/ibm-truststore-mgr/releases)
30+
dd_version: 1.1.20 # Operator version 1.1.14 (https://github.ibm.com/maximoappsuite/ibm-data-dictionary/releases)
31+
appconnect_version: 6.2.0 # Operator version 6.2.0 # sticking to 6.2.0 version # Please do Not Change
32+
wsl_version: 11.0.0+20250521.202913.73 # used for wsl and wsl_runtimes unless wsl_runtimes_version also specified
33+
wsl_runtimes_version: 11.0.0+20250515.090949.21 # cpd 5.1.3 uses version 10.3.0 of wsl runtimes but only 10.2.0 for wsl itself
34+
wml_version: 11.0.0+20250530.193146.282 # Operator version 5.2.0
35+
postgress_version: 5.16.0+20250827.110911.2626 # ibm-cpd-cloud-native-postgresql-operator 5.2.0 cp4d
36+
37+
# Why are these commented out?
38+
ccs_build: 11.0.0+20250605.130237.468
39+
# datarefinery_build: +20240517.202103.146
40+
41+
spark_version: 11.0.0+20250604.163055.2097 # Operator version 5.2.0
42+
cognos_version: 28.0.0+20250515.175459.10054 # Operator version 25.0.0
43+
couchdb_version: 1.0.13 # Operator version 2.2.1 (1.0.13) sticking with 1.0.13 # (This is required for Assist 9.0, https://github.com/IBM/cloud-pak/blob/master/repo/case/ibm-couchdb/index.yaml)
44+
elasticsearch_version: 1.1.2667 # Operator version 1.1.2667
45+
opensearch_version: 1.1.2494 # Operator version 1.1.2494
46+
47+
# Maximo Application Suite
48+
# -----------------------------------------------------------------------------
49+
mas_core_version:
50+
9.2.x-feature: 9.2.0-pre.stable_4447 # Updated
51+
9.1.x: 9.1.6 # Updated
52+
9.0.x: 9.0.17 # Updated
53+
8.10.x: 8.10.31 # Updated
54+
8.11.x: 8.11.28 # Updated
55+
mas_assist_version:
56+
9.1.x: 9.1.5 # Updated
57+
9.0.x: 9.0.11 # Updated
58+
8.10.x: 8.7.8 # No Update
59+
8.11.x: 8.8.7 # No Update
60+
mas_hputilities_version:
61+
9.1.x: "" # Not Supported
62+
9.0.x: "" # Not Supported
63+
8.10.x: 8.6.7 # No Update
64+
8.11.x: "" # Not Supported
65+
mas_iot_version:
66+
9.1.x: 9.1.5 # Updated
67+
9.0.x: 9.0.14 # Updated
68+
8.10.x: 8.7.28 # Updated
69+
8.11.x: 8.8.24 # Updated
70+
mas_manage_version:
71+
9.2.x-feature: 9.2.0-pre.stable_4817 # Updated
72+
9.1.x: 9.1.6 # Updated
73+
9.0.x: 9.0.19 # Updated
74+
8.10.x: 8.6.32 # Updated
75+
8.11.x: 8.7.26 # Updated
76+
mas_monitor_version:
77+
9.1.x: 9.1.5 # Updated
78+
9.0.x: 9.0.15 # Updated
79+
8.10.x: 8.10.25 # Updated
80+
8.11.x: 8.11.23 # Updated
81+
mas_optimizer_version:
82+
9.2.x-feature: 9.2.0-pre.stable_3097 # Updated
83+
9.1.x: 9.1.6 # Updated
84+
9.0.x: 9.0.16 # No Update
85+
8.10.x: 8.4.23 # No Update
86+
8.11.x: 8.5.22 # No Update
87+
mas_predict_version:
88+
9.1.x: 9.1.3 # Not release for 251127
89+
9.0.x: 9.0.10 # Not release for 251127
90+
8.10.x: 8.8.11 # Not release for 251127
91+
8.11.x: 8.9.13 # Not release for 251127
92+
mas_visualinspection_version:
93+
9.1.x: 9.1.4 # Updated
94+
9.0.x: 9.0.14 # Updated
95+
8.10.x: 8.8.4 # No Update
96+
8.11.x: 8.9.17 # Updated
97+
mas_facilities_version:
98+
9.1.x: 9.1.5 # Updated
99+
9.0.x: "" # Not Supported
100+
8.10.x: "" # Not Supported
101+
8.11.x: "" # Not Supported
102+
103+
104+
# Maximo AI Service
105+
# ------------------------------------------------------------------------------
106+
aiservice_version:
107+
9.1.x: 9.1.9 # Updated
108+
109+
# Extra Images for UDS
110+
# ------------------------------------------------------------------------------
111+
uds_extras_version: 1.5.0
112+
113+
# Extra Images for Mongo
114+
# ------------------------------------------------------------------------------
115+
mongo_extras_version_default: 8.0.13
116+
117+
# Variables used to mirror additional mongo image versions
118+
mongo_extras_version_4: 4.4.21
119+
mongo_extras_version_5: 5.0.23
120+
mongo_extras_version_6: 6.0.12
121+
mongo_extras_version_7: 7.0.23
122+
mongo_extras_version_8: 8.0.13
123+
124+
# Extra Images for Db2u
125+
# ------------------------------------------------------------------------------
126+
db2u_extras_version: 1.0.6 # No Update
127+
db2u_filter: db2
128+
129+
# Extra Images for IBM Watson Discovery
130+
# ------------------------------------------------------------------------------
131+
#wd_extras_version: 1.0.4
132+
133+
# Extra Images for Amlen
134+
# ------------------------------------------------------------------------------
135+
amlen_extras_version: 1.1.3
136+
137+
# Default Cloud Pak for Data version
138+
# ------------------------------------------------------------------------------
139+
cpd_product_version_default: 5.2.0
140+
141+
manage_extras_913: 9.1.3
142+
minio_version: RELEASE.2025-06-13T11-33-47Z

0 commit comments

Comments
 (0)