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

Add data source info manifest #906

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

keshav-725
Copy link

No description provided.

chandrams and others added 3 commits July 4, 2023 12:18
…orkflow is detected in Actions tab

Signed-off-by: Chandrakala Subramanyam <csubrama@redhat.com>
Renamed the workflow file to keep it consistent
@@ -98,7 +98,28 @@ data:
"port": 5432,
"sslMode": "require",
"username": "admin"
}
},
"datasource": [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Recognize various methods of establishing a connection to a data source while implementing authentication. Furnish a list of at least three distinct approaches for connecting to a data source, detailing the necessary parameters. It's essential to adhere to compliance standards, which involve practices such as generating secure credentials to access confidential data. All these functionalities should be seamlessly supported using this JSON.

private final String provider;
private final URL url;

public DataSourceInfo(String provider, URL url) {
public DataSourceInfo(String name, String serviceName, String provider, URL url) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add more parametes like
HTTP Method:
Headers
Authentication Parameters:
Query Parameters:
based o AUth type you may have to consider some more parameters or class

@@ -157,5 +170,60 @@ private static String getKruizeConfigValue(String envName, JSONObject kruizeConf
return envValue.toString();
}

public static void populateDatasourceMapWithCongfig (HashMap<String, DataSourceInfo> datasourceMap) throws Exception {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generate an independent class for accessing data source information.

The provided code contains errors.

By executing kubectl apply -f above_crc.yaml, you will generate a configuration object or mount a configuration file. Subsequently, within your code, use either kubectl get config or read JSON data from the mounted file.

Develop a distinct class named "DataSource" within a separate package.

It's recommended to draft a design document prior to writing the code. Present and discuss this design document with team. Following this, you can commence the coding process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants