forked from falcosecurity/falcosidekick
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
changing dockerfile imge to non root user
Signed-off-by: Shreyas220 <[email protected]> handling error Signed-off-by: Shreyas220 <[email protected]> somethign Signed-off-by: Shreyas220 <[email protected]> somethign Signed-off-by: Shreyas220 <[email protected]> somethign Signed-off-by: Shreyas220 <[email protected]> testing Signed-off-by: Shreyas220 <[email protected]> testing Signed-off-by: Shreyas220 <[email protected]> testing Signed-off-by: Shreyas220 <[email protected]> testing Signed-off-by: Shreyas220 <[email protected]> testing Signed-off-by: Shreyas220 <[email protected]>
- Loading branch information
1 parent
0cf926e
commit 5e7bd1d
Showing
15 changed files
with
104 additions
and
60 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 |
---|---|---|
|
@@ -26,5 +26,4 @@ jobs: | |
context: . | ||
file: ./Dockerfile | ||
push: true | ||
tags: kubearmor/sidekick:latest | ||
|
||
tags: kubearmor/sidekick:latest |
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,13 +1,47 @@ | ||
FROM golang:1.20 | ||
# FROM golang:1.20 | ||
|
||
# WORKDIR /app | ||
|
||
# COPY go.mod ./ | ||
# COPY go.sum ./ | ||
# RUN go mod download | ||
|
||
# COPY . ./ | ||
|
||
# RUN go build -o sidekick . | ||
|
||
# ENTRYPOINT ["./sidekick"] | ||
# Build stage | ||
|
||
FROM golang:1.20 AS build-stage | ||
|
||
WORKDIR /app | ||
|
||
# Copy go module files and download dependencies | ||
COPY go.mod ./ | ||
COPY go.sum ./ | ||
RUN go mod download | ||
|
||
# Copy the source code and build the application | ||
COPY . ./ | ||
RUN CGO_ENABLED=0 go build -o sidekick . | ||
|
||
RUN go build -o sidekick . | ||
# Final stage | ||
FROM alpine:3.17 AS final-stage | ||
|
||
# Add ca-certificates for SSL/TLS communication | ||
RUN apk add --update --no-cache ca-certificates | ||
|
||
# Correcting the path here | ||
COPY --from=build-stage /app/sidekick /app/sidekick | ||
|
||
# Create user for added security | ||
RUN addgroup -S sidekick && adduser -u 1234 -S sidekick -G sidekick | ||
|
||
# Switch to the new user | ||
USER 1234 | ||
|
||
WORKDIR /app | ||
|
||
ENTRYPOINT ["./sidekick"] | ||
# Set the entrypoint to the binary | ||
ENTRYPOINT ["./sidekick"] |
This file was deleted.
Oops, something went wrong.
File renamed without changes.
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
6 changes: 3 additions & 3 deletions
6
...s/templates/clusterrole-binding-rbac.yaml → ...k/templates/clusterrole-binding-rbac.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 |
---|---|---|
@@ -1,12 +1,12 @@ | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRoleBinding | ||
metadata: | ||
name: deimos-clusterRoleBinding | ||
name: sidekick-clusterRoleBinding | ||
subjects: | ||
- kind: ServiceAccount | ||
name: deimos-serviceaccount | ||
name: sidekick-serviceaccount | ||
namespace: {{.Release.Namespace}} | ||
roleRef: | ||
kind: ClusterRole | ||
name: deimos | ||
name: sidekick | ||
apiGroup: rbac.authorization.k8s.io |
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
4 changes: 2 additions & 2 deletions
4
helm/deimos/templates/secrets.yaml → helm/sidekick/templates/secrets.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
2 changes: 1 addition & 1 deletion
2
helm/deimos/templates/service.yaml → helm/sidekick/templates/service.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
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 @@ | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: "{{ include "sidekick.fullname" . }}-test-connection" | ||
labels: | ||
{{- include "sidekick.labels" . | nindent 4 }} | ||
annotations: | ||
"helm.sh/hook": test | ||
spec: | ||
containers: | ||
- name: wget | ||
image: busybox | ||
command: ['wget'] | ||
args: ['{{ include "sidekick.fullname" . }}:{{ .Values.service.port }}'] | ||
restartPolicy: Never |
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