Skip to content

Commit

Permalink
reduce layers in container. fix version number.
Browse files Browse the repository at this point in the history
Signed-off-by: Scott Trent <[email protected]>
  • Loading branch information
trent-s committed Jul 2, 2024
1 parent 303d2d0 commit 83a3cb3
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 12 deletions.
9 changes: 4 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ ARG TARGETOS
ARG TARGETARCH

WORKDIR /workspace
# Copy the Go Modules manifests (go.sum and go.mod)
COPY go.* .
# Copy the Go Modules manifests
COPY go.sum go.mod .
# cache deps before building and copying source so that we don't need to re-download as much
# and so that source changes don't invalidate our downloaded layer
RUN apk upgrade --no-cache && \
go mod download

# Copy the go source
COPY cmd/main.go cmd/main.go
COPY cmd/ cmd/
COPY api/ api/
COPY internal/controller/ internal/controller/

Expand All @@ -28,8 +28,7 @@ RUN CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} go build -a -o ma
FROM gcr.io/distroless/static-debian12:nonroot
# FROM gcr.io/distroless/static-debian12:debug
WORKDIR /
COPY --from=builder /workspace/manager .
COPY cmd/debug-entrypoint.sh .
COPY --from=builder /workspace/manager /workspace/cmd/debug-entrypoint.sh .
USER 65532:65532

ENTRYPOINT ["/manager"]
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.0.22
0.0.21
10 changes: 5 additions & 5 deletions bundle/manifests/susql-operator.clusterserviceversion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ metadata:
]
capabilities: Basic Install
categories: Monitoring
containerImage: quay.io/sustainable_computing_io/susql_operator:0.0.22
createdAt: "2024-07-01T08:04:51Z"
containerImage: quay.io/sustainable_computing_io/susql_operator:0.0.21
createdAt: "2024-07-02T05:17:47Z"
description: 'Aggregates energy data from pods tagged with SusQL labels '
operators.operatorframework.io/builder: operator-sdk-v1.34.1
operators.operatorframework.io/project_layout: go.kubebuilder.io/v4
repository: https://github.com/sustainable-computing-io/susql-operator
support: https://github.com/sustainable-computing-io/susql-operator/issues
name: susql-operator.v0.0.22
name: susql-operator.v0.0.21
namespace: placeholder
spec:
apiservicedefinitions: {}
Expand Down Expand Up @@ -224,7 +224,7 @@ spec:
value: :8081
- name: METRICS-BIND-ADDRESS
value: 127.0.0.1:9999
image: quay.io/sustainable_computing_io/susql_operator:0.0.22
image: quay.io/sustainable_computing_io/susql_operator:0.0.21
imagePullPolicy: IfNotPresent
livenessProbe:
httpGet:
Expand Down Expand Up @@ -328,4 +328,4 @@ spec:
provider:
name: SusQL Operator Contributors
url: https://github.com/sustainable-computing-io/susql-operator
version: 0.0.22
version: 0.0.21
2 changes: 1 addition & 1 deletion config/manager/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ kind: Kustomization
images:
- name: controller
newName: quay.io/sustainable_computing_io/susql_operator
newTag: 0.0.22
newTag: 0.0.21

0 comments on commit 83a3cb3

Please sign in to comment.