-
Notifications
You must be signed in to change notification settings - Fork 158
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
init: import code from rhods-operator 2.15 + new commits for 2.16 fro…
…m incubation (#1309) * Init: import rhoai 2.15 Signed-off-by: Wen Zhou <[email protected]> * update: fix difference from previous commit Signed-off-by: Wen Zhou <[email protected]> * update: docs Signed-off-by: Wen Zhou <[email protected]> * remove: konflux Signed-off-by: Wen Zhou <[email protected]> * fix: docs and wrong selector on service Signed-off-by: Wen Zhou <[email protected]> * update: make TrustyAI GA Signed-off-by: Wen Zhou <[email protected]> * fix: syntax and missing placeholder file and channel Signed-off-by: Wen Zhou <[email protected]> * secret-generator controller: avoid reporting 'Secret not found' error in reconcile (#1312) (cherry picked from commit bde4b4e) * update: remove dsp with v1(tekton)backend related code (#1281) * update: remove dsp with v1(tekton)backend related code - images - tekton rbac - descriptions Signed-off-by: Wen Zhou <[email protected]> Co-authored-by: Humair Khan <[email protected]> --------- Signed-off-by: Wen Zhou <[email protected]> Co-authored-by: Humair Khan <[email protected]> (cherry picked from commit 133b710) * update: remove two SA which does not seem valid (#1254) Signed-off-by: Wen Zhou <[email protected]> (cherry picked from commit c0e0709) * update: rename variables rhods to rhoai (#1313) Signed-off-by: Wen Zhou <[email protected]> Co-authored-by: ajaypratap003 <[email protected]> (cherry picked from commit 511977e) * Tidy up run-nowebhook recipe & make clean PHONY (#1310) * chore: Tidy run-nowebhook recipe The suggestion to tidy up the run-nowebhook recipe comes from this conversation: https://github.com/opendatahub-io/opendatahub-operator/pull/1304/files#r1806731373 * chore: Make `clean` a PHONY target I believe `clean` should be a PHONY target, since it doesn't create a file called `clean` (cherry picked from commit b91bd29) * chore: uplift to 2.16 and fix lint Signed-off-by: Wen Zhou <[email protected]> * fix: wrong type (#1322) - we should watch IngressController from operator.openshift.io, not the k8s ingress - this matched the cache we added in main Signed-off-by: Wen Zhou <[email protected]> (cherry picked from commit 8ea9ea0) * update golangci-lint to v1.61.0 (#1327) * chore(linter): update golangci-lint to v1.61.0 * chore(linter): fix findings (cherry picked from commit 87c87ab) * fix: name in CSV + serviceaccountt + role/binding name Signed-off-by: Wen Zhou <[email protected]> * chore: remove duplicated image in modelmesh (#1336) - this only apply for deplenet odh-model-controller - no need to set it in the default map, a waste Signed-off-by: Wen Zhou <[email protected]> (cherry picked from commit 1f5af72) * feat: add annoation for cnf cni and csi Signed-off-by: Wen Zhou <[email protected]> * update: test and manifests for webhook mostly Signed-off-by: Wen Zhou <[email protected]> * add: missing mentric service Signed-off-by: Wen Zhou <[email protected]> --------- Signed-off-by: Wen Zhou <[email protected]> Co-authored-by: Marek Laššák <[email protected]> Co-authored-by: Gerard Ryan <[email protected]> Co-authored-by: Luca Burgazzoli <[email protected]>
- Loading branch information
1 parent
4d7e041
commit a9422e8
Showing
301 changed files
with
17,789 additions
and
10,758 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
build_root_image: | ||
namespace: openshift | ||
name: release | ||
tag: golang-1.20 | ||
tag: golang-1.21 |
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,28 @@ | ||
<!--- | ||
Many thanks for submitting your Pull Request ❤️! | ||
Please complete the following sections for a smooth review. | ||
--> | ||
|
||
## Description | ||
<!--- Describe your changes in detail --> | ||
|
||
<!--- Link your JIRA and related links here for reference. --> | ||
|
||
## How Has This Been Tested? | ||
<!--- Please describe in detail how you tested your changes. --> | ||
<!--- Include details of your testing environment and the tests you ran to --> | ||
<!--- see how your change affects other areas of the code, etc. --> | ||
|
||
## Screenshot or short clip | ||
<!--- If applicable, attach a screenshot or a short clip demonstrating the feature. --> | ||
|
||
## Merge criteria | ||
<!--- This PR will be merged by any repository approver when it meets all the points in the checklist --> | ||
<!--- Go over all the following points, and put an `x` in all the boxes that apply. --> | ||
|
||
- [ ] You have read the [contributors guide](https://github.com/opendatahub-io/opendatahub-operator/blob/incubation/CONTRIBUTING.md). | ||
- [ ] Commit messages are meaningful - have a clear and concise summary and detailed explanation of what was changed and why. | ||
- [ ] Pull Request contains a description of the solution, a link to the JIRA issue, and to any dependent or related Pull Request. | ||
- [ ] Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious). | ||
- [ ] The developer has manually tested the changes and verified that the changes work |
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,14 @@ | ||
name: "Create release pr" | ||
description: "Updates get_all_manifests.sh with relavent tags and creates a pr" | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Update branches in get_all_manifest.sh | ||
uses: actions/github-script@v7 | ||
with: | ||
script: | | ||
const script = require('./.github/scripts/get-release-branches.js') | ||
script({github, core}) | ||
- name: Update versions | ||
shell: bash | ||
run: ./.github/scripts/update-manifests-tags.sh |
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,54 @@ | ||
name: "Update release versions and create pr" | ||
description: "Update versions in the manifests/makefile and create a pr" | ||
inputs: | ||
version: | ||
description: 'The release version' | ||
required: true | ||
token: | ||
description: "GH token with required rights to create pr" | ||
required: true | ||
commit-message: | ||
description: "Commit message for the pr" | ||
required: true | ||
title: | ||
description: "Title for the pr" | ||
required: true | ||
branch-name: | ||
description: "Temporary branch to host the changes" | ||
required: true | ||
base-branch: | ||
description: "Set pr base branch." | ||
required: true | ||
outputs: | ||
pull-request-number: | ||
description: "Number of the pull request created" | ||
value: ${{ steps.cpr.outputs.pull-request-number }} | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Update versions in relevant files | ||
shell: bash | ||
run: ./.github/scripts/update-versions.sh ${{ inputs.version }} | ||
- name: Run make manifests & bundle | ||
shell: bash | ||
run: make manifests bundle | ||
- name: Clean up | ||
shell: bash | ||
run: | | ||
sed -i -e "s|image: quay.io/opendatahub/opendatahub-operator:latest.*|image: REPLACE_IMAGE:latest|g" bundle/manifests/opendatahub-operator.clusterserviceversion.yaml | ||
rm ./config/manager/kustomization.yaml | ||
- name: Create pr | ||
id: cpr | ||
uses: peter-evans/create-pull-request@v6 | ||
with: | ||
token: ${{ inputs.token }} | ||
commit-message: ${{ inputs.commit-message }} | ||
branch: ${{ inputs.branch-name }} | ||
delete-branch: true | ||
title: ${{ inputs.title }} | ||
reviewers: "VaishnaviHire,zdtsw" | ||
base: ${{ inputs.base-branch }} | ||
- name: Set pr number in output | ||
shell: bash | ||
run: | | ||
echo "pull-request-number=${{ steps.cpr.outputs.pull-request-number }}" >> "$GITHUB_OUTPUT" |
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,72 @@ | ||
function getModifiedComponentName(name) { | ||
let modifiedWord = name.split("-").join(" ").replace(/[^a-zA-Z ]/g, "").trim() | ||
modifiedWord = modifiedWord[0].toUpperCase() + modifiedWord.slice(1).toLowerCase() | ||
return modifiedWord.replace("Odh", "ODH") | ||
} | ||
module.exports = async ({ github, core, context }) => { | ||
const { TRACKER_URL: trackerUrl, VERSION: currentTag } = process.env | ||
console.log(`The TRACKER_URL is ${trackerUrl}`) | ||
const arr = trackerUrl.split("/") | ||
const owner = arr[3] | ||
const repo = arr[4] | ||
const issue_number = arr[6] | ||
|
||
try { | ||
const latestReleaseResult = await github.rest.repos.getLatestRelease({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
headers: { | ||
'X-GitHub-Api-Version': '2022-11-28', | ||
'Accept': 'application/vnd.github+json', | ||
} | ||
}) | ||
const previousTag = latestReleaseResult.data["tag_name"] | ||
console.log(`The current tag is: ${previousTag}`) | ||
|
||
const releaseNotesResult = await github.rest.repos.generateReleaseNotes({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
tag_name: currentTag, | ||
previous_tag_name: previousTag, | ||
headers: { | ||
'X-GitHub-Api-Version': '2022-11-28', | ||
'Accept': 'application/vnd.github+json' | ||
} | ||
}) | ||
const releaseNotesString = releaseNotesResult.data["body"] | ||
|
||
const commentsResult = await github.rest.issues.listComments({ | ||
owner, | ||
repo, | ||
issue_number, | ||
headers: { | ||
'X-GitHub-Api-Version': '2022-11-28', | ||
'Accept': 'application/vnd.github.text+json' | ||
} | ||
}) | ||
let outputStr = "## Component Release Notes\n" | ||
commentsResult.data.forEach((issue) => { | ||
let issueCommentBody = issue.body_text | ||
if (issueCommentBody.includes("#Release#")) { | ||
let components = issueCommentBody.split("\n") | ||
const releaseIdx = components.indexOf("#Release#") | ||
components = components.splice(releaseIdx + 1, components.length) | ||
const regex = /\s*[A-Za-z-_0-9]+\s*\|\s*(https:\/\/github\.com\/.*(tree|releases).*){1}\s*\|?\s*(https:\/\/github\.com\/.*releases.*)?\s*/; | ||
components.forEach(component => { | ||
if (regex.test(component)) { | ||
let [componentName, branchUrl, tagUrl] = component.split("|") | ||
componentName = getModifiedComponentName(componentName.trim()) | ||
const releaseNotesUrl = (tagUrl || branchUrl).trim(); | ||
if (!outputStr.includes(componentName)) outputStr += `- **${componentName}**: ${releaseNotesUrl}\n` | ||
|
||
} | ||
}) | ||
} | ||
}) | ||
outputStr += "\n" + releaseNotesString | ||
console.log("Created component release notes successfully...") | ||
core.setOutput('release-notes-body', outputStr); | ||
} catch (error) { | ||
core.setFailed(`Action failed with error ${error}`); | ||
} | ||
} |
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,51 @@ | ||
module.exports = ({ github, core }) => { | ||
const { TRACKER_URL } = process.env | ||
console.log(`The tracker url is: ${TRACKER_URL}`) | ||
|
||
const arr = TRACKER_URL.split("/") | ||
const owner = arr[3] | ||
const repo = arr[4] | ||
const issue_number = arr[6] | ||
|
||
github.request('GET /repos/{owner}/{repo}/issues/{issue_number}/comments', { | ||
owner, | ||
repo, | ||
issue_number, | ||
headers: { | ||
'X-GitHub-Api-Version': '2022-11-28', | ||
'Accept': 'application/vnd.github.text+json' | ||
} | ||
}).then((result) => { | ||
result.data.forEach((issue) => { | ||
let issueCommentBody = issue.body_text | ||
if (issueCommentBody.includes("#Release#")) { | ||
let components = issueCommentBody.split("\n") | ||
const releaseIdx = components.indexOf("#Release#") | ||
components = components.splice(releaseIdx + 1, components.length) | ||
const regex = /\s*[A-Za-z-_0-9]+\s*\|\s*(https:\/\/github\.com\/.*(tree|releases).*){1}\s*\|?\s*(https:\/\/github\.com\/.*releases.*)?\s*/; | ||
components.forEach(component => { | ||
if (regex.test(component)) { | ||
const [componentName, branchOrTagUrl] = component.split("|") | ||
const splitArr = branchOrTagUrl.trim().split("/") | ||
let idx = null | ||
if (splitArr.includes("tag")) { | ||
idx = splitArr.indexOf("tag") | ||
} else if (splitArr.includes("tree")) { | ||
idx = splitArr.indexOf("tree") | ||
} | ||
const branchName = splitArr.slice(idx + 1).join("/") | ||
if (componentName.trim() === "notebook-controller") { | ||
core.exportVariable("component_spec_odh-notebook-controller".toLowerCase(), branchName); | ||
core.exportVariable("component_spec_kf-notebook-controller".toLowerCase(), branchName); | ||
} else { | ||
core.exportVariable("component_spec_" + componentName.trim().toLowerCase(), branchName); | ||
} | ||
} | ||
}) | ||
} | ||
}) | ||
console.log("Read release/tag from tracker issue successfully...") | ||
}).catch(e => { | ||
core.setFailed(`Action failed with error ${e}`); | ||
}) | ||
} |
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,17 @@ | ||
#!/bin/bash | ||
|
||
set -euo pipefail | ||
|
||
update_tags(){ | ||
sed -i -r "/\"$1\"/s|([^:]*):([^:]*):[^:]*:(.*)|\1:\2:$2:\3|" get_all_manifests.sh | ||
} | ||
|
||
prefix=component_spec_ | ||
|
||
echo | ||
env | while IFS="=" read varname value; do | ||
[[ $varname =~ "${prefix}" ]] || continue | ||
component=${varname#${prefix}} | ||
component=${component/_/-} | ||
update_tags $component $value | ||
done |
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,12 @@ | ||
#!/bin/bash | ||
|
||
set -euo | ||
|
||
NEW_VERSION=$1 | ||
CURRENT_VERSION=$(cat Makefile | grep -w "VERSION ?=" | cut -d ' ' -f 3) | ||
sed -i -e "s/^VERSION ?=.*/VERSION ?= $NEW_VERSION/g" Makefile | ||
sed -i -e "s|containerImage.*|containerImage: quay.io/opendatahub/opendatahub-operator:v$NEW_VERSION|g" config/manifests/bases/opendatahub-operator.clusterserviceversion.yaml | ||
sed -i -e "s|createdAt.*|createdAt: \"$(date +"%Y-%-m-%dT00:00:00Z")\"|g" config/manifests/bases/opendatahub-operator.clusterserviceversion.yaml | ||
sed -i -e "s|name: opendatahub-operator.v.*|name: opendatahub-operator.v$NEW_VERSION|g" config/manifests/bases/opendatahub-operator.clusterserviceversion.yaml | ||
sed -i -e "s|version: $CURRENT_VERSION.*|version: $NEW_VERSION|g" config/manifests/bases/opendatahub-operator.clusterserviceversion.yaml | ||
sed -i -e "s|olm.skipRange:.*|olm.skipRange: \'>=1.0.0 <$NEW_VERSION\'|g" config/manifests/bases/opendatahub-operator.clusterserviceversion.yaml |
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,23 @@ | ||
#!/bin/bash | ||
|
||
set -euo pipefail | ||
|
||
sem_ver_pattern="^[vV](0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)(\\-[0-9A-Za-z-]+(\\.[0-9A-Za-z-]+)*)?(\\+[0-9A-Za-z-]+(\\.[0-9A-Za-z-]+)*)?$" | ||
|
||
die () { | ||
echo >&2 "$@" | ||
exit 1 | ||
} | ||
|
||
validate_semantic_versioning() { | ||
version=$1 | ||
|
||
if [[ ${version} == "" ]]; then | ||
die "Undefined version. Please use semantic versioning https://semver.org/." | ||
fi | ||
|
||
# Ensure defined version matches semver rules | ||
if [[ ! "${version}" =~ $sem_ver_pattern ]]; then | ||
die "\`${version}\` you defined as a version does not match semantic versioning. Please make sure it conforms with https://semver.org/ and make sure it starts with v prefix." | ||
fi | ||
} |
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
Oops, something went wrong.