mirror of
https://github.com/kubernetes-sigs/node-feature-discovery.git
synced 2025-03-06 08:47:04 +00:00
Drop protobuf definitions and protobuf code generation
Unused after the gRPC API was removed.
This commit is contained in:
parent
0188aade60
commit
3fb617beec
6 changed files with 10 additions and 2160 deletions
|
@ -5,18 +5,7 @@ FROM ${BUILDER_IMAGE} as builder
|
|||
RUN --mount=type=cache,target=/go/pkg/mod/ \
|
||||
go install github.com/vektra/mockery/v2@v2.42.0 && \
|
||||
go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.16.3 && \
|
||||
go install golang.org/x/tools/cmd/goimports@v0.25.0 && \
|
||||
go install github.com/golang/protobuf/protoc-gen-go@v1.4.3
|
||||
|
||||
RUN apt-get update && apt-get install unzip
|
||||
|
||||
RUN curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v25.3/protoc-25.3-linux-x86_64.zip && \
|
||||
unzip protoc-25.3-linux-x86_64.zip -d /usr/local && \
|
||||
rm protoc-25.3-linux-x86_64.zip && \
|
||||
chmod a+x /usr/local/bin/protoc && \
|
||||
find /usr/local -type d | xargs chmod 755 && \
|
||||
find /usr/local -type f | xargs chmod a+r
|
||||
|
||||
go install golang.org/x/tools/cmd/goimports@v0.25.0
|
||||
|
||||
# Expect to be working with nfd
|
||||
WORKDIR /go/node-feature-discovery
|
||||
|
|
|
@ -19,5 +19,3 @@ limitations under the License.
|
|||
// +kubebuilder:object:generate=true
|
||||
// +groupName=nfd.k8s-sigs.io
|
||||
package v1alpha1
|
||||
|
||||
//go:generate ./generate.sh
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
#!/bin/sh -ex
|
||||
|
||||
go-to-protobuf \
|
||||
--output-base=. \
|
||||
--go-header-file ../../../../hack/boilerplate.go.txt \
|
||||
--proto-import ../../../../vendor/ \
|
||||
--packages +sigs.k8s.io/node-feature-discovery/pkg/apis/nfd/v1alpha1=v1alpha1 \
|
||||
--keep-gogoproto=false \
|
||||
--apimachinery-packages "-k8s.io/apimachinery/pkg/util/intstr"
|
||||
|
||||
mv sigs.k8s.io/node-feature-discovery/pkg/apis/nfd/v1alpha1/* .
|
||||
rm -rf sigs.k8s.io
|
File diff suppressed because it is too large
Load diff
|
@ -1,77 +0,0 @@
|
|||
/*
|
||||
Copyright 2024 The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
// This file was autogenerated by go-to-protobuf. Do not edit it manually!
|
||||
|
||||
syntax = "proto2";
|
||||
|
||||
package v1alpha1;
|
||||
|
||||
// Package-wide variables from generator "generated".
|
||||
option go_package = "sigs.k8s.io/node-feature-discovery/api/nfd/v1alpha1";
|
||||
|
||||
// AttributeFeatureSet is a set of features having string value.
|
||||
//
|
||||
// +protobuf=true
|
||||
message AttributeFeatureSet {
|
||||
map<string, string> elements = 1;
|
||||
}
|
||||
|
||||
// Features is the collection of all discovered features.
|
||||
//
|
||||
// +protobuf=true
|
||||
message Features {
|
||||
// Flags contains all the flag-type features of the node.
|
||||
// +optional
|
||||
map<string, FlagFeatureSet> flags = 1;
|
||||
|
||||
// Attributes contains all the attribute-type features of the node.
|
||||
// +optional
|
||||
map<string, AttributeFeatureSet> vattributes = 2;
|
||||
|
||||
// Instances contains all the instance-type features of the node.
|
||||
// +optional
|
||||
map<string, InstanceFeatureSet> instances = 3;
|
||||
}
|
||||
|
||||
// FlagFeatureSet is a set of simple features only containing names without values.
|
||||
//
|
||||
// +protobuf=true
|
||||
message FlagFeatureSet {
|
||||
map<string, Nil> elements = 1;
|
||||
}
|
||||
|
||||
// InstanceFeature represents one instance of a complex features, e.g. a device.
|
||||
//
|
||||
// +protobuf=true
|
||||
message InstanceFeature {
|
||||
map<string, string> attributes = 1;
|
||||
}
|
||||
|
||||
// InstanceFeatureSet is a set of features each of which is an instance having multiple attributes.
|
||||
//
|
||||
// +protobuf=true
|
||||
message InstanceFeatureSet {
|
||||
repeated InstanceFeature elements = 1;
|
||||
}
|
||||
|
||||
// Nil is a dummy empty struct for protobuf compatibility
|
||||
//
|
||||
// +protobuf=true
|
||||
message Nil {
|
||||
}
|
||||
|
|
@ -56,55 +56,44 @@ type NodeFeatureSpec struct {
|
|||
}
|
||||
|
||||
// Features is the collection of all discovered features.
|
||||
//
|
||||
// +protobuf=true
|
||||
type Features struct {
|
||||
// Flags contains all the flag-type features of the node.
|
||||
// +optional
|
||||
Flags map[string]FlagFeatureSet `json:"flags" protobuf:"bytes,1,rep,name=flags"`
|
||||
Flags map[string]FlagFeatureSet `json:"flags"`
|
||||
// Attributes contains all the attribute-type features of the node.
|
||||
// +optional
|
||||
Attributes map[string]AttributeFeatureSet `json:"attributes" protobuf:"bytes,2,rep,name=vattributes"`
|
||||
Attributes map[string]AttributeFeatureSet `json:"attributes"`
|
||||
// Instances contains all the instance-type features of the node.
|
||||
// +optional
|
||||
Instances map[string]InstanceFeatureSet `json:"instances" protobuf:"bytes,3,rep,name=instances"`
|
||||
Instances map[string]InstanceFeatureSet `json:"instances"`
|
||||
}
|
||||
|
||||
// FlagFeatureSet is a set of simple features only containing names without values.
|
||||
//
|
||||
// +protobuf=true
|
||||
type FlagFeatureSet struct {
|
||||
// Individual features of the feature set.
|
||||
Elements map[string]Nil `json:"elements" protobuf:"bytes,1,rep,name=elements"`
|
||||
Elements map[string]Nil `json:"elements"`
|
||||
}
|
||||
|
||||
// AttributeFeatureSet is a set of features having string value.
|
||||
//
|
||||
// +protobuf=true
|
||||
type AttributeFeatureSet struct {
|
||||
// Individual features of the feature set.
|
||||
Elements map[string]string `json:"elements" protobuf:"bytes,1,rep,name=elements"`
|
||||
Elements map[string]string `json:"elements"`
|
||||
}
|
||||
|
||||
// InstanceFeatureSet is a set of features each of which is an instance having multiple attributes.
|
||||
//
|
||||
// +protobuf=true
|
||||
type InstanceFeatureSet struct {
|
||||
// Individual features of the feature set.
|
||||
Elements []InstanceFeature `json:"elements" protobuf:"bytes,1,rep,name=elements"`
|
||||
Elements []InstanceFeature `json:"elements"`
|
||||
}
|
||||
|
||||
// InstanceFeature represents one instance of a complex features, e.g. a device.
|
||||
//
|
||||
// +protobuf=true
|
||||
type InstanceFeature struct {
|
||||
// Attributes of the instance feature.
|
||||
Attributes map[string]string `json:"attributes" protobuf:"bytes,1,rep,name=attributes"`
|
||||
Attributes map[string]string `json:"attributes"`
|
||||
}
|
||||
|
||||
// Nil is a dummy empty struct for protobuf compatibility
|
||||
//
|
||||
// +protobuf=true
|
||||
// Nil is a dummy empty struct for protobuf compatibility.
|
||||
// NOTE: protobuf definitions have been removed but this is kept for API compatibility.
|
||||
type Nil struct{}
|
||||
|
||||
// NodeFeatureRuleList contains a list of NodeFeatureRule objects.
|
||||
|
|
Loading…
Add table
Reference in a new issue