add dry-run annotation (#1933)

This commit is contained in:
Yangmin Zhu 2021-03-31 16:20:43 -07:00 committed by GitHub
parent 8cb7ec8d3d
commit e3f75bd8b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 29 additions and 2 deletions

View File

@ -28,6 +28,7 @@ type ResourceTypes int
const (
Unknown ResourceTypes = iota
Any
AuthorizationPolicy
Ingress
Pod
Service
@ -38,10 +39,12 @@ func (r ResourceTypes) String() string {
case 1:
return "Any"
case 2:
return "Ingress"
return "AuthorizationPolicy"
case 3:
return "Pod"
return "Ingress"
case 4:
return "Pod"
case 5:
return "Service"
}
return "Unknown"
@ -158,6 +161,18 @@ var (
},
}
IoIstioDryRun = Instance {
Name: "istio.io/dry-run",
Description: "Specifies whether or not the given resource is in dry-run "+
"mode.",
FeatureStatus: Alpha,
Hidden: true,
Deprecated: false,
Resources: []ResourceTypes{
AuthorizationPolicy,
},
}
IoKubernetesIngressClass = Instance {
Name: "kubernetes.io/ingress.class",
Description: "Annotation on an Ingress resources denoting the class of "+
@ -613,6 +628,7 @@ func AllResourceAnnotations() []*Instance {
&OperatorInstallChartOwner,
&OperatorInstallOwnerGeneration,
&OperatorInstallVersion,
&IoIstioDryRun,
&IoKubernetesIngressClass,
&NetworkingExportTo,
&PrometheusMergeMetrics,
@ -655,6 +671,7 @@ func AllResourceAnnotations() []*Instance {
func AllResourceTypes() []string {
return []string {
"Any",
"AuthorizationPolicy",
"Ingress",
"Pod",
"Service",

View File

@ -79,6 +79,8 @@ Istio supports to control its behavior.
<tr>

View File

@ -392,3 +392,11 @@ annotations:
hidden: false
resources:
- Pod
- name: istio.io/dry-run
featureStatus: Alpha
description: Specifies whether or not the given resource is in dry-run mode.
deprecated: false
hidden: true
resources:
- AuthorizationPolicy