buildkite / agent-stack-k8s

Spin up an autoscaling stack of Buildkite Agents on Kubernetes
MIT License
77 stars 30 forks source link

Default resources on pod-spec-patch throws validation error #293

Closed bnovick closed 4 months ago

bnovick commented 5 months ago

I tried to implement the exact yaml example supplied in: https://github.com/buildkite/agent-stack-k8s?tab=readme-ov-file#default-resources

The helm install operation works, but all of the containers fail with:

- config.pod-spec-patch.containers.0.resources.limits.memory: Invalid type. Expected: map, given: string
- config.pod-spec-patch.containers.0.resources.requests.cpu: Invalid type. Expected: map, given: string
- config.pod-spec-patch.containers.0.resources.requests.memory: Invalid type. Expected: map, given: string

Here is the exact values.yaml file I'm supplying

config:
    org: ...
    debug: true
    cluster-uuid: ...
    config:
      pod-spec-patch:
        containers:
          - name: agent          # this container acquires the job
            resources:
              requests:
                cpu: 100m
                memory: 50Mi
              limits:
                memory: 1Gi
          - name: checkout       # this container clones the repo
            envFrom:
              - secretRef:
                  name: secret-key
            resources:
              requests:
                cpu: 100m
                memory: 50Mi
              limits:
                memory: 1Gi
          - name: container-0    # the job runs in a container with this name by default
            resources:
              requests:
                cpu: 100m
                memory: 50Mi
              limits:
                memory: 1Gi
DrJosh9000 commented 5 months ago

Hey @bnovick, I think I've found the bug - something missed in the push to get pod-spec-patch released. I hope to fast-follow with another release for you! or try chart version 0.9.0-1-g3ce672b