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

feature: Add deploy workflow #105

Merged
merged 5 commits into from
Jun 20, 2024
Merged

Conversation

SFulpius
Copy link
Contributor

What type of PR is this?

kind/feature

What this PR does / why we need it:

This PR implements the deploy part of proposal 1. It adds a workflow that can be triggered by the workflow_dispatch event. The workflow apply flux manifests and wait for flux to deploy the project on the cluster. At this point everything is ready to start the benchmarks, which will be implemented in a future pull request.
Finally it deletes the manifests and wait until the cluster state is clean.

Which issue(s) this PR fixes:

Fixes #99

Special notes for your reviewer (optional):

  • Right now the manifests for all three falco drivers are the same as there is only one kustomization file with all drivers in the repo. This should be changed once there is a way to run only one driver ([ACTION] Modify flux resources for Falco to support pipeline #100).
  • The project is now deployed in the benchmark namespace. It was deployed in the falco namespace before. This way we can always use the same name when we interact with the namespace, instead of having one different namespace per project. The benchmark namespace still need to be created.
  • I could not run on the CI the part using kubectl as I do not have access to a kubeconfig file. I tested these manually on a local cluster.
  • I made the assumption that a secret named KUBECONFIG exists containing a kubeconfig that can be used to access the cluster.

Signed-off-by: SFulpius <[email protected]>
Copy link
Contributor

@rossf7 rossf7 left a comment

Choose a reason for hiding this comment

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

@SFulpius Nice this is looking good. Will reply to your notes separately.

My main question is how will we add the run and report steps later?

I think we could do this by giving the workflow a more generic name like pipeline and having multiple jobs with deploy running first and a final job to delete the resources.

.github/workflows/deploy.yaml Outdated Show resolved Hide resolved
projects/falco/ebpf.yaml Show resolved Hide resolved
.github/workflows/deploy.yaml Outdated Show resolved Hide resolved
@rossf7
Copy link
Contributor

rossf7 commented Jun 14, 2024

Right now the manifests for all three falco drivers are the same as there is only one kustomization file with all drivers in the repo. This should be changed once there is a way to run only one driver (#100).

Yes, I think we want separate manifests per driver. My plan for #100 is to have an overlay per driver. We can integrate this once those changes are ready.

The project is now deployed in the benchmark namespace. It was deployed in the falco namespace before. This way we can always use the same name when we interact with the namespace, instead of having one different namespace per project. The benchmark namespace still need to be created.

Agree on changing the name of the namespace. We can either create it permanently via Flux by adding it here https://github.com/cncf-tags/green-reviews-tooling/tree/main/clusters/base

Or if we are worried about leftover resources we could create it as part of the deploy step and delete after the flux manifest is deleted? For simplicity I would go for the first option for now.

I made the assumption that a secret named KUBECONFIG exists containing a kubeconfig that can be used to access the cluster.

Yes, will get this added.

@SFulpius
Copy link
Contributor Author

@rossf7 I created the benchmark namespace and split the workflow into two jobs.

Copy link
Contributor

@rossf7 rossf7 left a comment

Choose a reason for hiding this comment

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

Thank you @SFulpius! Just one nit pls rename the file to benchmark-namespace.yaml

Otherwise LGTM! 🚀

@rossf7
Copy link
Contributor

rossf7 commented Jun 19, 2024

@SFulpius Another renaming nit 🙏

We use kebab-case for files so pls rename to modern-ebpf.yaml.

This will also align with the projects.json file

{
    "projects": [
        {
            "name": "falco",
            "organization": "falcosecurity",
            "sub_components": [
                "ebpf",
                "modern-ebpf",
                "kmod"
            ]
        }
    ]
}

Signed-off-by: SFulpius <[email protected]>
@rossf7 rossf7 merged commit fe0a5b2 into cncf-tags:main Jun 20, 2024
1 check passed
@rossf7
Copy link
Contributor

rossf7 commented Jun 20, 2024

Thank you @SFulpius! Great job getting this implemented 💚

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.

[ACTION] Implement deploy step of pipeline
2 participants