-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8fe5c8e
commit ecbb47e
Showing
7 changed files
with
99 additions
and
40 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 |
---|---|---|
@@ -1,18 +1,14 @@ | ||
FROM golang:1.16-alpine AS build_deps | ||
FROM golang:alpine AS builder | ||
RUN apk add --no-cache git curl ca-certificates socat bash openssl | ||
WORKDIR /workspace | ||
COPY go.mod . | ||
COPY go.sum . | ||
RUN go mod download | ||
|
||
FROM build_deps AS build | ||
COPY . . | ||
RUN go mod download | ||
RUN CGO_ENABLED=0 go build -o webhook -ldflags '-w -extldflags "-static"' . | ||
RUN curl -fsSL https://get.acme.sh | sh -s [email protected] | ||
|
||
FROM alpine | ||
COPY --from=build /workspace/webhook /usr/local/bin/webhook | ||
COPY --from=build /root/.acme.sh /root/.acme.sh | ||
COPY --from=builder /workspace/webhook /usr/local/bin/webhook | ||
COPY --from=builder /root/.acme.sh /root/.acme.sh | ||
ADD acme_delegate /root/acme_delegate | ||
RUN apk add --no-cache ca-certificates curl socat bash openssl && chmod 755 /root/acme_delegate | ||
|
||
|
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{{- if .Values.clusterIssuer.enabled }} | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: {{ include "acmesh-webhook.fullname" . }}-secret | ||
namespace: {{ .Values.certManager.namespace }} | ||
labels: | ||
app: {{ include "acmesh-webhook.name" . }} | ||
chart: {{ include "acmesh-webhook.chart" . }} | ||
release: {{ .Release.Name }} | ||
heritage: {{ .Release.Service }} | ||
type: Opaque | ||
data: | ||
env: {{ required ".Values.clusterIssuer.env is required" .Values.clusterIssuer.env | mustToJson | b64enc | quote }} | ||
{{- end }} |