-
Notifications
You must be signed in to change notification settings - Fork 6
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
Allow RSCT image to configure runtime via the RSCT spec #23
Allow RSCT image to configure runtime via the RSCT spec #23
Conversation
1fd9f8b
to
5def1be
Compare
r.Config.Image = "quay.io/powercloud/rsct-ppc64le:latest" | ||
|
||
// Using the default RSCT image if not specified in RSCTSpec | ||
if *rsct.Spec.Image == "" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check for nil check before checking for empty string
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added check for nil instead of empty string
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now, it is fetching default value. If the spec is empty, the default value will be used.
apiVersion: rsct.ibm.com/v1alpha1
kind: RSCT
metadata:
name: rsct
namespace: rsct-operator-system
spec: {}
a58a977
to
2645516
Compare
2645516
to
5fc73f9
Compare
r.Config.Namespace = rsct.Namespace | ||
r.Config.Name = rsct.Name | ||
r.Config.Image = "quay.io/powercloud/rsct-ppc64le:latest" | ||
r.Config.Image = *rsct.Spec.Image |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
better have a nil check here for safer side, don't want to hit with NPE
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, added nil check
202f22c
to
0b966e4
Compare
Signed-off-by: Varad Ahirwadkar <[email protected]>
0b966e4
to
ab32ea3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mkumatag, varad-ahirwadkar 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 |
1b3e7af
into
ocp-power-automation:main
This PR fixes #13 and #12.
This PR allows the RSCT image runtime to be configured via the RSCT spec.