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

Allow concourse_client.yaml to support connection details for multiple instances at the same time #507

Open
jtnelson opened this issue Apr 19, 2024 · 1 comment

Comments

@jtnelson
Copy link
Member

When connecting to multiple hosts it would be nice to have username/password, etc stored in a single prefs file.

Something like

connections: [
{
host: a,
username: blah,
password: blah,
environment: blah
},
{
host: b,
username: blah
},
]

There could be a connections key that takes a value that is an array of connection objects.
Other options for key names to consider:

  • servers
  • deployments
  • instances
  • credentials
@jtnelson
Copy link
Member Author

Allow each connection object to also have a "name". If the name is provided it can be used for lookups. Otherwise, the host is assumed to be the name,

In ConcourseClientConfiguration

  • create a list of connections
  • add any config defined at the root (e.g., host, port, username, password, environment) to the list of connections at the front
  • for methods like getHost(), getPort() etc return the relevant pieces of the first connection object
  • add method getConfiguration(String name) -> that returns anonymous ConcouseClientConfiguration that pulls from the list of connections with that name or host if it exists otherwise null

In Concourse (driver handler)

  • add method connect(String name, ConcourseClientConfiguration config) that will pull the relevant configuration using getConfiguration() and use that to establish the connection

Be sure to test instances where some of the configuration does not have a host. Maybe internally need to store this as a mapping from name/host to the configuration object for fast look up?

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

No branches or pull requests

1 participant