Skip to content
This repository has been archived by the owner on Jul 4, 2024. It is now read-only.

feat: upgraded score-go to 1.1.0 and supressed double error printing #30

Merged
merged 1 commit into from
Feb 27, 2024

Conversation

astromechza
Copy link
Member

Like the similar PR's submitted to score-compose and others, this PR updates the version of score-go (and thus the embedded score spec). This adds tighter and more useful validation and error messages and ensures that score-helm meets the score spec and expected behavior.

(We also update the version of Go being used).

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • New chore (expected functionality to be implemented)

Checklist:

  • My change requires a change to the documentation.
    • I have updated the documentation accordingly.
  • I've signed off with an email address that matches the commit author.

Demo

When run against the score-full.yaml file from the score schemas repo, we get:

$ go run cmd/score-helm/main.go run -f ../schema/samples/score-full.yaml
containers:
  container-one1:
    args:
      - hello
      - world
    command:
      - /bin/sh
      - -c
    env:
      - name: SOME_VAR
        value: some content here
    image:
      name: localhost:4000/repo/my-image:tag
    livenessProbe:
      path: /livez
      port: 8080
      type: http
    readinessProbe:
      httpHeaders:
        SOME_HEADER: some-value-here
      path: /readyz
      port: 80
      type: http
    resources:
      limits:
        cpu: "0.24"
        memory: 128M
      requests:
        cpu: 1000m
        memory: 10Gi
    volumeMounts:
      - mountPath: /mnt/something
        name: volume-name
        readOnly: false
        subPath: /sub/path
      - mountPath: /mnt/something-else
        name: volume-two
  container-two2:
    image:
      name: .
service:
  ports:
    - name: port-one
      port: 1000
      protocol: TCP
      targetPort: 10000
    - name: port-two2
      port: 8000
  type: ClusterIP

Which is what is expected.

@astromechza astromechza merged commit 6f03e1a into main Feb 27, 2024
3 checks passed
@astromechza astromechza deleted the upgrade-spec branch February 27, 2024 12:40
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants