|
| 1 | +package: |
| 2 | + name: custom-pod-autoscaler-operator |
| 3 | + version: "1.4.2" |
| 4 | + epoch: 0 |
| 5 | + description: Operator for managing Kubernetes Custom Pod Autoscalers (CPA). |
| 6 | + copyright: |
| 7 | + - license: Apache-2.0 |
| 8 | + |
| 9 | +pipeline: |
| 10 | + - uses: git-checkout |
| 11 | + with: |
| 12 | + expected-commit: 657d0a3a829e596404e4f5c09e71071237721d35 |
| 13 | + repository: https://github.com/jthomperoo/custom-pod-autoscaler-operator |
| 14 | + tag: v${{package.version}} |
| 15 | + |
| 16 | + - uses: go/bump |
| 17 | + with: |
| 18 | + deps: |- |
| 19 | + |
| 20 | + |
| 21 | + google.golang.org/[email protected] |
| 22 | +
|
| 23 | + - uses: go/build |
| 24 | + with: |
| 25 | + packages: . |
| 26 | + output: custom-pod-autoscaler-operator |
| 27 | + vendor: true |
| 28 | + |
| 29 | +subpackages: |
| 30 | + - name: ${{package.name}}-compat |
| 31 | + pipeline: |
| 32 | + - runs: | |
| 33 | + mkdir -p "${{targets.contextdir}}/app" |
| 34 | + ln -s /usr/bin/custom-pod-autoscaler-operator "${{targets.contextdir}}/operator" |
| 35 | + test: |
| 36 | + pipeline: |
| 37 | + - runs: test "$(readlink /operator)" = "/usr/bin/custom-pod-autoscaler-operator" |
| 38 | + |
| 39 | +update: |
| 40 | + enabled: true |
| 41 | + github: |
| 42 | + identifier: jthomperoo/custom-pod-autoscaler-operator |
| 43 | + strip-prefix: v |
| 44 | + |
| 45 | +test: |
| 46 | + environment: |
| 47 | + contents: |
| 48 | + packages: |
| 49 | + - ${{package.name}}-compat |
| 50 | + - curl |
| 51 | + - wait-for-it |
| 52 | + - helm |
| 53 | + environment: |
| 54 | + KUBERNETES_SERVICE_HOST: "127.0.0.1" |
| 55 | + KUBERNETES_SERVICE_PORT: 32764 |
| 56 | + pipeline: |
| 57 | + - uses: test/tw/ldd-check |
| 58 | + - uses: test/kwok/cluster |
| 59 | + - name: Fix SA token |
| 60 | + runs: | |
| 61 | + #!/usr/bin/env bash |
| 62 | + set -euo pipefail |
| 63 | + # Workaround fix for: "Fail to create in-cluster Kubernetes config: open /var/run/secrets/kubernetes.io/serviceaccount/token: no such file or directory" |
| 64 | + # InClusterConfig() parses the file and insists it contain a real PEM-encoded CA certificate. |
| 65 | + DIR=/var/run/secrets/kubernetes.io/serviceaccount |
| 66 | + mkdir -p "$DIR" |
| 67 | + kwokctl --name kwok kubectl create serviceaccount cpa |
| 68 | + kwokctl --name kwok kubectl -n default create token cpa --duration=8760h > "$DIR/token" |
| 69 | + CA=$(kubectl config view --raw -o jsonpath='{.clusters[0].cluster.certificate-authority}') |
| 70 | + cp $CA /var/run/secrets/kubernetes.io/serviceaccount/ca.crt |
| 71 | + echo default > "$DIR/namespace" |
| 72 | + - name: "start daemon on localhost" |
| 73 | + uses: test/daemon-check-output |
| 74 | + with: |
| 75 | + setup: | |
| 76 | + helm install custom-pod-autoscaler-operator https://github.com/jthomperoo/custom-pod-autoscaler-operator/releases/download/v${{package.version}}/custom-pod-autoscaler-operator-v${{package.version}}.tgz |
| 77 | + start: "/operator" |
| 78 | + timeout: 10 |
| 79 | + expected_output: | |
| 80 | + starting manager |
| 81 | + Serving metrics server |
| 82 | + Starting Controller |
| 83 | + post: | |
| 84 | + wait-for-it -t 5 --strict localhost:8000 -- echo "Server is up" |
| 85 | + kubectl apply -f https://raw.githubusercontent.com/jthomperoo/custom-pod-autoscaler/refs/heads/master/example/python-custom-autoscaler/cpa.yaml |
0 commit comments