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

feat(generate): support k8s manifest overriding #88

Merged
merged 2 commits into from
Nov 21, 2024

Conversation

astromechza
Copy link
Member

In the current implementation of score-k8s, duplicate k8s manifests produced by resources or workloads are just accepted with errors thrown at runtime due to the name already existing in the target apiVersion/kind/namespace. This doesn't happen often, since the built in provisioners produce unique k8s objects per resource with no overlap. HOWEVER, moving forwards we want to encourage the use of central in-cluster resources, for example #65 we need a single minio instance with multiple buckets created on it. This means we need to allow overrides to the manifests so that both S3 buckets A, and B can produce a minio service, but only the last one is actually used.

This technique can also be used for other heavyweight stateful applications like databases and queue providers.

This wasn't a problem in score-compose, because score-compose keys all services by a name, and silently merges duplicate named services together.

With this done, I can continue with #65 and produce a single in-cluster minio service.

@astromechza astromechza merged commit 641d0df into main Nov 21, 2024
4 checks passed
@astromechza astromechza deleted the deduplicate-resource-manifests branch November 21, 2024 16:09
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.

1 participant