-
Notifications
You must be signed in to change notification settings - Fork 167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ci: generate seccomp profile within pipeline #1325
Open
alegrey91
wants to merge
7
commits into
projectcapsule:main
Choose a base branch
from
alegrey91:ci/harpoon-integration
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
62f2e5f
ci: generate seccomp profile within pipeline
alegrey91 d4faf39
ci(chart): move values file into different location
alegrey91 89e01ab
ci(makefile): change installation dir for harpoon
alegrey91 7ba3453
fix(chart): remove priorityClassName template condition
alegrey91 c4adc10
fix: helm test
alegrey91 a362cf7
fix: helm test
alegrey91 fb9be0d
fix: helm test
alegrey91 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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 @@ | ||
# replacing capsule with harpoon Docker image, | ||
# (importing only the capsule binary), | ||
# so we can trace syscalls. | ||
FROM alegrey91/harpoon:v0.9.4 | ||
WORKDIR / | ||
COPY --from=localhost/capsule:latest /manager . | ||
|
||
ENTRYPOINT ["/harpoon", \ | ||
"capture", \ | ||
"-f", "main.main", \ | ||
"-E", "NAMESPACE=capsule-system", \ | ||
"-i", "2", \ | ||
"-c", "-e", \ | ||
"-S", "-D", "/tmp/results/", \ | ||
"--", "/manager"] |
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,38 @@ | ||
# Custome values for capsule tracing. | ||
# This is a YAML-formatted file. | ||
# Declare variables to be passed into your templates. | ||
manager: | ||
image: | ||
registry: localhost | ||
repository: capsule-tracing | ||
pullPolicy: Never | ||
tag: latest | ||
hostNetwork: true | ||
hostPID: true | ||
volumes: | ||
- name: debugfs | ||
hostPath: | ||
path: /sys/kernel/debug | ||
type: Directory | ||
- name: data | ||
hostPath: | ||
path: /tmp/results | ||
type: Directory | ||
volumeMounts: | ||
- name: debugfs | ||
mountPath: /sys/kernel/debug | ||
- mountPath: /tmp/results | ||
name: data | ||
securityContext: | ||
capabilities: | ||
add: | ||
- SYS_ADMIN | ||
- NET_ADMIN | ||
- PERFOM | ||
privileged: true | ||
podSecurityContext: | ||
seccompProfile: | ||
type: "Unconfined" | ||
runAsGroup: 0 | ||
runAsNonRoot: false | ||
runAsUser: 0 |
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,13 @@ | ||
# With Kind configuration is used to | ||
# share a folder between the outside sistem | ||
# and the internal container (capsule-controller-manager), | ||
# In this way we will be able to get the metadata | ||
# generated by harpoon at the end of the e2e tests execution. | ||
kind: Cluster | ||
apiVersion: kind.x-k8s.io/v1alpha4 | ||
name: capsule-tracing | ||
nodes: | ||
- role: control-plane | ||
extraMounts: | ||
- hostPath: /tmp/results | ||
containerPath: /tmp/results |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just use
securityContext
? Or what's the reason hereThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.Values.securityContext
is used bykubelet
image..Values.manager.securityContext
is used only by the capsule image when built for tracing.When we don't set
.Values.manager.securityContext
, then.Values.securityContext
come into play for both the images.Does it make sense to you?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which
kubelet
image? We just have the manager that we are deploying..ARe you talking about this here:
This specifcally
manager.image.securityContext.privileged=true
(This path is wrong btw)? So the rest of the securitycontext is too restrictive? Otherwise make sure it points to the same values in the Makefile as in the chart valuesThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I meant the
kubectl
image which is mentioned in thevalues.yaml
.The point is that
.Values.securityContext
is shared between the capsuleDeployment
and the kubectlJob
, so in order to be able to overwrite only the capsuleDeployment
I created a dedicated item for it.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Jobs take sec from
.Vales.global.jobs.kubectl.securityContext
, they are no longer sharedThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, actually the reason why I created
.Values.manager.securityContext
was that when I overwrite the default values withtracing-values.yaml
, this result in the following setting:This is a combination of both (
values.yaml
,ci/tracing-values.yaml
) that doesn't make sense.(
privilege: true
andallowPrivilegeEscalation: false
cannot be used at the same time).For this reason I created
.Values.manager.securityContext
, so I could specify a differentsecurityContext
in particular cases where I need it.