woodpecker/pipeline/frontend/yaml
Nikolai Rodionov b3541e314e
fix: Add backend_options to service linter entry (#2930)
I've tried setting resources for a service and have seen the linter
warning that is not supported, though the the pipeline was successful
and resources were actually set on the pod. So I assume it shouldn't be
a linter issue.

I"m also not sure if my change is correct, I only hope it is

## Some Context

A pipeline example (I've removed steps that are not related directly:
```yaml
---
steps:
  test:
    name: Test charts
    image: quay.io/helmpack/chart-testing
    environment:
      - DOCKER_HOST=tcp://docker:2375
    commands:
      - export PATH=$PWD/.bin:$PATH
      - apk update && apk add docker
      - kind create cluster --config kind.yaml
      - sed -i -E -e 's/localhost|0\.0\.0\.0/docker/g' ~/.kube/config
      - git fetch origin
      - |
        if [ -e .changed ]; then
          ct install --target-branch main --chart-dirs .
          ct install --target-branch main --chart-dirs . --upgrade
        fi

services:
  docker:
    image: docker:dind
    commands: dockerd -H tcp://0.0.0.0:2375 --tls=false
    privileged: true
    ports:
      - 2375
    backend_options:
      kubernetes:
        resources:
          requests:
            memory: 400Mi
            cpu: 100m
          limits:
            memory: 400Mi
            cpu: 100m
```

Pod description:
```
Containers:
  wp-01hhczdknafj81jv80gzjbgt93-0-services-0:
    Limits:
      cpu:     100m
      memory:  400Mi
    Requests:
      cpu:     100m
      memory:  400Mi
```

Warning in the Woodpecker UI:

```
[linter]woodpecker: services.dockerAdditional property backend_options is not allowed
```
2023-12-11 19:22:55 +01:00
..
compiler Update go module path for major version 2 (#2905) 2023-12-08 08:15:08 +01:00
constraint Update go module path for major version 2 (#2905) 2023-12-08 08:15:08 +01:00
linter fix: Add backend_options to service linter entry (#2930) 2023-12-11 19:22:55 +01:00
matrix Update go module path for major version 2 (#2905) 2023-12-08 08:15:08 +01:00
types Update go module path for major version 2 (#2905) 2023-12-08 08:15:08 +01:00
utils fix(deps): update module github.com/docker/distribution to v2.8.3+incompatible (#2517) 2023-10-03 09:35:40 +02:00
parse.go Update go module path for major version 2 (#2905) 2023-12-08 08:15:08 +01:00
parse_test.go Update go module path for major version 2 (#2905) 2023-12-08 08:15:08 +01:00
version.go Add workflow version (#2476) 2023-11-06 01:37:02 +01:00