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

Adds support for external PG for Noobaa #1098

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion locales/en/plugin__odf-console.json
Original file line number Diff line number Diff line change
Expand Up @@ -628,10 +628,23 @@
"Data Foundation will use a StorageClass provided by the Local Storage Operator (LSO) on top of your attached drives. This option is available on any platform with devices attached to nodes.": "Data Foundation will use a StorageClass provided by the Local Storage Operator (LSO) on top of your attached drives. This option is available on any platform with devices attached to nodes.",
"Connect an external storage platform": "Connect an external storage platform",
"Data Foundation will create a dedicated StorageClass.": "Data Foundation will create a dedicated StorageClass.",
"Use external PostgreSQL": "Use external PostgreSQL",
"Allow Noobaa to connect to an external postgres server": "Allow Noobaa to connect to an external postgres server",
"NFS is currently not supported for external storage type. To proceed with an external storage type, disable this option.": "NFS is currently not supported for external storage type. To proceed with an external storage type, disable this option.",
"NFS is currently not supported for external storage type.": "NFS is currently not supported for external storage type.",
"Enable network file system (NFS)": "Enable network file system (NFS)",
"Allow NFS to use low resources by default.": "Allow NFS to use low resources by default.",
"Server name": "Server name",
"Port": "Port",
"Database name": "Database name",
"Enable TLS/SSL": "Enable TLS/SSL",
"Enable this for encrytion on flight with the Postgres server": "Enable this for encrytion on flight with the Postgres server",
"Allow self-signed certificates": "Allow self-signed certificates",
"Adding this option will allow the postgres server to use a self-signed certificates.": "Adding this option will allow the postgres server to use a self-signed certificates.",
"Enable client-side certificates": "Enable client-side certificates",
"Select this option to upload and use your client side certificates": "Select this option to upload and use your client side certificates",
"Accepted file types: .pem, .crt, .key": "Accepted file types: .pem, .crt, .key",
"Files should be named private and public followed by compatible extensions": "Files should be named private and public followed by compatible extensions",
"Deploys MultiCloud Object Gateway without block and file services.": "Deploys MultiCloud Object Gateway without block and file services.",
"Deploys Data Foundation with block, shared fileSystem and object services.": "Deploys Data Foundation with block, shared fileSystem and object services.",
"Deployment type": "Deployment type",
Expand Down Expand Up @@ -795,7 +808,6 @@
"Please enter a URL": "Please enter a URL",
"Please enter a valid port": "Please enter a valid port",
"Address": "Address",
"Port": "Port",
"Client certificate": "Client certificate",
"CA certificate": "CA certificate",
"Client private key": "Client private key",
Expand Down Expand Up @@ -1115,6 +1127,7 @@
"Subscription": "Subscription",
"Subscriptions": "Subscriptions",
"Project": "Project",
"Show password": "Show password",
"Deployment details": "Deployment details",
"Metrics": "Metrics",
"CPU usage": "CPU usage",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,15 @@
.odf-backing-store__dropdown--margin-top {
margin-top: var(--pf-global--spacer--sm);
}

.odf-backing-store__ssl {
padding-left: var(--pf-global--spacer--xl);
padding-bottom: var(--pf-global--spacer--xl); ;
}

.odf-backing-store__tls--margin-top {
margin-top: var(--pf-global--spacer--md);
}



Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,12 @@ import {
Radio,
Alert,
AlertVariant,
Checkbox,
} from '@patternfly/react-core';
import { ErrorHandler } from '../../error-handler';
import { WizardState, WizardDispatch } from '../../reducer';
import { EnableNFS } from './enable-nfs';
import { PostgresConnectionDetails } from './noobaa-external-postgres/postgres-connection-details';
import { SelectDeployment } from './select-deployment';
import { SetCephRBDStorageClassDefault } from './set-rbd-sc-default';
import './backing-storage-step.scss';
Expand Down Expand Up @@ -189,6 +191,8 @@ export const BackingStorage: React.FC<BackingStorageProps> = ({
isRBDStorageClassDefault,
externalStorage,
deployment,
externalPostgres,
useExternalPostgres,
} = state;

const { t } = useCustomTranslation();
Expand Down Expand Up @@ -364,6 +368,38 @@ export const BackingStorage: React.FC<BackingStorageProps> = ({
/>
</>
)}
<Checkbox
id="use-external-postgress"
label={t('Use external PostgreSQL')}
description={t(
'Allow Noobaa to connect to an external postgres server'
)}
isChecked={useExternalPostgres}
onChange={() =>
dispatch({
type: 'backingStorage/useExternalPostgres',
payload: !useExternalPostgres,
})
}
className="odf-backing-store__radio--margin-bottom"
/>
{useExternalPostgres && (
<PostgresConnectionDetails
dispatch={dispatch}
tlsFiles={[
externalPostgres.tls.keys.private,
externalPostgres.tls.keys.public,
]}
tlsEnabled={externalPostgres.tls.enabled}
allowSelfSignedCerts={externalPostgres.tls.allowSelfSignedCerts}
username={externalPostgres.username}
password={externalPostgres.password}
serverName={externalPostgres.serverName}
databaseName={externalPostgres.databaseName}
port={externalPostgres.port}
enableClientSideCerts={externalPostgres.tls.enableClientSideCerts}
/>
)}
</Form>
</ErrorHandler>
);
Expand Down
Loading