Skip to content

Commit 5c72c87

Browse files
Yuriy TeodorovychYuriy Teodorovych
authored andcommitted
Merge branch 'main' into yt-standardize-crds
2 parents 5971e57 + 75b4a49 commit 5c72c87

File tree

229 files changed

+22463
-8146
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

229 files changed

+22463
-8146
lines changed

.github/hack/cleanup-odh.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,10 @@ kubectl delete operatorgroup odh-operator-group -n odh-operator --ignore-not-fou
7777
echo "7. Deleting odh-operator namespace..."
7878
kubectl delete ns odh-operator --ignore-not-found --timeout=120s 2>/dev/null || true
7979

80+
# 8. Delete opendatahub namespace (contains deployed components)
81+
echo "8. Deleting opendatahub namespace..."
82+
kubectl delete ns opendatahub --ignore-not-found --timeout=120s 2>/dev/null || true
83+
8084
force_delete_namespace() {
8185
local ns=$1
8286
shift
@@ -107,10 +111,6 @@ force_delete_namespace() {
107111
kubectl wait --for=delete namespace/"$ns" --timeout=30s 2>/dev/null || true
108112
}
109113

110-
# 8. Delete opendatahub namespace (contains deployed components)
111-
echo "8. Deleting opendatahub namespace..."
112-
force_delete_namespace "opendatahub" "maasmodelrefs.maas.opendatahub.io"
113-
114114
# 9. Delete models-as-a-service namespace (contains MaaS CRs)
115115
echo "9. Deleting models-as-a-service namespace..."
116116
force_delete_namespace "models-as-a-service" \
@@ -120,12 +120,12 @@ force_delete_namespace "models-as-a-service" \
120120
for policy_ns in kuadrant-system rh-connectivity-link; do
121121
echo "10. Deleting $policy_ns namespace (if installed)..."
122122
force_delete_namespace "$policy_ns" \
123-
"authorinos.operator.authorino.kuadrat.io" "kuadrants.kuadrant.io" "limitadors.limitador.kuadrant.io"
123+
"authorinos.operator.authorino.kuadrant.io" "kuadrants.kuadrant.io" "limitadors.limitador.kuadrant.io"
124124
done
125125

126126
# 11. Delete llm namespace and model resources
127127
echo "11. Deleting LLM models and namespace..."
128-
force_delete_namespace "llm" "llminferenceservice" "inferenceservice"
128+
force_delete_namespace "llm" "llminferenceservice" "inferenceservice" "maasmodelrefs.maas.opendatahub.io"
129129

130130
# 12. Delete gateway resources in openshift-ingress
131131
echo "12. Deleting gateway resources..."

.github/hack/install-odh.sh

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,12 @@
55
# Prerequisites: cert-manager and LWS operators (run install-cert-manager-and-lws.sh first).
66
#
77
# Environment variables:
8-
# OPERATOR_CATALOG - Custom catalog image (optional). When unset, uses community-operators (ODH 3.3).
8+
# OPERATOR_CATALOG - Custom catalog image (optional). When unset, uses community-operators.
99
# Set to e.g. quay.io/opendatahub/opendatahub-operator-catalog:latest for custom builds.
10-
# OPERATOR_CHANNEL - Subscription channel (default: fast-3 for community, fast for custom catalog)
10+
# OPERATOR_CHANNEL - Subscription channel (default: fast-3)
11+
# OPERATOR_STARTING_CSV - Pin Subscription startingCSV (default: opendatahub-operator.v3.4.0-ea.1). Set to "-" to omit.
12+
# OPERATOR_INSTALL_PLAN_APPROVAL - Manual (default) or Automatic; use "-" to omit.
13+
# Manual: blocks auto-upgrades; this script auto-approves only the first InstallPlan so install does not stall.
1114
# OPERATOR_IMAGE - Custom operator image to patch into CSV (optional)
1215
#
1316
# Usage: ./install-odh.sh
@@ -21,6 +24,8 @@ DATA_DIR="${REPO_ROOT}/scripts/data"
2124
NAMESPACE="${OPERATOR_NAMESPACE:-opendatahub}"
2225
OPERATOR_CATALOG="${OPERATOR_CATALOG:-}"
2326
OPERATOR_CHANNEL="${OPERATOR_CHANNEL:-}"
27+
OPERATOR_STARTING_CSV="${OPERATOR_STARTING_CSV:-}"
28+
OPERATOR_INSTALL_PLAN_APPROVAL="${OPERATOR_INSTALL_PLAN_APPROVAL:-}"
2429
OPERATOR_IMAGE="${OPERATOR_IMAGE:-}"
2530

2631
# Source deployment helpers
@@ -59,28 +64,38 @@ patch_operator_csv_if_needed() {
5964
echo "=== Installing OpenDataHub operator ==="
6065
echo ""
6166

62-
# 1. Catalog setup: use community-operators (ODH 3.3) by default, or custom catalog when OPERATOR_CATALOG is set
67+
# 1. Catalog setup: community-operators by default, or custom catalog when OPERATOR_CATALOG is set
6368
echo "1. Setting up ODH catalog..."
6469
if [[ -n "$OPERATOR_CATALOG" ]]; then
6570
echo " Using custom catalog: $OPERATOR_CATALOG"
6671
create_custom_catalogsource "odh-custom-catalog" "openshift-marketplace" "$OPERATOR_CATALOG"
6772
catalog_source="odh-custom-catalog"
68-
channel="${OPERATOR_CHANNEL:-fast}"
73+
channel="${OPERATOR_CHANNEL:-fast-3}"
6974
else
70-
echo " Using community-operators (ODH 3.3)"
75+
echo " Using community-operators"
7176
catalog_source="community-operators"
7277
channel="${OPERATOR_CHANNEL:-fast-3}"
7378
fi
7479

80+
# Pin to ODH 3.4 EA1 unless overridden (omit with OPERATOR_STARTING_CSV=- to follow channel head)
81+
starting_csv="${OPERATOR_STARTING_CSV:-opendatahub-operator.v3.4.0-ea.1}"
82+
[[ "$starting_csv" == "-" ]] && starting_csv=""
83+
84+
# Manual = no auto-upgrades; install_olm_operator still approves the first InstallPlan programmatically
85+
plan_approval="${OPERATOR_INSTALL_PLAN_APPROVAL:-Manual}"
86+
[[ "$plan_approval" == "-" ]] && plan_approval=""
87+
7588
# 2. Install ODH operator via OLM
7689
echo "2. Installing ODH operator..."
7790
install_olm_operator \
7891
"opendatahub-operator" \
7992
"$NAMESPACE" \
8093
"$catalog_source" \
8194
"$channel" \
82-
"" \
83-
"AllNamespaces"
95+
"$starting_csv" \
96+
"AllNamespaces" \
97+
"openshift-marketplace" \
98+
"$plan_approval"
8499

85100
# 3. Patch CSV with custom image if specified
86101
if [[ -n "$OPERATOR_IMAGE" ]]; then

.github/hack/uninstall-leader-worker-set.sh

Lines changed: 0 additions & 60 deletions
This file was deleted.

.github/workflows/build-test.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,20 @@ name: Build
22

33
on:
44
pull_request:
5+
paths:
6+
- 'maas-controller/api/**'
7+
- 'maas-controller/Makefile'
8+
- 'deployment/base/maas-controller/crd/**'
9+
- 'deployment/**'
10+
- '.github/workflows/build-test.yml'
511
push:
612
branches:
713
- main
814

15+
permissions:
16+
actions: read
17+
contents: read
18+
919
jobs:
1020
validate-manifests:
1121
name: Validate Kustomize manifests
@@ -27,3 +37,25 @@ jobs:
2737
- name: Validate Kustomize manifests
2838
run: |
2939
./scripts/ci/validate-manifests.sh
40+
41+
verify-codegen:
42+
name: Verify generated CRDs and deepcopy
43+
timeout-minutes: 10
44+
concurrency:
45+
group: ${{ github.workflow }}-${{ github.ref }}-verify-codegen
46+
cancel-in-progress: true
47+
48+
runs-on: ubuntu-latest
49+
50+
steps:
51+
- uses: actions/checkout@v5
52+
53+
- uses: actions/setup-go@v6
54+
with:
55+
go-version-file: maas-controller/go.mod
56+
cache: true
57+
cache-dependency-path: maas-controller/go.sum
58+
59+
- name: Verify generated code is up to date
60+
working-directory: maas-controller
61+
run: make verify-codegen

.gitignore

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ __pycache__/
2929
*$py.class
3030
*.so
3131
.Python
32+
.venv/
3233
env/
3334
venv/
3435
ENV/
@@ -37,8 +38,19 @@ venv.bak/
3738
pip-log.txt
3839
pip-delete-this-directory.txt
3940
.coverage
41+
coverage.xml
4042
.pytest_cache/
43+
.mypy_cache/
44+
.ruff_cache/
45+
.tox/
4146
htmlcov/
47+
48+
# Test / build reports
49+
reports/
50+
51+
# OS / editor cruft
52+
.DS_Store
53+
.vscode/
4254
apps/frontend/.env.local
4355
apps/backend/.env
4456
CLAUDE.md

.gitleaks.toml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# Gitleaks configuration for opendatahub-io repos
2+
# Synced from security-config. Do not edit in target repos.
3+
#
4+
# Path allowlists use Go regex syntax.
5+
# Real credentials should NEVER be committed to any repository.
6+
7+
[extend]
8+
useDefault = true
9+
10+
[allowlist]
11+
description = "Exclude test fixtures, mock data, sample configs, and CI resources"
12+
paths = [
13+
# Go test files (commonly contain mock credentials)
14+
'''.*_test\.go$''',
15+
16+
# JS/TS test files (.spec.ts, .test.tsx, etc.)
17+
'''.*\.spec\.(ts|tsx|js|jsx)$''',
18+
'''.*\.test\.(ts|tsx|js|jsx)$''',
19+
20+
# JS/TS test directories
21+
'''__tests__/''',
22+
23+
# Go testdata directories
24+
'''testdata/''',
25+
26+
# Python test data directories
27+
'''test_data/''',
28+
29+
# Test fixtures
30+
'''fixtures/''',
31+
32+
# JavaScript/TypeScript mocks
33+
'''__mocks__/''',
34+
35+
# Go/Java/TS mock directories
36+
'''mocks/''',
37+
'''k8mocks/''',
38+
39+
# Sample and example configs with placeholder credentials
40+
'''docs/samples/''',
41+
'''config/samples/''',
42+
'''config/overlays/test/''',
43+
44+
# CI/GitHub Actions test resources
45+
'''\.github/resources/''',
46+
47+
# E2E test credentials
48+
'''test/e2e/credentials/''',
49+
'''tests/e2e/credentials/''',
50+
51+
# OpenShift CI sample resources
52+
'''openshift-ci/resources/samples/''',
53+
54+
# Cypress test data
55+
'''cypress/fixtures/''',
56+
'''cypress/tests/mocked/''',
57+
58+
# Test certificate and key files
59+
'''tests/data/.*\.(pem|crt|key)$''',
60+
]
61+
62+
# Known test/placeholder credentials used in documentation and tests
63+
regexes = [
64+
'''database-password\s*:\s*"?(The)?BlurstOfTimes"?''',
65+
'''database-user\s*:\s*"?mlmduser"?''',
66+
'''database-user\s*:\s*"?modelregistryuser"?''',
67+
]

.gitleaksignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Gitleaks ignore file
2+
# Add false positive fingerprints below (one per line)
3+
# Format: commit:file:rule-id:line or file:rule-id:line
4+
#
5+
# For path-based exclusions, use .gitleaks.toml allowlist instead.

.tekton/odh-maas-api-pull-request.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@ spec:
2929
value: maas-api/Dockerfile
3030
- name: path-context
3131
value: maas-api
32+
- name: build-platforms
33+
value:
34+
- linux/x86_64
35+
- linux/arm64
36+
- linux/ppc64le
37+
- linux/s390x
3238
- name: additional-tags
3339
value:
3440
- 'odh-pr-{{revision}}'

.tekton/odh-maas-api-push.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ spec:
2828
value: maas-api/Dockerfile
2929
- name: path-context
3030
value: maas-api
31+
- name: build-platforms
32+
value:
33+
- linux/x86_64
34+
- linux/arm64
35+
- linux/ppc64le
36+
- linux/s390x
3137
pipelineRef:
3238
resolver: git
3339
params:

.tekton/odh-maas-controller-pull-request.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,12 @@ spec:
3434
- 'odh-pr-{{revision}}'
3535
- name: pipeline-type
3636
value: pull-request
37+
- name: build-platforms
38+
value:
39+
- linux/x86_64
40+
- linux/arm64
41+
- linux/ppc64le
42+
- linux/s390x
3743
pipelineRef:
3844
resolver: git
3945
params:

0 commit comments

Comments
 (0)