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

OCPBUGS-29377: Routes created by devfiles do not always use HTTPS #13725

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -14,6 +14,7 @@ import DevfileStrategySection from './devfile/DevfileStrategySection';
import GitSection from './git/GitSection';
import { BuildOptions, GitImportFormProps, ImportTypes } from './import-types';
import ImportStrategySection from './ImportStrategySection';
import SecureRoute from './route/SecureRoute';
import { BuildSection } from './section/BuildSection';

const GitImportForm: React.FC<FormikProps<FormikValues> & GitImportFormProps> = ({
Expand Down Expand Up @@ -48,6 +49,10 @@ const GitImportForm: React.FC<FormikProps<FormikValues> & GitImportFormProps> =
importType !== ImportTypes.devfile &&
values.import.selectedStrategy.type !== ImportStrategy.DEVFILE &&
!isSample;
const showSecureRouteSectionForDevfile =
(importType === ImportTypes.devfile ||
values.import.selectedStrategy.type === ImportStrategy.DEVFILE) &&
values?.devfile?.devfileSuggestedResources?.route?.spec?.tls;

return (
<form onSubmit={handleSubmit} data-test-id="import-git-form">
Expand Down Expand Up @@ -90,6 +95,11 @@ const GitImportForm: React.FC<FormikProps<FormikValues> & GitImportFormProps> =
<AdvancedSection values={values} />
</>
)}
{showSecureRouteSectionForDevfile && (
<div className="pf-v5-c-form co-m-pane__form">
<SecureRoute />
</div>
)}
</>
)}
</FormBody>
Expand Down