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
Console 2271: allow for configuring upstream server for air gapped envs #9957
Console 2271: allow for configuring upstream server for air gapped envs #9957
Conversation
@@ -99,3 +99,7 @@ export enum REQUESTER_FILTER { | |||
USER = 'user', | |||
SYSTEM = 'system', | |||
} | |||
|
|||
export const CLUSTER_VERSION_DEFAULT_UPSTREAM_SERVER_URL = | |||
'https://api.openshift.com/api/upgrades_info/v1/graph'; |
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.
@spadgett for clarification, there are three scenarios (kudos to @wking):
- spec.upstream is unset/empty (see data/manifests/bootkube/cvo-overrides: Drop the explicit upstream installer#4112)
- spec.upstream is
https://example.com/some/custom/thing
- spec.upstream is explicitly set, but happens to match the CVO's internal default
This PR will treat 1 as the default case and 2/3 as custom case. The value in this constant is used for display purposes only and will never be sent to the backend.
/retest |
1 similar comment
/retest |
<ModalSubmitFooter | ||
errorMessage={props.errorMessage} | ||
inProgress={props.inProgress} | ||
submitText={t('public~Save')} | ||
cancel={props.cancel} | ||
/> |
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.
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.
@yapei done! Can you have another look and confirm you see it:
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.
Nice work 👍 Thank you for turning this around so quickly. Looks good overall, just a few comments.
frontend/public/components/cluster-settings/cluster-settings.tsx
Outdated
Show resolved
Hide resolved
@@ -1001,6 +1002,26 @@ export const ClusterVersionDetailsTable: React.FC<ClusterVersionDetailsTableProp | |||
<dd> | |||
<ResourceLink kind={referenceForModel(ClusterVersionModel)} name={cv.metadata.name} /> | |||
</dd> | |||
<dt>{t('public~Upstream configuration')}</dt> |
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.
"Upstream configuration" sounds odd to me. Maybe "Update server" or "Upstream update server"? @wking @megan-hall opinion?
I would use DetailsItem
so that you get the API doc when you click on the label. Here's an example:
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.
I have switched to using a shared component that utilizes DetailsItem
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.
@florkbr Shall we update Upstream configuration
to something else or keep as it is?
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.
Sorry @spadgett just seeing your comment now - honestly, I will default to you or Trevor here in terms of wording recommendation.
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.
@yapei We can leave it as "Upstream configuration" for now and always revisit later. Thanks!
frontend/public/components/cluster-settings/cluster-settings.tsx
Outdated
Show resolved
Hide resolved
frontend/public/components/modals/configure-cluster-upstream-modal.tsx
Outdated
Show resolved
Hide resolved
frontend/public/components/modals/configure-cluster-upstream-modal.tsx
Outdated
Show resolved
Hide resolved
{!cv.spec.upstream ? ( | ||
<span className="text-muted">{t('public~Default configuration: ')}</span> | ||
) : null} | ||
<Button |
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.
@wking @alimobrem Do you know if we need to disable this for OpenShift Dedicated? I don't know if Dedicated admins can edit the ClusterVersion.
@florkbr We need to add an access review here and only show the button if the user can patch the ClusterVersion resource. Here's an example:
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.
frontend/public/components/modals/configure-cluster-upstream-modal.tsx
Outdated
Show resolved
Hide resolved
frontend/public/components/modals/configure-cluster-upstream-modal.tsx
Outdated
Show resolved
Hide resolved
21e2bc4
to
583be53
Compare
Adds the ability to configure the upstream server for the cluster version resource from the UI via a new modal. See screenshots. I have a few open design/behavioral questions. Will work with @megan-hall. See https://issues.redhat.com/browse/CONSOLE-2271
583be53
to
76ed2f2
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
Just one minor comment, but not worth holding the PR over. Thanks @florkbr !
/assign @opayne1 @RickJWagner @yapei |
/label px-approved |
/label docs-approved |
/retest |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
11 similar comments
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest |
frontend/public/components/cluster-settings/cluster-version.tsx
Outdated
Show resolved
Hide resolved
frontend/public/components/modals/configure-cluster-upstream-modal.tsx
Outdated
Show resolved
Hide resolved
55bad8f
to
f528675
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
clusterVersionIsEditable && configureClusterUpstreamModal({ cv: resource }); | ||
}} | ||
variant="link" | ||
isDisabled={!clusterVersionIsEditable} |
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.
Does this still render as a link or does PF render a disabled button with variant="link" as normal text?
If not, I think this is OK for now, but something we probably want to change in a follow up.
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.
@spadgett it renders a disabled button with variant="link". The text is grey versus blue:
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.
tested the PR on a cluster-bot cluster, updating Upstream configuration
can take effect and CV's spec.upstream will be updated accordingly. We also added validation checks for null and invalid URL values. Everything seems working
/label qe-approved
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: florkbr, spadgett, yapei 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 |
Adds the ability to configure the upstream server for the cluster
version resource from the UI via a new modal. See screenshots.
I have a few open design/behavioral questions. Will work with @megan-hall. Would also like some test coverage.
See https://issues.redhat.com/browse/CONSOLE-2271
Screenshots