forked from aws/amazon-eks-pod-identity-webhook
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #166 from abutcher/rebase-master-2
CCO-429: Rebase master
- Loading branch information
Showing
2,110 changed files
with
279,569 additions
and
39,037 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: test | ||
|
||
on: pull_request | ||
jobs: | ||
test: | ||
# this is to prevent the job to run at forked projects | ||
if: github.repository == 'aws/amazon-eks-pod-identity-webhook' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Install Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.19.x | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Test | ||
run: go mod tidy && go mod vendor && go test ./... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,11 @@ | ||
FROM golang AS builder | ||
FROM --platform=$BUILDPLATFORM golang:1.19 AS builder | ||
|
||
WORKDIR $GOPATH/src/github.com/aws/amazon-eks-pod-identity-webhook | ||
COPY . ./ | ||
RUN GOPROXY=direct CGO_ENABLED=0 GOOS=linux go build -o /webhook -v -a -installsuffix nocgo -ldflags="-buildid='' -w -s" . | ||
ARG TARGETOS TARGETARCH | ||
RUN GOPROXY=direct CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH go build -o /webhook -v -a -ldflags="-buildid='' -w -s" . | ||
|
||
FROM scratch | ||
COPY ATTRIBUTIONS.txt /ATTRIBUTIONS.txt | ||
FROM --platform=$TARGETPLATFORM public.ecr.aws/eks-distro/kubernetes/go-runner:v0.13.0-eks-1-23-latest | ||
COPY --from=builder /webhook /webhook | ||
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ | ||
EXPOSE 443 | ||
VOLUME /etc/webhook | ||
ENTRYPOINT ["/webhook"] | ||
CMD ["--logtostderr"] | ||
ENTRYPOINT ["/go-runner"] | ||
CMD ["/webhook"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,22 @@ | ||
apiVersion: admissionregistration.k8s.io/v1beta1 | ||
apiVersion: admissionregistration.k8s.io/v1 | ||
kind: MutatingWebhookConfiguration | ||
metadata: | ||
name: pod-identity-webhook | ||
namespace: default | ||
annotations: | ||
cert-manager.io/inject-ca-from: default/pod-identity-webhook | ||
webhooks: | ||
- name: pod-identity-webhook.amazonaws.com | ||
failurePolicy: Ignore | ||
sideEffects: None | ||
clientConfig: | ||
service: | ||
name: pod-identity-webhook | ||
namespace: default | ||
path: "/mutate" | ||
caBundle: ${CA_BUNDLE} | ||
rules: | ||
- operations: [ "CREATE" ] | ||
apiGroups: [""] | ||
apiVersions: ["v1"] | ||
resources: ["pods"] | ||
sideEffects: None | ||
admissionReviewVersions: ["v1beta1"] |
Oops, something went wrong.