Skip to content

Support new files|volumes spec with score-go v1.10.0#302

Merged
mathieu-benoit merged 13 commits into
mainfrom
score-go-1-10-0
Apr 29, 2025
Merged

Support new files|volumes spec with score-go v1.10.0#302
mathieu-benoit merged 13 commits into
mainfrom
score-go-1-10-0

Conversation

@mathieu-benoit

@mathieu-benoit mathieu-benoit commented Apr 24, 2025

Copy link
Copy Markdown
Contributor

github.com/score-spec/score-go v1.10.0

score-spec/score-go#103 based on score-spec/spec#123 (comment)

This PR also makes sure that previous/old files|volumes spec is still working while we support the new spec.

Both examples working with this new version (and are not generating any diff with their compose.yaml files):

Old files|volumes spec:

apiVersion: score.dev/v1b1
metadata:
  name: hello-world
containers:
  hello:
    image: .
    files:
      - target: /fileB.txt
        content: |
          I am ${metadata.name}
    volumes:
      - target: /data
        source: ${resources.data}
resources:
  data:
    type: volume

New files|volumes spec:

apiVersion: score.dev/v1b1
metadata:
  name: hello-world
containers:
  hello:
    image: .
    files:
      "/fileB.txt":
        content: |
          I am ${metadata.name}
    volumes:
      "/data":
        source: ${resources.data}
resources:
  data:
    type: volume

Signed-off-by: Mathieu Benoit <mathieu-benoit@hotmail.fr>
@mathieu-benoit mathieu-benoit marked this pull request as draft April 24, 2025 01:27
@mathieu-benoit mathieu-benoit self-assigned this Apr 24, 2025
Comment thread internal/compose/convert.go Outdated
Comment thread internal/compose/convert.go Outdated
Comment thread internal/compose/convert.go Outdated
Comment thread internal/compose/convert.go Outdated
mathieu-benoit and others added 10 commits April 25, 2025 11:08
Co-authored-by: Ben Meier <1651305+astromechza@users.noreply.github.com>
Signed-off-by: Mathieu Benoit <mathieu-benoit@hotmail.fr>
Co-authored-by: Ben Meier <1651305+astromechza@users.noreply.github.com>
Signed-off-by: Mathieu Benoit <mathieu-benoit@hotmail.fr>
Co-authored-by: Ben Meier <1651305+astromechza@users.noreply.github.com>
Signed-off-by: Mathieu Benoit <mathieu-benoit@hotmail.fr>
Co-authored-by: Ben Meier <1651305+astromechza@users.noreply.github.com>
Signed-off-by: Mathieu Benoit <mathieu-benoit@hotmail.fr>
Signed-off-by: Mathieu Benoit <mathieu-benoit@hotmail.fr>
Signed-off-by: Mathieu Benoit <mathieu-benoit@hotmail.fr>
Signed-off-by: Mathieu Benoit <mathieu-benoit@hotmail.fr>
Signed-off-by: Mathieu Benoit <mathieu-benoit@hotmail.fr>
Signed-off-by: Mathieu Benoit <mathieu-benoit@hotmail.fr>
@mathieu-benoit mathieu-benoit marked this pull request as ready for review April 25, 2025 16:33
@mathieu-benoit

Copy link
Copy Markdown
Contributor Author

I think that's it, ready for your review @astromechza please, thanks!

Comment thread go.sum
astromechza
astromechza previously approved these changes Apr 29, 2025

@astromechza astromechza left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM just needs a mod tidy

Signed-off-by: Mathieu Benoit <mathieu-benoit@hotmail.fr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants