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

bug: context missing from EventsToRegister #87

Merged
merged 2 commits into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/e2e-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,8 @@ jobs:

- name: Install Cert Manager
run: |
kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.13.1/cert-manager.yaml
sleep 10
kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.16.2/cert-manager.yaml
sleep 20

- name: Test Fluence
run: /bin/bash ./.github/test.sh
Expand Down Expand Up @@ -176,4 +176,4 @@ jobs:
run: |
docker push ${{ env.fluence_container }} --all-tags
docker push ${{ env.sidecar_container }} --all-tags
docker push ${{ env.controller_container }} --all-tags
docker push ${{ env.controller_container }} --all-tags
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ We provide a set of pre-build containers [alongside the repository](https://gith
that you can easily use to deploy Fluence right away! You'll first need to install the certificate manager:

```bash
kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.13.1/cert-manager.yaml
kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.16.2/cert-manager.yaml
```

And then clone the proper helm charts, and then install to your cluster. We provide helper commands to do that.
Expand Down Expand Up @@ -177,7 +177,7 @@ kind create cluster --config ./examples/kind-config.yaml
And again install the certificate manager:

```bash
kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.13.1/cert-manager.yaml
kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.16.2/cert-manager.yaml
```

**Important** if you are developing or testing fluence, note that custom scheduler plugins don't seem to work out of the box with MiniKube (but everything works with kind). Likely there are extensions or similar that need to be configured with MiniKube (that we have not looked into).
Expand Down
7 changes: 4 additions & 3 deletions sig-scheduler-plugins/pkg/fluence/fluence.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,14 +140,15 @@ func (fluence *Fluence) Name() string {

// Fluence has added delete, although I wonder if update includes that signal
// and it's redundant?
func (fluence *Fluence) EventsToRegister() []framework.ClusterEventWithHint {
func (fluence *Fluence) EventsToRegister(_ context.Context) ([]framework.ClusterEventWithHint, error) {
// To register a custom event, follow the naming convention at:
// https://git.k8s.io/kubernetes/pkg/scheduler/eventhandlers.go#L403-L410
// https://github.com/kubernetes/kubernetes/pull/101394
// Please follow: eventhandlers.go#L403-L410
podGroupGVK := fmt.Sprintf("podgroups.v1alpha1.%v", scheduling.GroupName)
return []framework.ClusterEventWithHint{
{Event: framework.ClusterEvent{Resource: framework.Pod, ActionType: framework.Add | framework.Delete}},
{Event: framework.ClusterEvent{Resource: framework.GVK(podGroupGVK), ActionType: framework.Add | framework.Update | framework.Delete}},
}
}, nil
}

// TODO we need to account for affinity here
Expand Down
Loading