Skip to content
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
3 changes: 2 additions & 1 deletion .github/workflows/e2e-k8s-1.22.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: E2E-K8S-1.22
on:
push:
branches:
- master
- main
- release-*
pull_request: {}
workflow_dispatch: {}
Expand All @@ -20,6 +20,7 @@ env:
jobs:

slo-controller:
continue-on-error: true
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/e2e-k8s-1.24.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: E2E-K8S-1.24
on:
push:
branches:
- master
- main
- release-*
pull_request: {}
workflow_dispatch: {}
Expand All @@ -20,6 +20,7 @@ env:
jobs:

slo-controller:
continue-on-error: true
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/e2e-k8s-latest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: E2E-K8S-latest
on:
push:
branches:
- master
- main
- release-*
pull_request: {}
workflow_dispatch: {}
Expand All @@ -19,6 +19,7 @@ env:
jobs:

slo-controller:
continue-on-error: true
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
Expand Down
12 changes: 12 additions & 0 deletions config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -206,3 +206,15 @@ rules:
- get
- patch
- update
- apiGroups:
- topology.node.k8s.io
resources:
- noderesourcetopologies
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
2 changes: 1 addition & 1 deletion hack/deploy_kind.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ set -e

make kustomize
KUSTOMIZE=$(pwd)/bin/kustomize
(cd config/manager && "${KUSTOMIZE}" edit set image controller="${IMG}")
(cd config/manager && "${KUSTOMIZE}" edit set image manager="${IMG}")
"${KUSTOMIZE}" build config/default | sed -e 's/imagePullPolicy: Always/imagePullPolicy: IfNotPresent/g' > /tmp/koordinator-kustomization.yaml
echo -e "resources:\n- manager.yaml" > config/manager/kustomization.yaml
kubectl apply -f /tmp/koordinator-kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ func (p *Plugin) Name() string {
return PluginName
}

// +kubebuilder:rbac:groups=core,resources=nodes,verbs=get;list;watch
// +kubebuilder:rbac:groups=topology.node.k8s.io,resources=noderesourcetopologies,verbs=get;list;watch;create;update;patch;delete

func (p *Plugin) Setup(opt *framework.Option) error {
client = opt.Client

Expand Down Expand Up @@ -220,7 +223,7 @@ func (p *Plugin) MutateNodeResource(nr *framework.NodeResource, node *corev1.Nod
hasMutated := false
for _, resourceName := range resourcesToAmplify {
q, ok := nr.Resources[resourceName]
if !ok {
if !ok || q == nil {
continue
}

Expand Down