Skip to content
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

Add sample kubernetes deployment #16

Closed

Conversation

natalysheinin
Copy link

@natalysheinin natalysheinin commented May 8, 2019

Adding a Kubernetes Deployment manifest that can be used to deploy falcosidekick to a Kubernetes environment.

Verified deployment works on Minikube.
image

cc @Issif

@Issif
Copy link
Member

Issif commented May 9, 2019

Thanks a lot for this contribution. I'm working on a local branch about same topic for a while, just didn't had enough time to move forward (I'm still bad with helm formalism, so any help is welcome).

I would like a solution without modifying the chart for adapting, I prefer to use configmap.yml + values.yml, especially because I'm planning a version 2.0.0 with a lot of changes. Environment variables are useful but we could do better with a hierarchy of configuration methods "env vars > yaml config file > default values", I will surely using Viper package for doing that : https://github.com/spf13/viper.

My point is to provide several methods for configuration and possible overridings.

You choose to create a Service with a ServiceType NodePort but I prefer ClusterIP, access from outside the cluster should be prohibited. I'm asking myself too if we should use a classic deployment with ReplicaSet or a DaemonSet.

I think I will take ideas from https://github.com/helm/charts/tree/master/stable/traefik, traefik is piece of software I know well and I really like, its mechanism for handling configuration inspires me (will use yaml instead of toml to be consistent with falco.yaml).

It's maybe esthetic, but I prefer to add helm files in a /helm/stable folder, to avoid any confusion and that let us to add a /helm/dev for your version, I could merge your PR and give it avaible for all, while I'm preparing more.

Regards,

@Issif Issif mentioned this pull request May 9, 2019
@Issif Issif added kind/feature New feature or request new feature labels May 20, 2019
@natalysheinin
Copy link
Author

@Issif do you need me to adjust anything here for it to get merged?

@Issif
Copy link
Member

Issif commented Sep 10, 2019

@natalysheinin Yes please :

  • I added a lot of new outputs, please consider to add them
  • I reviewed your last commit, please take a look at my comments
  • We added helm chart in /deploy/helm please move your yaml into /deploy/kubernetes
  • Add a NOTES.txt with instructions about how to use your yaml with kubectl (creation of secrets before, which namespace is used, etc)

labels:
name: falcosidekick
spec:
replicas: 1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
replicas: 1
replicas: 2

for HA

program_output:
enabled: true
keep_alive: false
program: "curl -d @- falcosidekick.sysdig-staging.svc.cluster.local:2801/"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
program: "curl -d @- falcosidekick.sysdig-staging.svc.cluster.local:2801/"
program: "curl -d @- falcosidekick.falco.svc.cluster.local:2801/"

I think we should add falcosidekick in same namespace than falco

serviceAccount: falcosidekick
containers:
- name: falcosidekick
image: issif/falcosidekick:1.1.0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
image: issif/falcosidekick:1.1.0
image: falco/falcosidekick:2.7.2

falcosidekick is now an official project, we moved it's repository

@Issif
Copy link
Member

Issif commented Sep 10, 2019

I'm also thinking about using a ConfigMap (#33), for direct yaml and helm chart

image: issif/falcosidekick:1.1.0
imagePullPolicy: Always
ports:
- containerPort: 2081

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo 2801

# CREATE THE K8S SECRETS BEFORE UNCOMMENTING
# https://kubernetes.io/docs/concepts/configuration/secret/#creating-a-secret-using-kubectl-create-secret
# Example: kubectl create secret falcosidekick-slack-secret --from-file=./slack-secret.txt
# - name: SLACK_WEBHOOK_URL

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be "SLACK_WEBHOOKURL" no?

value: "all"
- name: DEBUG
value: "true"
args: [ "/falcosidekick"]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This appears not to be needed.

value: ""
- name: SLACK_ICON
value: ""
- name: SLACK_OUTPUT_FORMAT

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be SLACK_OUTPUTFORMAT

@poiana
Copy link

poiana commented Jul 3, 2020

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To complete the pull request process, please assign issif
You can assign the PR to them by writing /assign @issif in a comment when ready.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@poiana poiana added the size/M label Jul 3, 2020
@poiana
Copy link

poiana commented Nov 21, 2020

Issues go stale after 90d of inactivity.

Mark the issue as fresh with /remove-lifecycle stale.

Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Provide feedback via https://github.com/falcosecurity/community.

/lifecycle stale

@natalysheinin natalysheinin deleted the add-k8s-deployment branch December 3, 2020 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants