score-spec / score-go

Reference library for parsing and loading Score files
Apache License 2.0
26 stars 6 forks source link

Container file source and contents properties revised #16

Closed ghen closed 1 year ago

ghen commented 1 year ago

Revised support for container files contents definitions:

Score file example with the source file reference:

apiVersion: score.dev/v1b1
metadata:
  name: example
service:
  containers:
    my-container:
      image: busybox:latest
      files:
      - target: /my-dir/my-file
        mode: "0664"
        source: ./files/my-file
resources:
  env:
    type: environment

Score file example with inline string content and noExpand:

apiVersion: score.dev/v1b1
metadata:
  name: example
service:
  containers:
    my-container:
      image: busybox:latest
      files:
      - target: /my-dir/my-file
        mode: "0664"
        content: |
          line one VALUE_OF_MY_VAR
          line two  ${do.not.expand}
        noExpand: true
resources:
  env:
    type: environment

Types of changes

Checklist: