-
Notifications
You must be signed in to change notification settings - Fork 165
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2792 from Gkrumbach07/task/RHOAIENG-5443-switch-t…
…o-targeting-mlmd-oauth-port-and-remove-dev Fix DEV_MODE import in mlmd service
- Loading branch information
Showing
3 changed files
with
24 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,24 @@ | ||
import { DEV_MODE } from '../../../../utils/constants'; | ||
import { DSPipelineKind } from '../../../../types'; | ||
import { proxyService } from '../../../../utils/proxy'; | ||
|
||
export default DEV_MODE | ||
? proxyService<DSPipelineKind>( | ||
{ | ||
apiGroup: 'datasciencepipelinesapplications.opendatahub.io', | ||
apiVersion: 'v1alpha1', | ||
kind: 'DataSciencepipelinesApplication', | ||
plural: 'datasciencepipelinesapplications', | ||
}, | ||
{ | ||
port: 9090, | ||
prefix: 'ds-pipeline-metadata-envoy-', | ||
}, | ||
{ | ||
// Use port forwarding for local development: | ||
// kubectl port-forward -n <namespace> svc/ds-pipeline-metadata-envoy-dspa 9090:9090 | ||
host: process.env.METADATA_ENVOY_SERVICE_HOST, | ||
port: process.env.METADATA_ENVOY_SERVICE_PORT, | ||
}, | ||
(resource) => | ||
resource.spec.dspVersion === 'v2' && | ||
!!resource.status?.conditions?.find( | ||
(c) => c.type === 'APIServerReady' && c.status === 'True', | ||
), | ||
false, | ||
) | ||
: async () => { | ||
// do nothing | ||
// service is only registered in DEV_MODE | ||
}; | ||
export default proxyService<DSPipelineKind>( | ||
{ | ||
apiGroup: 'datasciencepipelinesapplications.opendatahub.io', | ||
apiVersion: 'v1alpha1', | ||
kind: 'DataSciencepipelinesApplication', | ||
plural: 'datasciencepipelinesapplications', | ||
}, | ||
{ | ||
port: 8443, | ||
prefix: 'ds-pipeline-metadata-envoy-', | ||
}, | ||
{ | ||
// Use port forwarding for local development: | ||
// kubectl port-forward -n <namespace> svc/ds-pipeline-metadata-envoy-dspa 10001:8443 | ||
host: process.env.METADATA_ENVOY_SERVICE_HOST, | ||
port: process.env.METADATA_ENVOY_SERVICE_PORT, | ||
}, | ||
(resource) => | ||
resource.spec.dspVersion === 'v2' && | ||
!!resource.status?.conditions?.find((c) => c.type === 'APIServerReady' && c.status === 'True'), | ||
); |