Closed cdupuis closed 5 years ago
It seems the context provided to a StartupListener does not have a graphClient. Is there some other place in the startup sequence that does have access to a graphClient?
Yes, the context provided to a StartupListener
is not scoped to a workspace. But you can always create a GraphClient
by using the GraphClientFactory
. See https://github.com/atomist/sdm-pack-rcca-github/blob/master/lib/converge/converge.ts#L55-L56 for an example.
Do we typically create the graph client using the first element of the configuration.workspaceIds array?
If you have more than one workspace in config, you should converge the KubernetesClusterProvider for each workspace.
Do you have any thoughts on the lifecycle of these providers? It seems we should not register them when running in local mode. What about when ephemeral registrations? Should there be some reaper of providers similar to how durable registrations are eventually removed?
The core graphql model contains a generic
KubernetesClusterProvider
that we should make sure exists for each clusterk8s-sdm
or a k8s pack runs in.The name of the
KubernetesClusterProvider
should be the fulfilment name of a goal gets deployed into that cluster.On start of the pack, we should query if such a provider exists in the model and if not, create it for the workspace.