File tree Expand file tree Collapse file tree 2 files changed +45
-1
lines changed
distros/kubernetes/nvsentinel/charts/janitor-provider-kwok/templates Expand file tree Collapse file tree 2 files changed +45
-1
lines changed Original file line number Diff line number Diff line change 1+ # Copyright (c) 2025, NVIDIA CORPORATION. All rights reserved.
2+ #
3+ # Licensed under the Apache License, Version 2.0 (the "License");
4+ # you may not use this file except in compliance with the License.
5+ # You may obtain a copy of the License at
6+ #
7+ # http://www.apache.org/licenses/LICENSE-2.0
8+ #
9+ # Unless required by applicable law or agreed to in writing, software
10+ # distributed under the License is distributed on an "AS IS" BASIS,
11+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+ # See the License for the specific language governing permissions and
13+ # limitations under the License.
14+ apiVersion : networking.k8s.io/v1
15+ kind : NetworkPolicy
16+ metadata :
17+ name : {{ include "provider.fullname" . }}-allow-service-traffic
18+ labels :
19+ {{- include "provider.labels" . | nindent 4 }}
20+ spec :
21+ podSelector :
22+ matchLabels :
23+ {{- include "provider.selectorLabels" . | nindent 6 }}
24+ policyTypes :
25+ - Ingress
26+ ingress :
27+ - ports :
28+ - port : {{ .Values.service.port | default 50051 }}
29+ protocol : TCP
30+
Original file line number Diff line number Diff line change @@ -33,7 +33,21 @@ type kwokProviderServer struct {
3333
3434func (s * kwokProviderServer ) SendRebootSignal (ctx context.Context , req * cspv1alpha1.SendRebootSignalRequest ) (* cspv1alpha1.SendRebootSignalResponse , error ) {
3535 slog .Info ("Sending reboot signal" , "node" , req .NodeName )
36- return nil , status .Errorf (codes .Unimplemented , "method SendRebootSignal not implemented" )
36+ return & cspv1alpha1.SendRebootSignalResponse {
37+ RequestId : "1234567890" ,
38+ }, nil
39+ }
40+
41+ func (s * kwokProviderServer ) IsNodeReady (ctx context.Context , req * cspv1alpha1.IsNodeReadyRequest ) (* cspv1alpha1.IsNodeReadyResponse , error ) {
42+ slog .Info ("Checking if node is ready" , "node" , req .NodeName )
43+ return & cspv1alpha1.IsNodeReadyResponse {
44+ IsReady : true ,
45+ }, nil
46+ }
47+
48+ func (s * kwokProviderServer ) SendTerminateSignal (ctx context.Context , req * cspv1alpha1.SendTerminateSignalRequest ) (* cspv1alpha1.SendTerminateSignalResponse , error ) {
49+ slog .Info ("Sending terminate signal" , "node" , req .NodeName )
50+ return nil , status .Errorf (codes .Unimplemented , "method SendTerminateSignal not implemented" )
3751}
3852
3953func main () {
You can’t perform that action at this time.
0 commit comments