From c8a4c475ac6e236c1c295fba40cbbaa138eb7813 Mon Sep 17 00:00:00 2001 From: Daniel Grimm Date: Tue, 13 Apr 2021 14:18:37 +0200 Subject: [PATCH] Improve comments --- extensions/v1alpha1/wasm.gen.json | 8 ++++---- extensions/v1alpha1/wasm.pb.go | 12 +++++++++-- extensions/v1alpha1/wasm.pb.html | 20 +++++++++++++------ extensions/v1alpha1/wasm.proto | 12 +++++++++-- kubernetes/customresourcedefinitions.gen.yaml | 8 +++++--- 5 files changed, 43 insertions(+), 17 deletions(-) diff --git a/extensions/v1alpha1/wasm.gen.json b/extensions/v1alpha1/wasm.gen.json index cf85e470f8..c1088a2c8b 100644 --- a/extensions/v1alpha1/wasm.gen.json +++ b/extensions/v1alpha1/wasm.gen.json @@ -23,12 +23,12 @@ "format": "string" }, "imagePullPolicy": { - "description": "Can be one of `IfNotPresent`, `Always`. Only relevant when images are referenced by tag. If set to `Always`, istiod will always pull the latest version of an image when applying this `WasmExtension.` If set to `IfNotPresent`, istiod will use an existing version of an image if it has been pulled before. If not, it will pull the latest version.", + "description": "The pull behaviour to be applied when fetching the `image`. Can be one of `IfNotPresent`, `Always`. Only relevant when images are referenced by tag. If set to `Always`, istiod will always pull the latest version of an image when applying this `WasmExtension.` If set to `IfNotPresent`, istiod will use an existing version of an image if it has been pulled before. If not, it will pull the latest version.", "type": "string", "format": "string" }, "imagePullSecrets": { - "description": "List of K8s Secrets that contain docker pull secrets which are to be used to authenticate against the registry when pulling the image. If the name contains a forward-slash, it will be interpreted as \u003cnamespace\u003e/\u003cname\u003e.", + "description": "Credentials to use for image pulling. List of K8s Secrets that contain docker pull secrets which are to be used to authenticate against the registry when pulling the image. If the name contains a forward-slash, it will be interpreted as \u003cnamespace\u003e/\u003cname\u003e. Names that do not contain forward-slashes are interpreted as the names of secrets in the same namespace as the `WasmExtension`.", "type": "array", "items": { "type": "string", @@ -39,14 +39,14 @@ "$ref": "#/components/schemas/istio.networking.v1alpha3.EnvoyFilter.Patch.FilterClass" }, "priority": { - "description": "When multiple `WasmExtensions` are applied to the same workload in the same `phase`, they will be applied by priority, in descending order.", + "description": "Determines ordering of `WasmExtensions` in the same `phase`. When multiple `WasmExtensions` are applied to the same workload in the same `phase`, they will be applied by priority, in descending order. If `priority` is not set, or two `WasmExtensions` exist with the same value, the ordering will be deterministically derived from name and namespace of the `WasmExtensions`.", "type": "integer", "nullable": true } } }, "istio.networking.v1alpha3.EnvoyFilter.Patch.FilterClass": { - "description": "Determines in the filter chain this `WasmExtension` is to be injected.", + "description": "Determines where in the filter chain this `WasmExtension` is to be injected.", "type": "string", "enum": [ "UNSPECIFIED", diff --git a/extensions/v1alpha1/wasm.pb.go b/extensions/v1alpha1/wasm.pb.go index 01d4f31afd..10b9d703d2 100644 --- a/extensions/v1alpha1/wasm.pb.go +++ b/extensions/v1alpha1/wasm.pb.go @@ -51,6 +51,7 @@ type WasmExtension struct { Config *types.Struct `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"` // URL of a compatible OCI image. Image string `protobuf:"bytes,2,opt,name=image,proto3" json:"image,omitempty"` + // The pull behaviour to be applied when fetching the `image`. // Can be one of `IfNotPresent`, `Always`. Only relevant when images // are referenced by tag. // If set to `Always`, istiod will always pull the latest version of @@ -59,10 +60,13 @@ type WasmExtension struct { // an image if it has been pulled before. If not, it will pull the // latest version. ImagePullPolicy string `protobuf:"bytes,3,opt,name=image_pull_policy,json=imagePullPolicy,proto3" json:"image_pull_policy,omitempty"` + // Credentials to use for image pulling. // List of K8s Secrets that contain docker pull secrets which are to // be used to authenticate against the registry when pulling the image. // If the name contains a forward-slash, it will be interpreted as - // /. + // /. Names that do not contain forward-slashes are + // interpreted as the names of secrets in the same namespace as the + // `WasmExtension`. ImagePullSecrets []string `protobuf:"bytes,4,rep,name=image_pull_secrets,json=imagePullSecrets,proto3" json:"image_pull_secrets,omitempty"` // Criteria used to select the specific set of pods/VMs on which // this Extension configuration should be applied. If omitted, this @@ -72,10 +76,14 @@ type WasmExtension struct { // present in the config root namespace, it will be applied to all // applicable workloads in any namespace. WorkloadSelector *v1beta1.WorkloadSelector `protobuf:"bytes,5,opt,name=workload_selector,json=workloadSelector,proto3" json:"workload_selector,omitempty"` - // Determines in the filter chain this `WasmExtension` is to be injected. + // Determines where in the filter chain this `WasmExtension` is to be injected. Phase v1alpha3.EnvoyFilter_Patch_FilterClass `protobuf:"varint,6,opt,name=phase,proto3,enum=istio.networking.v1alpha3.EnvoyFilter_Patch_FilterClass" json:"phase,omitempty"` + // Determines ordering of `WasmExtensions` in the same `phase`. // When multiple `WasmExtensions` are applied to the same workload in the // same `phase`, they will be applied by priority, in descending order. + // If `priority` is not set, or two `WasmExtensions` exist with the same + // value, the ordering will be deterministically derived from name and + // namespace of the `WasmExtensions`. Priority *types.Int64Value `protobuf:"bytes,7,opt,name=priority,proto3" json:"priority,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` diff --git a/extensions/v1alpha1/wasm.pb.html b/extensions/v1alpha1/wasm.pb.html index 54dc40df7d..e6eb705688 100644 --- a/extensions/v1alpha1/wasm.pb.html +++ b/extensions/v1alpha1/wasm.pb.html @@ -45,7 +45,8 @@

WasmExtension

imagePullPolicy string -

Can be one of IfNotPresent, Always. Only relevant when images +

The pull behaviour to be applied when fetching the image. +Can be one of IfNotPresent, Always. Only relevant when images are referenced by tag. If set to Always, istiod will always pull the latest version of an image when applying this WasmExtension. @@ -62,10 +63,13 @@

WasmExtension

imagePullSecrets string[] -

List of K8s Secrets that contain docker pull secrets which are to +

Credentials to use for image pulling. +List of K8s Secrets that contain docker pull secrets which are to be used to authenticate against the registry when pulling the image. If the name contains a forward-slash, it will be interpreted as -/.

+/. Names that do not contain forward-slashes are +interpreted as the names of secrets in the same namespace as the +WasmExtension.

@@ -93,7 +97,7 @@

WasmExtension

phase FilterClass -

Determines in the filter chain this WasmExtension is to be injected.

+

Determines where in the filter chain this WasmExtension is to be injected.

@@ -104,8 +108,12 @@

WasmExtension

priority Int64Value -

When multiple WasmExtensions are applied to the same workload in the -same phase, they will be applied by priority, in descending order.

+

Determines ordering of WasmExtensions in the same phase. +When multiple WasmExtensions are applied to the same workload in the +same phase, they will be applied by priority, in descending order. +If priority is not set, or two WasmExtensions exist with the same +value, the ordering will be deterministically derived from name and +namespace of the WasmExtensions.

diff --git a/extensions/v1alpha1/wasm.proto b/extensions/v1alpha1/wasm.proto index 80184a4592..06aa249969 100644 --- a/extensions/v1alpha1/wasm.proto +++ b/extensions/v1alpha1/wasm.proto @@ -51,6 +51,7 @@ message WasmExtension { // URL of a compatible OCI image. string image = 2; + // The pull behaviour to be applied when fetching the `image`. // Can be one of `IfNotPresent`, `Always`. Only relevant when images // are referenced by tag. // If set to `Always`, istiod will always pull the latest version of @@ -60,10 +61,13 @@ message WasmExtension { // latest version. string image_pull_policy = 3; + // Credentials to use for image pulling. // List of K8s Secrets that contain docker pull secrets which are to // be used to authenticate against the registry when pulling the image. // If the name contains a forward-slash, it will be interpreted as - // /. + // /. Names that do not contain forward-slashes are + // interpreted as the names of secrets in the same namespace as the + // `WasmExtension`. repeated string image_pull_secrets = 4; // Criteria used to select the specific set of pods/VMs on which @@ -75,10 +79,14 @@ message WasmExtension { // applicable workloads in any namespace. istio.type.v1beta1.WorkloadSelector workload_selector = 5; - // Determines in the filter chain this `WasmExtension` is to be injected. + // Determines where in the filter chain this `WasmExtension` is to be injected. istio.networking.v1alpha3.EnvoyFilter.Patch.FilterClass phase = 6; + // Determines ordering of `WasmExtensions` in the same `phase`. // When multiple `WasmExtensions` are applied to the same workload in the // same `phase`, they will be applied by priority, in descending order. + // If `priority` is not set, or two `WasmExtensions` exist with the same + // value, the ordering will be deterministically derived from name and + // namespace of the `WasmExtensions`. google.protobuf.Int64Value priority = 7; } diff --git a/kubernetes/customresourcedefinitions.gen.yaml b/kubernetes/customresourcedefinitions.gen.yaml index a87faab29f..f88bf49adb 100644 --- a/kubernetes/customresourcedefinitions.gen.yaml +++ b/kubernetes/customresourcedefinitions.gen.yaml @@ -37,17 +37,18 @@ spec: format: string type: string imagePullPolicy: - description: Can be one of `IfNotPresent`, `Always`. + description: The pull behaviour to be applied when fetching the `image`. format: string type: string imagePullSecrets: + description: Credentials to use for image pulling. items: format: string type: string type: array phase: - description: Determines in the filter chain this `WasmExtension` is - to be injected. + description: Determines where in the filter chain this `WasmExtension` + is to be injected. enum: - UNSPECIFIED - AUTHN @@ -56,6 +57,7 @@ spec: - ROUTER type: string priority: + description: Determines ordering of `WasmExtensions` in the same `phase`. nullable: true type: integer workloadSelector: