From 3a2dea86e549361afffaa420e889965e0693288f Mon Sep 17 00:00:00 2001 From: zhlsunshine Date: Thu, 3 Mar 2022 13:49:53 +0800 Subject: [PATCH 1/3] add istio_feature.proto for feature https://docs.google.com/document/d/1ZcTIdHYNnLpwgLJa8tWg0YwsyHAmc_4lXguLmMQvAj0/edit?resourcekey=0-6OWzJ5cnlh_oYl4gFMbOuA#heading=h.xw1gqgyqs5b --- .../istio.io/extensions/istio_feature.proto | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 common-protos/istio.io/extensions/istio_feature.proto diff --git a/common-protos/istio.io/extensions/istio_feature.proto b/common-protos/istio.io/extensions/istio_feature.proto new file mode 100644 index 00000000..7a09e35a --- /dev/null +++ b/common-protos/istio.io/extensions/istio_feature.proto @@ -0,0 +1,48 @@ +// Copyright 2019 Istio 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. + +syntax = "proto3"; + +package istio.extensions; + +option go_package="istio.io/api/istio.io/extensions"; + +import "google/protobuf/descriptor.proto"; + +// Values applied at the field level +extend google.protobuf.FieldOptions { + // the reason why is 2022 is that this PR may be merged in this year ^_^ + IstioFeature feature = 2022; +} + +enum FeatureStatus { + UNSET = 0; + ALPHA = 1; + BETA = 2; + STABLE = 3; + EXPERIMENTAL = 4; +} + +// These options should be used during schema definition, applying them to some of the fields in protobuf +// Below are 1 related repo and 1 PR for this repo: +// Repo: https://github.com/istio/enhancements +// Repo PR: https://github.com/istio/enhancements/pull/88 +message IstioFeature { + // label the feature's status, available status values may be alpha, beta and stable + // there would be experimental in future. + FeatureStatus status = 1; + // id means the feature id which can be mapped here: https://github.com/istio/enhancements/blob/master/features.yaml + // it should be contained in id section of features under this yaml file. + string id = 2; +} From 83a72e6060a29b500411e9607b51d698d1f8856b Mon Sep 17 00:00:00 2001 From: zhlsunshine Date: Tue, 15 Mar 2022 11:00:41 +0800 Subject: [PATCH 2/3] remove the year for copyright author --- common-protos/istio.io/extensions/istio_feature.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common-protos/istio.io/extensions/istio_feature.proto b/common-protos/istio.io/extensions/istio_feature.proto index 7a09e35a..66dcbc7b 100644 --- a/common-protos/istio.io/extensions/istio_feature.proto +++ b/common-protos/istio.io/extensions/istio_feature.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Istio Authors +// Copyright The Istio Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. From 432ad4c47808dec8a7de0765766e51999affb599 Mon Sep 17 00:00:00 2001 From: zhlsunshine Date: Wed, 16 Mar 2022 16:10:39 +0800 Subject: [PATCH 3/3] decorate IstioFeature fields with repeated --- common-protos/istio.io/extensions/istio_feature.proto | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common-protos/istio.io/extensions/istio_feature.proto b/common-protos/istio.io/extensions/istio_feature.proto index 66dcbc7b..9ae267e7 100644 --- a/common-protos/istio.io/extensions/istio_feature.proto +++ b/common-protos/istio.io/extensions/istio_feature.proto @@ -22,7 +22,7 @@ import "google/protobuf/descriptor.proto"; // Values applied at the field level extend google.protobuf.FieldOptions { - // the reason why is 2022 is that this PR may be merged in this year ^_^ + // the reason why is 2022 is that this PR may be merged in this year ^_^ IstioFeature feature = 2022; } @@ -41,8 +41,8 @@ enum FeatureStatus { message IstioFeature { // label the feature's status, available status values may be alpha, beta and stable // there would be experimental in future. - FeatureStatus status = 1; + repeated FeatureStatus status = 1; // id means the feature id which can be mapped here: https://github.com/istio/enhancements/blob/master/features.yaml // it should be contained in id section of features under this yaml file. - string id = 2; + repeated string id = 2; }