|
| 1 | +package: |
| 2 | + name: kubelet-csr-approver |
| 3 | + version: "1.2.10" |
| 4 | + epoch: 0 |
| 5 | + description: Kubernetes controller to enable automatic kubelet CSR validation after a series of (configurable) security checks |
| 6 | + copyright: |
| 7 | + - license: MIT |
| 8 | + |
| 9 | +pipeline: |
| 10 | + - uses: git-checkout |
| 11 | + with: |
| 12 | + repository: https://github.com/postfinance/kubelet-csr-approver |
| 13 | + tag: v${{package.version}} |
| 14 | + expected-commit: fabca038b8165aebc7ee62d3019fa67b37b972a3 |
| 15 | + |
| 16 | + - name: make ko dir |
| 17 | + runs: | |
| 18 | + mkdir -p ${{targets.contextdir}}/var/run/ko |
| 19 | +
|
| 20 | + - uses: go/build |
| 21 | + with: |
| 22 | + packages: ./cmd/kubelet-csr-approver/ |
| 23 | + tags: debug |
| 24 | + ldflags: | |
| 25 | + -X github.com/postfinance/kubelet-csr-approver/internal/cmd.commit=$(git rev-parse HEAD) |
| 26 | + -X github.com/postfinance/kubelet-csr-approver/internal/cmd.ref=$(git rev-parse --abbrev-ref HEAD) |
| 27 | + output: kubelet-csr-approver |
| 28 | + |
| 29 | +subpackages: |
| 30 | + - name: ${{package.name}}-compat |
| 31 | + description: "Compatibility package to place binary in the location expected by kubelet-csr-approver" |
| 32 | + pipeline: |
| 33 | + - runs: | |
| 34 | + mkdir -p ${{targets.contextdir}}/ko-app |
| 35 | + ln -sf /usr/bin/kubelet-csr-approver ${{targets.contextdir}}/ko-app/kubelet-csr-approver |
| 36 | + test: |
| 37 | + pipeline: |
| 38 | + - runs: | |
| 39 | + test "$(readlink /ko-app/kubelet-csr-approver)" = "/usr/bin/kubelet-csr-approver" |
| 40 | +
|
| 41 | +update: |
| 42 | + enabled: true |
| 43 | + github: |
| 44 | + identifier: postfinance/kubelet-csr-approver |
| 45 | + strip-prefix: v |
| 46 | + |
| 47 | +test: |
| 48 | + environment: |
| 49 | + contents: |
| 50 | + packages: |
| 51 | + - curl |
| 52 | + pipeline: |
| 53 | + - name: basic test |
| 54 | + runs: | |
| 55 | + kubelet-csr-approver --help |
| 56 | + - uses: test/kwok/cluster |
| 57 | + - name: Test operator |
| 58 | + uses: test/daemon-check-output |
| 59 | + with: |
| 60 | + start: | |
| 61 | + kubelet-csr-approver \ |
| 62 | + --provider-regex='^test-node-.*' \ |
| 63 | + --max-expiration-sec=86400 \ |
| 64 | + --bypass-dns-resolution \ |
| 65 | + --level=5 |
| 66 | + timeout: 30 |
| 67 | + expected_output: | |
| 68 | + Kubelet-CSR-Approver controller starting. |
| 69 | + starting server |
| 70 | + Starting metrics server |
| 71 | + Serving metrics server |
| 72 | + Starting EventSource |
| 73 | + Starting Controller |
| 74 | + Starting workers |
| 75 | + post: | |
| 76 | + curl -sfSL http://localhost:8080/metrics |
0 commit comments