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

Pr/michi/prateek copy #1281

Closed
wants to merge 14 commits into from
Closed

Pr/michi/prateek copy #1281

wants to merge 14 commits into from

Conversation

michi-covalent
Copy link
Contributor

@michi-covalent michi-covalent commented Jul 27, 2023

to test it locally:

% cat my-values.yaml
podWatcher:
  enabled: true
tetragonOperator:
  image:
    override: quay.io/cilium/tetragon-operator-ci:c128c9113c0b4c4512e154f9d9d721c37446fdf6

% helm install -n kube-system tetragon ./install/kubernetes/ -f my-values.yaml

@netlify
Copy link

netlify bot commented Aug 2, 2023

Deploy Preview for tetragon ready!

Name Link
🔨 Latest commit 2efe846
🔍 Latest deploy log https://app.netlify.com/sites/tetragon/deploys/64d7b394f980190007f6ba83
😎 Deploy Preview https://deploy-preview-1281--tetragon.netlify.app/docs/reference/helm-chart
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@michi-covalent michi-covalent force-pushed the pr/michi/prateek-copy branch 10 times, most recently from e7572f2 to 0f62317 Compare August 8, 2023 20:10
@michi-covalent michi-covalent force-pushed the pr/michi/prateek-copy branch 2 times, most recently from 4e66141 to 0966bf1 Compare August 9, 2023 22:26
tetragonpod/controller/tetragonpod_controller.go Outdated Show resolved Hide resolved
tetragonpod/controller/tetragonpod_controller.go Outdated Show resolved Hide resolved
// createTetragonPod creates a tetragonPod resource.
func createTetragonPod(ctx context.Context, pod *corev1.Pod, r *TetragonPodReconciler, l logr.Logger) (ctrl.Result, error) {
// create the tetragon pod since the pod exists
if pod.Status.Phase == corev1.PodRunning {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

instead of waiting for the pod to start, we want to create TetragonPod as soon as we have all the necessary info.

Copy link
Contributor

Choose a reason for hiding this comment

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

I added that to reduce the logs being generated, because the controller is triggered for every state change too. I should use log.Debug instead of log.Info as you suggested. Should I instead for the pod.Status.Phase == corev1.PodPending ?

Copy link
Contributor

Choose a reason for hiding this comment

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

Just re-confirming. The controller will wait for all the necessary information it needs, once done, it will create the respective tetragonPods right ?

tetragonpod/controller/tetragonpod_controller.go Outdated Show resolved Hide resolved
},
Status: ciliumiov1alpha1.TetragonPodStatus{
PodIP: newIP.IP,
PodIPs: make([]ciliumiov1alpha1.PodIP, 0),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

copy PodIPs field too

Copy link
Contributor

Choose a reason for hiding this comment

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

done

@michi-covalent
Copy link
Contributor Author

@prateek041 please rebase against main branch to pick up #1351 🙏 🚀

prateek041 and others added 5 commits August 15, 2023 21:56
This commit:

- Initializes a Project with Name podinfo and repo github.com/cilium/tetragon
- Provide builderplate code for creating the operator

Signed-off-by: Prateek Singh <[email protected]>
Signed-off-by: Prateek Singh <[email protected]>
Signed-off-by: Michi Mutsuzaki <[email protected]>
Signed-off-by: Michi Mutsuzaki <[email protected]>
Signed-off-by: Michi Mutsuzaki <[email protected]>
michi-covalent and others added 3 commits August 24, 2023 17:36
Signed-off-by: Michi Mutsuzaki <[email protected]>
Signed-off-by: Prateek Singh <[email protected]>
Signed-off-by: Prateek Singh <[email protected]>
@michi-covalent
Copy link
Contributor Author

let's close this one. we are using #1410 instead

@michi-covalent michi-covalent deleted the pr/michi/prateek-copy branch September 13, 2023 23:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants