Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

O2-IMS Operator #844

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft

Conversation

dkosteck
Copy link
Contributor

@dkosteck dkosteck commented Jan 31, 2025

A PR creating a O2-IMS Operator, including related management code, controllers, utilities, testing code, and documentation.

closes: #759
closes: #757

Update 02-03-2025: Now relies on nephio-project/api#66
This API update is because of a previous outdated field in the CRD, to test this before it is merged one must use the link to the CRD from that commit in the curl step of the README.

Copy link
Contributor

nephio-prow bot commented Jan 31, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign liamfallon for approval by writing /assign @liamfallon in a comment. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@nephio-prow nephio-prow bot requested review from henderiw and liamfallon January 31, 2025 20:31
Copy link
Contributor

nephio-prow bot commented Jan 31, 2025

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@dkosteck dkosteck force-pushed the o2ims-operator branch 2 times, most recently from a81c6f0 to 9174461 Compare January 31, 2025 21:09
dkosteck and others added 2 commits January 31, 2025 23:48
Co-authored-by: Sagar Arora <[email protected]>
Co-authored-by: Vishwanath Jayaraman <[email protected]>
Signed-off-by: Daniel Kostecki <[email protected]>
Signed-off-by: Sagar Arora <[email protected]>
Signed-off-by: Vishwanath Jayaraman <[email protected]>
Co-authored-by: Sagar Arora <[email protected]>
Co-authored-by: Vishwanath Jayaraman <[email protected]>
Signed-off-by: Daniel Kostecki <[email protected]>
Signed-off-by: Vishwanath Jayaraman <[email protected]>
Signed-off-by: Sagar Arora <[email protected]>
Changed provisionedResources to provisionedResourceSet (NOTE: This requires the updated CRD in the api repo)
Removed cluster constants from templateParameters, moved to constants in manager.py using kopf.Memo

Co-authored-by: Sagar Arora <[email protected]>
Co-authored-by: Vishwanath Jayaraman <[email protected]>
Signed-off-by: Daniel Kostecki <[email protected]>
Signed-off-by: Vishwanath Jayaraman <[email protected]>
Signed-off-by: Sagar Arora <[email protected]>
operators/o2ims-operator/tests/create-cluster.sh Outdated Show resolved Hide resolved
operators/o2ims-operator/tests/mgmt-cluster.yaml Outdated Show resolved Hide resolved
operators/o2ims-operator/controllers/manager.py Outdated Show resolved Hide resolved
# limitations under the License.
##########################################################################

from utils import LOG_LEVEL
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unused import

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is used below the LOG_LEVEL. In line 32 for example

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems to be coming from the utils module

#### Non-containerized Development Environment

```bash
kubectl exec -it -n porch-system porch-sa-test -- cat /var/run/secrets/kubernetes.io/serviceaccount/token &> /tmp/porch-token
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pretty sure this doesn't exist. Only if we use the script

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry true! There is one step less we have to create

kubectl -f tests/deployment/sa-test-pod.yaml then porch-sa-test will exist.

Push this image in your cluster, here we are using a `kind` cluster so we will push using the below command:

```bash
kind load docker-image o2ims:latest -n mgmt
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Had to drop the "-n mgmt" on sandbox env.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay good to know this is helpful when we have multiple clusters.

We can mention this separately.

operators/o2ims-operator/README.md Outdated Show resolved Hide resolved
operators/o2ims-operator/README.md Show resolved Hide resolved
Updates to README for unit tests
init to make controllers and tests modules
Updates to utils as a result of testing
test_utils PyTest unit tests, as well as accompanying requirements

Co-authored-by: Sagar Arora <[email protected]>
Co-authored-by: Vishwanath Jayaraman <[email protected]>
kubectl exec -it -n porch-system porch-sa-test -- cat /var/run/secrets/kubernetes.io/serviceaccount/token &> /tmp/porch-token

# Create CRD
kubectl create -f "$(dirname "$0")"/../config/crd/bases
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would need to change to maybe
kubectl create -f https://raw.githubusercontent.com/nephio-project/api/refs/heads/main/config/crd/bases/o2ims.provisioning.oran.org_provisioningrequests.yaml as the ../config/crd/bases is not present

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes that is true

@vjayaramrh vjayaramrh force-pushed the o2ims-operator branch 3 times, most recently from 7c253aa to e7351b8 Compare February 9, 2025 16:04
Co-authored-by: Daniel Kostecki <[email protected]>
Co-authored-by: Sagar Arora <[email protected]>
Co-authored-by: Vishwanath Jayaraman <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
5 participants