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

Add defaults for deployment manager backend URL and token #79

Conversation

jhernand
Copy link
Collaborator

@jhernand jhernand commented Apr 2, 2024

Currently the backend URL and token don't have defaults. That means that the user has to explicitly set them in the custom resource that represents the O2 IMS deployment. That is reasonable for the URL, but not for the token, because it is the token of a service account that is created by the operator. That means that the user would have to create the service account in advance, wait for the token to be created and then read it and update the custom resource. That isn't practical. To avoid that this patch changes the operator so that the token is the default URL of the Kubernetes API server and the token is taken from the /run/secrets/kubernetes.io/serviceaccount/token file.

@openshift-ci openshift-ci bot requested review from danielerez and irinamihai April 2, 2024 19:07
Currently the backend URL and token don't have defaults. That means that
the user has to explicitly set them in the custom resource that
represents the O2 IMS deployment. That is reasonable for the URL, but
not for the token, because it is the token of a service account that is
created by the operator. That means that the user would have to create
the service account in advance, wait for the token to be created and
then read it and update the custom resource. That isn't practical. To
avoid that this patch changes the operator so that the token is the
default URL of the Kubernetes API server and the token is taken from the
`/run/secrets/kubernetes.io/serviceaccount/token` file.

Signed-off-by: Juan Hernandez <[email protected]>
Co-authored-by: Irina Mihai <[email protected]>
@jhernand jhernand force-pushed the add_defaults_for_backend_url_and_token branch from 5749dbe to 43df8a4 Compare April 3, 2024 07:21
@@ -9,5 +9,5 @@ generatorOptions:

images:
- name: controller
newName: quay.io/imihai/oran-o2ims-operator
newTag: 4.16.0
newName: quay.io/jhernand/o2ims-operator
Copy link
Collaborator

Choose a reason for hiding this comment

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

Just a note that we will have to update these to the o2ims quay repo.

@irinamihai
Copy link
Collaborator

/lgtm

@irinamihai
Copy link
Collaborator

/approve

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Apr 3, 2024
Copy link

openshift-ci bot commented Apr 3, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: irinamihai

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

The pull request process is described 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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 3, 2024
@openshift-merge-bot openshift-merge-bot bot merged commit feb5ab7 into openshift-kni:main Apr 3, 2024
8 checks passed
@jhernand jhernand deleted the add_defaults_for_backend_url_and_token branch April 3, 2024 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants