-
Notifications
You must be signed in to change notification settings - Fork 290
/
Copy pathaws-load-balancer-controller.yaml
56 lines (49 loc) · 1.96 KB
/
aws-load-balancer-controller.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
package:
name: aws-load-balancer-controller
version: 2.7.1
epoch: 0
description: A Kubernetes controller for Elastic Load Balancers
copyright:
- license: Apache-2.0
environment:
contents:
packages:
- bash
- build-base
- busybox
- ca-certificates-bundle
- go
pipeline:
- uses: git-checkout
with:
repository: https://github.com/kubernetes-sigs/aws-load-balancer-controller
tag: v${{package.version}}
expected-commit: f689bbdf73d30f23b44acfef2c3b8e7280cd66ee
- runs: |
# https://github.com/kubernetes-sigs/aws-load-balancer-controller/blob/main/Dockerfile#L18-L27
VERSION_PKG=sigs.k8s.io/aws-load-balancer-controller/pkg/version
GIT_VERSION=$(git describe --tags --dirty --always) && \
GIT_COMMIT=$(git rev-parse HEAD) && \
BUILD_DATE=$(date +%Y-%m-%dT%H:%M:%S%z) && \
GOOS=$(go env GOOS) GOARCH=$(go env GOARCH) GO111MODULE=on \
CGO_CPPFLAGS="-D_FORTIFY_SOURCE=2" \
CGO_LDFLAGS="-Wl,-z,relro,-z,now" \
go build -buildmode=pie -tags 'osusergo,netgo,static_build' -ldflags="-s -w -linkmode=external -extldflags '-static-pie' -X ${VERSION_PKG}.GitVersion=${GIT_VERSION} -X ${VERSION_PKG}.GitCommit=${GIT_COMMIT} -X ${VERSION_PKG}.BuildDate=${BUILD_DATE}" -mod=readonly -a -o /home/build/out/controller main.go
- runs: |
install -Dm755 /home/build/out/controller "${{targets.destdir}}"/usr/bin/controller
- uses: strip
subpackages:
- name: "aws-load-balancer-controller-compat"
description: "Compatibility package to place binaries in the location expected by upstream helm charts"
pipeline:
- runs: |
# The helm chart expects the binaries to be in / instead of /usr/bin
mkdir -p "${{targets.subpkgdir}}"
ln -sf /usr/bin/controller ${{targets.subpkgdir}}/controller
update:
enabled: true
github:
identifier: kubernetes-sigs/aws-load-balancer-controller
strip-prefix: v
tag-filter: v
use-tag: true