Skip to content

Commit

Permalink
Merge pull request #13725 from lokanandaprabhu/feature/OCPBUGS-29377
Browse files Browse the repository at this point in the history
OCPBUGS-29377: Routes created by devfiles do not always use HTTPS
  • Loading branch information
openshift-merge-bot[bot] committed Apr 17, 2024
2 parents f666ce3 + 9cb2678 commit 4550baa
Showing 1 changed file with 10 additions and 0 deletions.
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

0 comments on commit 4550baa

Please sign in to comment.