-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rework cert generation so that it uses two deployments
Signed-off-by: Josh Pinkney <joshpinkney@gmail.com>
- Loading branch information
Showing
8 changed files
with
169 additions
and
267 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
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,31 @@ | ||
FROM golang:1.13.7-alpine3.11 as builder | ||
|
||
WORKDIR /che-workspace-operator | ||
|
||
# Populate the module cache based on the go.{mod,sum} files. | ||
COPY go.mod . | ||
COPY go.sum . | ||
RUN go mod download | ||
|
||
# copy the rest of the sources code | ||
COPY . . | ||
# compile workspace controller binaries | ||
RUN CGO_ENABLED=0 GOOS=linux go build \ | ||
-o _output/bin/che-workspace-controller-cert-gen \ | ||
-gcflags all=-trimpath=/ \ | ||
-asmflags all=-trimpath=/ \ | ||
cert-generation/main.go | ||
|
||
FROM registry.access.redhat.com/ubi8-minimal:8.1-279 | ||
COPY --from=builder /che-workspace-operator/_output/bin/che-workspace-controller-cert-gen /usr/local/bin/che-workspace-controller-cert-gen | ||
|
||
ENV USER_UID=1001 \ | ||
USER_NAME=che-workspace-controller-cert-gen | ||
|
||
COPY build/bin /usr/local/bin | ||
RUN /usr/local/bin/user_setup | ||
|
||
USER ${USER_UID} | ||
|
||
ENTRYPOINT ["/usr/local/bin/entrypoint"] | ||
CMD /usr/local/bin/che-workspace-controller-cert-gen |
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
23 changes: 23 additions & 0 deletions
23
deploy/os/che-workspace-controller-cert-gen-deployment.yaml
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,23 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: che-workspace-controller-cert-gen | ||
namespace: che-workspace-controller | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: che-workspace-controller-cert-gen | ||
template: | ||
metadata: | ||
labels: | ||
app: che-workspace-controller-cert-gen | ||
annotations: | ||
kubectl.kubernetes.io/restartedAt: "" | ||
spec: | ||
serviceAccountName: che-workspace-controller | ||
containers: | ||
- name: che-workspace-controller-cert-gen | ||
image: quay.io/che-incubator/che-workspace-controller-cert-gen:latest | ||
imagePullPolicy: Always | ||
|
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
Oops, something went wrong.