istio.io/istio@v0.0.0-20240520182934-d79c90f27776/pkg/config/analysis/msg/messages.gen.go (about)

     1  // Code generated by generate.main.go. DO NOT EDIT.
     2  
     3  package msg
     4  
     5  import (
     6  	"istio.io/istio/pkg/config/analysis/diag"
     7  	"istio.io/istio/pkg/config/resource"
     8  )
     9  
    10  var (
    11  	// InternalError defines a diag.MessageType for message "InternalError".
    12  	// Description: There was an internal error in the toolchain. This is almost always a bug in the implementation.
    13  	InternalError = diag.NewMessageType(diag.Error, "IST0001", "Internal error: %v")
    14  
    15  	// Deprecated defines a diag.MessageType for message "Deprecated".
    16  	// Description: A feature that the configuration is depending on is now deprecated.
    17  	Deprecated = diag.NewMessageType(diag.Warning, "IST0002", "Deprecated: %s")
    18  
    19  	// ReferencedResourceNotFound defines a diag.MessageType for message "ReferencedResourceNotFound".
    20  	// Description: A resource being referenced does not exist.
    21  	ReferencedResourceNotFound = diag.NewMessageType(diag.Error, "IST0101", "Referenced %s not found: %q")
    22  
    23  	// NamespaceNotInjected defines a diag.MessageType for message "NamespaceNotInjected".
    24  	// Description: A namespace is not enabled for Istio injection.
    25  	NamespaceNotInjected = diag.NewMessageType(diag.Info, "IST0102", "The namespace is not enabled for Istio injection. Run 'kubectl label namespace %s istio-injection=enabled' to enable it, or 'kubectl label namespace %s istio-injection=disabled' to explicitly mark it as not needing injection.")
    26  
    27  	// PodMissingProxy defines a diag.MessageType for message "PodMissingProxy".
    28  	// Description: A pod is missing the Istio proxy.
    29  	PodMissingProxy = diag.NewMessageType(diag.Warning, "IST0103", "The pod %s is missing the Istio proxy. This can often be resolved by restarting or redeploying the workload.")
    30  
    31  	// SchemaValidationError defines a diag.MessageType for message "SchemaValidationError".
    32  	// Description: The resource has a schema validation error.
    33  	SchemaValidationError = diag.NewMessageType(diag.Error, "IST0106", "Schema validation error: %v")
    34  
    35  	// MisplacedAnnotation defines a diag.MessageType for message "MisplacedAnnotation".
    36  	// Description: An Istio annotation is applied to the wrong kind of resource.
    37  	MisplacedAnnotation = diag.NewMessageType(diag.Warning, "IST0107", "Misplaced annotation: %s can only be applied to %s")
    38  
    39  	// UnknownAnnotation defines a diag.MessageType for message "UnknownAnnotation".
    40  	// Description: An Istio annotation is not recognized for any kind of resource
    41  	UnknownAnnotation = diag.NewMessageType(diag.Warning, "IST0108", "Unknown annotation: %s")
    42  
    43  	// ConflictingMeshGatewayVirtualServiceHosts defines a diag.MessageType for message "ConflictingMeshGatewayVirtualServiceHosts".
    44  	// Description: Conflicting hosts on VirtualServices associated with mesh gateway
    45  	ConflictingMeshGatewayVirtualServiceHosts = diag.NewMessageType(diag.Error, "IST0109", "The VirtualServices %s associated with mesh gateway define the same host %s which can lead to undefined behavior. This can be fixed by merging the conflicting VirtualServices into a single resource.")
    46  
    47  	// ConflictingSidecarWorkloadSelectors defines a diag.MessageType for message "ConflictingSidecarWorkloadSelectors".
    48  	// Description: A Sidecar resource selects the same workloads as another Sidecar resource
    49  	ConflictingSidecarWorkloadSelectors = diag.NewMessageType(diag.Error, "IST0110", "The Sidecars %v in namespace %q select the same workload pod %q, which can lead to undefined behavior.")
    50  
    51  	// MultipleSidecarsWithoutWorkloadSelectors defines a diag.MessageType for message "MultipleSidecarsWithoutWorkloadSelectors".
    52  	// Description: More than one sidecar resource in a namespace has no workload selector
    53  	MultipleSidecarsWithoutWorkloadSelectors = diag.NewMessageType(diag.Error, "IST0111", "The Sidecars %v in namespace %q have no workload selector, which can lead to undefined behavior.")
    54  
    55  	// VirtualServiceDestinationPortSelectorRequired defines a diag.MessageType for message "VirtualServiceDestinationPortSelectorRequired".
    56  	// Description: A VirtualService routes to a service with more than one port exposed, but does not specify which to use.
    57  	VirtualServiceDestinationPortSelectorRequired = diag.NewMessageType(diag.Error, "IST0112", "This VirtualService routes to a service %q that exposes multiple ports %v. Specifying a port in the destination is required to disambiguate.")
    58  
    59  	// DeploymentAssociatedToMultipleServices defines a diag.MessageType for message "DeploymentAssociatedToMultipleServices".
    60  	// Description: The resulting pods of a service mesh deployment can't be associated with multiple services using the same port but different protocols.
    61  	DeploymentAssociatedToMultipleServices = diag.NewMessageType(diag.Warning, "IST0116", "This deployment %s is associated with multiple services using port %d but different protocols: %v")
    62  
    63  	// PortNameIsNotUnderNamingConvention defines a diag.MessageType for message "PortNameIsNotUnderNamingConvention".
    64  	// Description: Port name is not under naming convention. Protocol detection is applied to the port.
    65  	PortNameIsNotUnderNamingConvention = diag.NewMessageType(diag.Info, "IST0118", "Port name %s (port: %d, targetPort: %s) doesn't follow the naming convention of Istio port.")
    66  
    67  	// InvalidRegexp defines a diag.MessageType for message "InvalidRegexp".
    68  	// Description: Invalid Regex
    69  	InvalidRegexp = diag.NewMessageType(diag.Warning, "IST0122", "Field %q regular expression invalid: %q (%s)")
    70  
    71  	// NamespaceMultipleInjectionLabels defines a diag.MessageType for message "NamespaceMultipleInjectionLabels".
    72  	// Description: A namespace has more than one type of injection labels
    73  	NamespaceMultipleInjectionLabels = diag.NewMessageType(diag.Warning, "IST0123", "The namespace has more than one type of injection labels %v, which may lead to undefined behavior. Make sure only one injection label exists.")
    74  
    75  	// InvalidAnnotation defines a diag.MessageType for message "InvalidAnnotation".
    76  	// Description: An Istio annotation that is not valid
    77  	InvalidAnnotation = diag.NewMessageType(diag.Warning, "IST0125", "Invalid annotation %s: %s")
    78  
    79  	// UnknownMeshNetworksServiceRegistry defines a diag.MessageType for message "UnknownMeshNetworksServiceRegistry".
    80  	// Description: A service registry in Mesh Networks is unknown
    81  	UnknownMeshNetworksServiceRegistry = diag.NewMessageType(diag.Error, "IST0126", "Unknown service registry %s in network %s")
    82  
    83  	// NoMatchingWorkloadsFound defines a diag.MessageType for message "NoMatchingWorkloadsFound".
    84  	// Description: There aren't workloads matching the resource labels
    85  	NoMatchingWorkloadsFound = diag.NewMessageType(diag.Warning, "IST0127", "No matching workloads for this resource with the following labels: %s")
    86  
    87  	// NoServerCertificateVerificationDestinationLevel defines a diag.MessageType for message "NoServerCertificateVerificationDestinationLevel".
    88  	// Description: No caCertificates are set in DestinationRule, this results in no verification of presented server certificate.
    89  	NoServerCertificateVerificationDestinationLevel = diag.NewMessageType(diag.Warning, "IST0128", "DestinationRule %s in namespace %s has TLS mode set to %s but no caCertificates are set to validate server identity for host: %s")
    90  
    91  	// NoServerCertificateVerificationPortLevel defines a diag.MessageType for message "NoServerCertificateVerificationPortLevel".
    92  	// Description: No caCertificates are set in DestinationRule, this results in no verification of presented server certificate for traffic to a given port.
    93  	NoServerCertificateVerificationPortLevel = diag.NewMessageType(diag.Warning, "IST0129", "DestinationRule %s in namespace %s has TLS mode set to %s but no caCertificates are set to validate server identity for host: %s at port %s")
    94  
    95  	// VirtualServiceUnreachableRule defines a diag.MessageType for message "VirtualServiceUnreachableRule".
    96  	// Description: A VirtualService rule will never be used because a previous rule uses the same match.
    97  	VirtualServiceUnreachableRule = diag.NewMessageType(diag.Warning, "IST0130", "VirtualService rule %v not used (%s).")
    98  
    99  	// VirtualServiceIneffectiveMatch defines a diag.MessageType for message "VirtualServiceIneffectiveMatch".
   100  	// Description: A VirtualService rule match duplicates a match in a previous rule.
   101  	VirtualServiceIneffectiveMatch = diag.NewMessageType(diag.Info, "IST0131", "VirtualService rule %v match %v is not used (duplicate/overlapping match in rule %v).")
   102  
   103  	// VirtualServiceHostNotFoundInGateway defines a diag.MessageType for message "VirtualServiceHostNotFoundInGateway".
   104  	// Description: Host defined in VirtualService not found in Gateway.
   105  	VirtualServiceHostNotFoundInGateway = diag.NewMessageType(diag.Warning, "IST0132", "one or more host %v defined in VirtualService %s not found in Gateway %s.")
   106  
   107  	// SchemaWarning defines a diag.MessageType for message "SchemaWarning".
   108  	// Description: The resource has a schema validation warning.
   109  	SchemaWarning = diag.NewMessageType(diag.Warning, "IST0133", "Schema validation warning: %v")
   110  
   111  	// ServiceEntryAddressesRequired defines a diag.MessageType for message "ServiceEntryAddressesRequired".
   112  	// Description: Virtual IP addresses are required for ports serving TCP (or unset) protocol when ISTIO_META_DNS_AUTO_ALLOCATE is not set on a proxy
   113  	ServiceEntryAddressesRequired = diag.NewMessageType(diag.Warning, "IST0134", "ServiceEntry addresses are required for this protocol.")
   114  
   115  	// DeprecatedAnnotation defines a diag.MessageType for message "DeprecatedAnnotation".
   116  	// Description: A resource is using a deprecated Istio annotation.
   117  	DeprecatedAnnotation = diag.NewMessageType(diag.Info, "IST0135", "Annotation %q has been deprecated%s and may not work in future Istio versions.")
   118  
   119  	// AlphaAnnotation defines a diag.MessageType for message "AlphaAnnotation".
   120  	// Description: An Istio annotation may not be suitable for production.
   121  	AlphaAnnotation = diag.NewMessageType(diag.Info, "IST0136", "Annotation %q is part of an alpha-phase feature and may be incompletely supported.")
   122  
   123  	// DeploymentConflictingPorts defines a diag.MessageType for message "DeploymentConflictingPorts".
   124  	// Description: Two services selecting the same workload with the same targetPort MUST refer to the same port.
   125  	DeploymentConflictingPorts = diag.NewMessageType(diag.Warning, "IST0137", "This deployment %s is associated with multiple services %v using targetPort %q but different ports: %v.")
   126  
   127  	// GatewayDuplicateCertificate defines a diag.MessageType for message "GatewayDuplicateCertificate".
   128  	// Description: Duplicate certificate in multiple gateways may cause 404s if clients re-use HTTP2 connections.
   129  	GatewayDuplicateCertificate = diag.NewMessageType(diag.Warning, "IST0138", "Duplicate certificate in multiple gateways %v may cause 404s if clients re-use HTTP2 connections.")
   130  
   131  	// InvalidWebhook defines a diag.MessageType for message "InvalidWebhook".
   132  	// Description: Webhook is invalid or references a control plane service that does not exist.
   133  	InvalidWebhook = diag.NewMessageType(diag.Error, "IST0139", "%v")
   134  
   135  	// IngressRouteRulesNotAffected defines a diag.MessageType for message "IngressRouteRulesNotAffected".
   136  	// Description: Route rules have no effect on ingress gateway requests
   137  	IngressRouteRulesNotAffected = diag.NewMessageType(diag.Warning, "IST0140", "Subset in virtual service %s has no effect on ingress gateway %s requests")
   138  
   139  	// InsufficientPermissions defines a diag.MessageType for message "InsufficientPermissions".
   140  	// Description: Required permissions to install Istio are missing.
   141  	InsufficientPermissions = diag.NewMessageType(diag.Error, "IST0141", "Missing required permission to create resource %v (%v)")
   142  
   143  	// UnsupportedKubernetesVersion defines a diag.MessageType for message "UnsupportedKubernetesVersion".
   144  	// Description: The Kubernetes version is not supported
   145  	UnsupportedKubernetesVersion = diag.NewMessageType(diag.Error, "IST0142", "The Kubernetes Version %q is lower than the minimum version: %v")
   146  
   147  	// LocalhostListener defines a diag.MessageType for message "LocalhostListener".
   148  	// Description: A port exposed in a Service is bound to a localhost address
   149  	LocalhostListener = diag.NewMessageType(diag.Error, "IST0143", "Port %v is exposed in a Service but listens on localhost. It will not be exposed to other pods.")
   150  
   151  	// InvalidApplicationUID defines a diag.MessageType for message "InvalidApplicationUID".
   152  	// Description: Application pods should not run as user ID (UID) 1337
   153  	InvalidApplicationUID = diag.NewMessageType(diag.Warning, "IST0144", "User ID (UID) 1337 is reserved for the sidecar proxy.")
   154  
   155  	// ConflictingGateways defines a diag.MessageType for message "ConflictingGateways".
   156  	// Description: Gateway should not have the same selector, port and matched hosts of server
   157  	ConflictingGateways = diag.NewMessageType(diag.Error, "IST0145", "Conflict with gateways %s (workload selector %s, port %s, hosts %v).")
   158  
   159  	// ImageAutoWithoutInjectionWarning defines a diag.MessageType for message "ImageAutoWithoutInjectionWarning".
   160  	// Description: Deployments with `image: auto` should be targeted for injection.
   161  	ImageAutoWithoutInjectionWarning = diag.NewMessageType(diag.Warning, "IST0146", "%s %s contains `image: auto` but does not match any Istio injection webhook selectors.")
   162  
   163  	// ImageAutoWithoutInjectionError defines a diag.MessageType for message "ImageAutoWithoutInjectionError".
   164  	// Description: Pods with `image: auto` should be targeted for injection.
   165  	ImageAutoWithoutInjectionError = diag.NewMessageType(diag.Error, "IST0147", "%s %s contains `image: auto` but does not match any Istio injection webhook selectors.")
   166  
   167  	// NamespaceInjectionEnabledByDefault defines a diag.MessageType for message "NamespaceInjectionEnabledByDefault".
   168  	// Description: user namespace should be injectable if Istio is installed with enableNamespacesByDefault enabled and neither injection label is set.
   169  	NamespaceInjectionEnabledByDefault = diag.NewMessageType(diag.Info, "IST0148", "is enabled for Istio injection, as Istio is installed with enableNamespacesByDefault as true.")
   170  
   171  	// JwtClaimBasedRoutingWithoutRequestAuthN defines a diag.MessageType for message "JwtClaimBasedRoutingWithoutRequestAuthN".
   172  	// Description: Virtual service using JWT claim based routing without request authentication.
   173  	JwtClaimBasedRoutingWithoutRequestAuthN = diag.NewMessageType(diag.Error, "IST0149", "The virtual service uses the JWT claim based routing (key: %s) but found no request authentication for the gateway (%s) pod (%s). The request authentication must first be applied for the gateway pods to validate the JWT token and make the claims available for routing.")
   174  
   175  	// ExternalNameServiceTypeInvalidPortName defines a diag.MessageType for message "ExternalNameServiceTypeInvalidPortName".
   176  	// Description: Proxy may prevent tcp named ports and unmatched traffic for ports serving TCP protocol from being forwarded correctly for ExternalName services.
   177  	ExternalNameServiceTypeInvalidPortName = diag.NewMessageType(diag.Warning, "IST0150", "Port name for ExternalName service is invalid. Proxy may prevent tcp named ports and unmatched traffic for ports serving TCP protocol from being forwarded correctly")
   178  
   179  	// EnvoyFilterUsesRelativeOperation defines a diag.MessageType for message "EnvoyFilterUsesRelativeOperation".
   180  	// Description: This EnvoyFilter does not have a priority and has a relative patch operation set which can cause the EnvoyFilter not to be applied. Using the INSERT_FIRST or ADD option or setting the priority may help in ensuring the EnvoyFilter is applied correctly.
   181  	EnvoyFilterUsesRelativeOperation = diag.NewMessageType(diag.Warning, "IST0151", "This EnvoyFilter does not have a priority and has a relative patch operation set which can cause the EnvoyFilter not to be applied. Using the INSERT_FIRST of ADD option or setting the priority may help in ensuring the EnvoyFilter is applied correctly.")
   182  
   183  	// EnvoyFilterUsesReplaceOperationIncorrectly defines a diag.MessageType for message "EnvoyFilterUsesReplaceOperationIncorrectly".
   184  	// Description: The REPLACE operation is only valid for HTTP_FILTER and NETWORK_FILTER.
   185  	EnvoyFilterUsesReplaceOperationIncorrectly = diag.NewMessageType(diag.Error, "IST0152", "The REPLACE operation is only valid for HTTP_FILTER and NETWORK_FILTER.")
   186  
   187  	// EnvoyFilterUsesAddOperationIncorrectly defines a diag.MessageType for message "EnvoyFilterUsesAddOperationIncorrectly".
   188  	// Description: The ADD operation will be ignored when applyTo is set to ROUTE_CONFIGURATION, or HTTP_ROUTE.
   189  	EnvoyFilterUsesAddOperationIncorrectly = diag.NewMessageType(diag.Error, "IST0153", "The ADD operation will be ignored when applyTo is set to ROUTE_CONFIGURATION, or HTTP_ROUTE.")
   190  
   191  	// EnvoyFilterUsesRemoveOperationIncorrectly defines a diag.MessageType for message "EnvoyFilterUsesRemoveOperationIncorrectly".
   192  	// Description: The REMOVE operation will be ignored when applyTo is set to ROUTE_CONFIGURATION, or HTTP_ROUTE.
   193  	EnvoyFilterUsesRemoveOperationIncorrectly = diag.NewMessageType(diag.Error, "IST0154", "The REMOVE operation will be ignored when applyTo is set to ROUTE_CONFIGURATION, or HTTP_ROUTE.")
   194  
   195  	// EnvoyFilterUsesRelativeOperationWithProxyVersion defines a diag.MessageType for message "EnvoyFilterUsesRelativeOperationWithProxyVersion".
   196  	// Description: This EnvoyFilter does not have a priority and has a relative patch operation (NSTERT_BEFORE/AFTER, REPLACE, MERGE, DELETE) and proxyVersion set which can cause the EnvoyFilter not to be applied during an upgrade. Using the INSERT_FIRST or ADD option or setting the priority may help in ensuring the EnvoyFilter is applied correctly.
   197  	EnvoyFilterUsesRelativeOperationWithProxyVersion = diag.NewMessageType(diag.Warning, "IST0155", "This EnvoyFilter does not have a priority and has a relative patch operation (NSTERT_BEFORE/AFTER, REPLACE, MERGE, DELETE) and proxyVersion set which can cause the EnvoyFilter not to be applied during an upgrade. Using the INSERT_FIRST or ADD option or setting the priority may help in ensuring the EnvoyFilter is applied correctly.")
   198  
   199  	// UnsupportedGatewayAPIVersion defines a diag.MessageType for message "UnsupportedGatewayAPIVersion".
   200  	// Description: The Gateway API CRD version is not supported
   201  	UnsupportedGatewayAPIVersion = diag.NewMessageType(diag.Error, "IST0156", "The Gateway API CRD version %v is lower than the minimum version: %v")
   202  
   203  	// InvalidTelemetryProvider defines a diag.MessageType for message "InvalidTelemetryProvider".
   204  	// Description: The Telemetry with empty providers will be ignored
   205  	InvalidTelemetryProvider = diag.NewMessageType(diag.Warning, "IST0157", "The Telemetry %v in namespace %q with empty providers will be ignored.")
   206  
   207  	// PodsIstioProxyImageMismatchInNamespace defines a diag.MessageType for message "PodsIstioProxyImageMismatchInNamespace".
   208  	// Description: The Istio proxy image of the pods running in the namespace do not match the image defined in the injection configuration.
   209  	PodsIstioProxyImageMismatchInNamespace = diag.NewMessageType(diag.Warning, "IST0158", "The Istio proxy images of the pods running in the namespace do not match the image defined in the injection configuration (pod names: %v). This often happens after upgrading the Istio control-plane and can be fixed by redeploying the pods.")
   210  
   211  	// ConflictingTelemetryWorkloadSelectors defines a diag.MessageType for message "ConflictingTelemetryWorkloadSelectors".
   212  	// Description: A Telemetry resource selects the same workloads as another Telemetry resource
   213  	ConflictingTelemetryWorkloadSelectors = diag.NewMessageType(diag.Error, "IST0159", "The Telemetries %v in namespace %q select the same workload pod %q, which can lead to undefined behavior.")
   214  
   215  	// MultipleTelemetriesWithoutWorkloadSelectors defines a diag.MessageType for message "MultipleTelemetriesWithoutWorkloadSelectors".
   216  	// Description: More than one telemetry resource in a namespace has no workload selector
   217  	MultipleTelemetriesWithoutWorkloadSelectors = diag.NewMessageType(diag.Error, "IST0160", "The Telemetries %v in namespace %q have no workload selector, which can lead to undefined behavior.")
   218  
   219  	// InvalidGatewayCredential defines a diag.MessageType for message "InvalidGatewayCredential".
   220  	// Description: The credential provided for the Gateway resource is invalid
   221  	InvalidGatewayCredential = diag.NewMessageType(diag.Error, "IST0161", "The credential referenced by the Gateway %s in namespace %s is invalid, which can cause the traffic not to work as expected.")
   222  
   223  	// GatewayPortNotDefinedOnService defines a diag.MessageType for message "GatewayPortNotDefinedOnService".
   224  	// Description: Gateway port not exposed by service
   225  	GatewayPortNotDefinedOnService = diag.NewMessageType(diag.Warning, "IST0162", "The gateway is listening on a target port (port %d) that is not defined in the Service associated with its workload instances (Pod selector %s). If you need to access the gateway port through the gateway Service, it will not be available.")
   226  
   227  	// InvalidExternalControlPlaneConfig defines a diag.MessageType for message "InvalidExternalControlPlaneConfig".
   228  	// Description: Address for the ingress gateway on the external control plane is not valid
   229  	InvalidExternalControlPlaneConfig = diag.NewMessageType(diag.Warning, "IST0163", "The hostname (%s) that was provided for the webhook (%s) to reach the ingress gateway on the external control plane cluster %s. Traffic may not flow properly.")
   230  
   231  	// ExternalControlPlaneAddressIsNotAHostname defines a diag.MessageType for message "ExternalControlPlaneAddressIsNotAHostname".
   232  	// Description: Address for the ingress gateway on the external control plane is an IP address and not a hostname
   233  	ExternalControlPlaneAddressIsNotAHostname = diag.NewMessageType(diag.Info, "IST0164", "The address (%s) that was provided for the webhook (%s) to reach the ingress gateway on the external control plane cluster is an IP address. This is not recommended for a production environment.")
   234  
   235  	// ReferencedInternalGateway defines a diag.MessageType for message "ReferencedInternalGateway".
   236  	// Description: VirtualServices should not reference internal Gateways.
   237  	ReferencedInternalGateway = diag.NewMessageType(diag.Warning, "IST0165", "Gateway reference in VirtualService %s is to an implementation-generated internal Gateway: %s.")
   238  
   239  	// IneffectiveSelector defines a diag.MessageType for message "IneffectiveSelector".
   240  	// Description: Selector has no effect when applied to Kubernetes Gateways.
   241  	IneffectiveSelector = diag.NewMessageType(diag.Warning, "IST0166", "Ineffective selector on Kubernetes Gateway %s. Use the TargetRef field instead.")
   242  
   243  	// IneffectivePolicy defines a diag.MessageType for message "IneffectivePolicy".
   244  	// Description: The policy applied has no impact.
   245  	IneffectivePolicy = diag.NewMessageType(diag.Warning, "IST0167", "The policy has no impact: %s.")
   246  
   247  	// UnknownUpgradeCompatibility defines a diag.MessageType for message "UnknownUpgradeCompatibility".
   248  	// Description: We cannot automatically detect whether a change is fully compatible or not
   249  	UnknownUpgradeCompatibility = diag.NewMessageType(diag.Warning, "IST0168", "The configuration %q changed in release %s, but compatibility cannot be automatically detected: %s. Or, install with `--set compatibilityVersion=%s` to retain the old default.")
   250  
   251  	// UpdateIncompatibility defines a diag.MessageType for message "UpdateIncompatibility".
   252  	// Description: The provided configuration object may be incompatible due to an upgrade
   253  	UpdateIncompatibility = diag.NewMessageType(diag.Warning, "IST0169", "The configuration %q changed in release %s: %s. Or, install with `--set compatibilityVersion=%s` to retain the old default.")
   254  
   255  	// MultiClusterInconsistentService defines a diag.MessageType for message "MultiClusterInconsistentService".
   256  	// Description: The services live in different clusters under multi-cluster deployment model are inconsistent
   257  	MultiClusterInconsistentService = diag.NewMessageType(diag.Warning, "IST0170", "The service %v in namespace %q is inconsistent across clusters %q, which can lead to undefined behaviors. The inconsistent behaviors are: %v.")
   258  )
   259  
   260  // All returns a list of all known message types.
   261  func All() []*diag.MessageType {
   262  	return []*diag.MessageType{
   263  		InternalError,
   264  		Deprecated,
   265  		ReferencedResourceNotFound,
   266  		NamespaceNotInjected,
   267  		PodMissingProxy,
   268  		SchemaValidationError,
   269  		MisplacedAnnotation,
   270  		UnknownAnnotation,
   271  		ConflictingMeshGatewayVirtualServiceHosts,
   272  		ConflictingSidecarWorkloadSelectors,
   273  		MultipleSidecarsWithoutWorkloadSelectors,
   274  		VirtualServiceDestinationPortSelectorRequired,
   275  		DeploymentAssociatedToMultipleServices,
   276  		PortNameIsNotUnderNamingConvention,
   277  		InvalidRegexp,
   278  		NamespaceMultipleInjectionLabels,
   279  		InvalidAnnotation,
   280  		UnknownMeshNetworksServiceRegistry,
   281  		NoMatchingWorkloadsFound,
   282  		NoServerCertificateVerificationDestinationLevel,
   283  		NoServerCertificateVerificationPortLevel,
   284  		VirtualServiceUnreachableRule,
   285  		VirtualServiceIneffectiveMatch,
   286  		VirtualServiceHostNotFoundInGateway,
   287  		SchemaWarning,
   288  		ServiceEntryAddressesRequired,
   289  		DeprecatedAnnotation,
   290  		AlphaAnnotation,
   291  		DeploymentConflictingPorts,
   292  		GatewayDuplicateCertificate,
   293  		InvalidWebhook,
   294  		IngressRouteRulesNotAffected,
   295  		InsufficientPermissions,
   296  		UnsupportedKubernetesVersion,
   297  		LocalhostListener,
   298  		InvalidApplicationUID,
   299  		ConflictingGateways,
   300  		ImageAutoWithoutInjectionWarning,
   301  		ImageAutoWithoutInjectionError,
   302  		NamespaceInjectionEnabledByDefault,
   303  		JwtClaimBasedRoutingWithoutRequestAuthN,
   304  		ExternalNameServiceTypeInvalidPortName,
   305  		EnvoyFilterUsesRelativeOperation,
   306  		EnvoyFilterUsesReplaceOperationIncorrectly,
   307  		EnvoyFilterUsesAddOperationIncorrectly,
   308  		EnvoyFilterUsesRemoveOperationIncorrectly,
   309  		EnvoyFilterUsesRelativeOperationWithProxyVersion,
   310  		UnsupportedGatewayAPIVersion,
   311  		InvalidTelemetryProvider,
   312  		PodsIstioProxyImageMismatchInNamespace,
   313  		ConflictingTelemetryWorkloadSelectors,
   314  		MultipleTelemetriesWithoutWorkloadSelectors,
   315  		InvalidGatewayCredential,
   316  		GatewayPortNotDefinedOnService,
   317  		InvalidExternalControlPlaneConfig,
   318  		ExternalControlPlaneAddressIsNotAHostname,
   319  		ReferencedInternalGateway,
   320  		IneffectiveSelector,
   321  		IneffectivePolicy,
   322  		UnknownUpgradeCompatibility,
   323  		UpdateIncompatibility,
   324  		MultiClusterInconsistentService,
   325  	}
   326  }
   327  
   328  // NewInternalError returns a new diag.Message based on InternalError.
   329  func NewInternalError(r *resource.Instance, detail string) diag.Message {
   330  	return diag.NewMessage(
   331  		InternalError,
   332  		r,
   333  		detail,
   334  	)
   335  }
   336  
   337  // NewDeprecated returns a new diag.Message based on Deprecated.
   338  func NewDeprecated(r *resource.Instance, detail string) diag.Message {
   339  	return diag.NewMessage(
   340  		Deprecated,
   341  		r,
   342  		detail,
   343  	)
   344  }
   345  
   346  // NewReferencedResourceNotFound returns a new diag.Message based on ReferencedResourceNotFound.
   347  func NewReferencedResourceNotFound(r *resource.Instance, reftype string, refval string) diag.Message {
   348  	return diag.NewMessage(
   349  		ReferencedResourceNotFound,
   350  		r,
   351  		reftype,
   352  		refval,
   353  	)
   354  }
   355  
   356  // NewNamespaceNotInjected returns a new diag.Message based on NamespaceNotInjected.
   357  func NewNamespaceNotInjected(r *resource.Instance, namespace string, namespace2 string) diag.Message {
   358  	return diag.NewMessage(
   359  		NamespaceNotInjected,
   360  		r,
   361  		namespace,
   362  		namespace2,
   363  	)
   364  }
   365  
   366  // NewPodMissingProxy returns a new diag.Message based on PodMissingProxy.
   367  func NewPodMissingProxy(r *resource.Instance, podName string) diag.Message {
   368  	return diag.NewMessage(
   369  		PodMissingProxy,
   370  		r,
   371  		podName,
   372  	)
   373  }
   374  
   375  // NewSchemaValidationError returns a new diag.Message based on SchemaValidationError.
   376  func NewSchemaValidationError(r *resource.Instance, err error) diag.Message {
   377  	return diag.NewMessage(
   378  		SchemaValidationError,
   379  		r,
   380  		err,
   381  	)
   382  }
   383  
   384  // NewMisplacedAnnotation returns a new diag.Message based on MisplacedAnnotation.
   385  func NewMisplacedAnnotation(r *resource.Instance, annotation string, kind string) diag.Message {
   386  	return diag.NewMessage(
   387  		MisplacedAnnotation,
   388  		r,
   389  		annotation,
   390  		kind,
   391  	)
   392  }
   393  
   394  // NewUnknownAnnotation returns a new diag.Message based on UnknownAnnotation.
   395  func NewUnknownAnnotation(r *resource.Instance, annotation string) diag.Message {
   396  	return diag.NewMessage(
   397  		UnknownAnnotation,
   398  		r,
   399  		annotation,
   400  	)
   401  }
   402  
   403  // NewConflictingMeshGatewayVirtualServiceHosts returns a new diag.Message based on ConflictingMeshGatewayVirtualServiceHosts.
   404  func NewConflictingMeshGatewayVirtualServiceHosts(r *resource.Instance, virtualServices string, host string) diag.Message {
   405  	return diag.NewMessage(
   406  		ConflictingMeshGatewayVirtualServiceHosts,
   407  		r,
   408  		virtualServices,
   409  		host,
   410  	)
   411  }
   412  
   413  // NewConflictingSidecarWorkloadSelectors returns a new diag.Message based on ConflictingSidecarWorkloadSelectors.
   414  func NewConflictingSidecarWorkloadSelectors(r *resource.Instance, conflictingSidecars []string, namespace string, workloadPod string) diag.Message {
   415  	return diag.NewMessage(
   416  		ConflictingSidecarWorkloadSelectors,
   417  		r,
   418  		conflictingSidecars,
   419  		namespace,
   420  		workloadPod,
   421  	)
   422  }
   423  
   424  // NewMultipleSidecarsWithoutWorkloadSelectors returns a new diag.Message based on MultipleSidecarsWithoutWorkloadSelectors.
   425  func NewMultipleSidecarsWithoutWorkloadSelectors(r *resource.Instance, conflictingSidecars []string, namespace string) diag.Message {
   426  	return diag.NewMessage(
   427  		MultipleSidecarsWithoutWorkloadSelectors,
   428  		r,
   429  		conflictingSidecars,
   430  		namespace,
   431  	)
   432  }
   433  
   434  // NewVirtualServiceDestinationPortSelectorRequired returns a new diag.Message based on VirtualServiceDestinationPortSelectorRequired.
   435  func NewVirtualServiceDestinationPortSelectorRequired(r *resource.Instance, destHost string, destPorts []int) diag.Message {
   436  	return diag.NewMessage(
   437  		VirtualServiceDestinationPortSelectorRequired,
   438  		r,
   439  		destHost,
   440  		destPorts,
   441  	)
   442  }
   443  
   444  // NewDeploymentAssociatedToMultipleServices returns a new diag.Message based on DeploymentAssociatedToMultipleServices.
   445  func NewDeploymentAssociatedToMultipleServices(r *resource.Instance, deployment string, port int32, services []string) diag.Message {
   446  	return diag.NewMessage(
   447  		DeploymentAssociatedToMultipleServices,
   448  		r,
   449  		deployment,
   450  		port,
   451  		services,
   452  	)
   453  }
   454  
   455  // NewPortNameIsNotUnderNamingConvention returns a new diag.Message based on PortNameIsNotUnderNamingConvention.
   456  func NewPortNameIsNotUnderNamingConvention(r *resource.Instance, portName string, port int, targetPort string) diag.Message {
   457  	return diag.NewMessage(
   458  		PortNameIsNotUnderNamingConvention,
   459  		r,
   460  		portName,
   461  		port,
   462  		targetPort,
   463  	)
   464  }
   465  
   466  // NewInvalidRegexp returns a new diag.Message based on InvalidRegexp.
   467  func NewInvalidRegexp(r *resource.Instance, where string, re string, problem string) diag.Message {
   468  	return diag.NewMessage(
   469  		InvalidRegexp,
   470  		r,
   471  		where,
   472  		re,
   473  		problem,
   474  	)
   475  }
   476  
   477  // NewNamespaceMultipleInjectionLabels returns a new diag.Message based on NamespaceMultipleInjectionLabels.
   478  func NewNamespaceMultipleInjectionLabels(r *resource.Instance, labels []string) diag.Message {
   479  	return diag.NewMessage(
   480  		NamespaceMultipleInjectionLabels,
   481  		r,
   482  		labels,
   483  	)
   484  }
   485  
   486  // NewInvalidAnnotation returns a new diag.Message based on InvalidAnnotation.
   487  func NewInvalidAnnotation(r *resource.Instance, annotation string, problem string) diag.Message {
   488  	return diag.NewMessage(
   489  		InvalidAnnotation,
   490  		r,
   491  		annotation,
   492  		problem,
   493  	)
   494  }
   495  
   496  // NewUnknownMeshNetworksServiceRegistry returns a new diag.Message based on UnknownMeshNetworksServiceRegistry.
   497  func NewUnknownMeshNetworksServiceRegistry(r *resource.Instance, serviceregistry string, network string) diag.Message {
   498  	return diag.NewMessage(
   499  		UnknownMeshNetworksServiceRegistry,
   500  		r,
   501  		serviceregistry,
   502  		network,
   503  	)
   504  }
   505  
   506  // NewNoMatchingWorkloadsFound returns a new diag.Message based on NoMatchingWorkloadsFound.
   507  func NewNoMatchingWorkloadsFound(r *resource.Instance, labels string) diag.Message {
   508  	return diag.NewMessage(
   509  		NoMatchingWorkloadsFound,
   510  		r,
   511  		labels,
   512  	)
   513  }
   514  
   515  // NewNoServerCertificateVerificationDestinationLevel returns a new diag.Message based on NoServerCertificateVerificationDestinationLevel.
   516  func NewNoServerCertificateVerificationDestinationLevel(r *resource.Instance, destinationrule string, namespace string, mode string, host string) diag.Message {
   517  	return diag.NewMessage(
   518  		NoServerCertificateVerificationDestinationLevel,
   519  		r,
   520  		destinationrule,
   521  		namespace,
   522  		mode,
   523  		host,
   524  	)
   525  }
   526  
   527  // NewNoServerCertificateVerificationPortLevel returns a new diag.Message based on NoServerCertificateVerificationPortLevel.
   528  func NewNoServerCertificateVerificationPortLevel(r *resource.Instance, destinationrule string, namespace string, mode string, host string, port string) diag.Message {
   529  	return diag.NewMessage(
   530  		NoServerCertificateVerificationPortLevel,
   531  		r,
   532  		destinationrule,
   533  		namespace,
   534  		mode,
   535  		host,
   536  		port,
   537  	)
   538  }
   539  
   540  // NewVirtualServiceUnreachableRule returns a new diag.Message based on VirtualServiceUnreachableRule.
   541  func NewVirtualServiceUnreachableRule(r *resource.Instance, ruleno string, reason string) diag.Message {
   542  	return diag.NewMessage(
   543  		VirtualServiceUnreachableRule,
   544  		r,
   545  		ruleno,
   546  		reason,
   547  	)
   548  }
   549  
   550  // NewVirtualServiceIneffectiveMatch returns a new diag.Message based on VirtualServiceIneffectiveMatch.
   551  func NewVirtualServiceIneffectiveMatch(r *resource.Instance, ruleno string, matchno string, dupno string) diag.Message {
   552  	return diag.NewMessage(
   553  		VirtualServiceIneffectiveMatch,
   554  		r,
   555  		ruleno,
   556  		matchno,
   557  		dupno,
   558  	)
   559  }
   560  
   561  // NewVirtualServiceHostNotFoundInGateway returns a new diag.Message based on VirtualServiceHostNotFoundInGateway.
   562  func NewVirtualServiceHostNotFoundInGateway(r *resource.Instance, host []string, virtualservice string, gateway string) diag.Message {
   563  	return diag.NewMessage(
   564  		VirtualServiceHostNotFoundInGateway,
   565  		r,
   566  		host,
   567  		virtualservice,
   568  		gateway,
   569  	)
   570  }
   571  
   572  // NewSchemaWarning returns a new diag.Message based on SchemaWarning.
   573  func NewSchemaWarning(r *resource.Instance, err error) diag.Message {
   574  	return diag.NewMessage(
   575  		SchemaWarning,
   576  		r,
   577  		err,
   578  	)
   579  }
   580  
   581  // NewServiceEntryAddressesRequired returns a new diag.Message based on ServiceEntryAddressesRequired.
   582  func NewServiceEntryAddressesRequired(r *resource.Instance) diag.Message {
   583  	return diag.NewMessage(
   584  		ServiceEntryAddressesRequired,
   585  		r,
   586  	)
   587  }
   588  
   589  // NewDeprecatedAnnotation returns a new diag.Message based on DeprecatedAnnotation.
   590  func NewDeprecatedAnnotation(r *resource.Instance, annotation string, extra string) diag.Message {
   591  	return diag.NewMessage(
   592  		DeprecatedAnnotation,
   593  		r,
   594  		annotation,
   595  		extra,
   596  	)
   597  }
   598  
   599  // NewAlphaAnnotation returns a new diag.Message based on AlphaAnnotation.
   600  func NewAlphaAnnotation(r *resource.Instance, annotation string) diag.Message {
   601  	return diag.NewMessage(
   602  		AlphaAnnotation,
   603  		r,
   604  		annotation,
   605  	)
   606  }
   607  
   608  // NewDeploymentConflictingPorts returns a new diag.Message based on DeploymentConflictingPorts.
   609  func NewDeploymentConflictingPorts(r *resource.Instance, deployment string, services []string, targetPort string, ports []int32) diag.Message {
   610  	return diag.NewMessage(
   611  		DeploymentConflictingPorts,
   612  		r,
   613  		deployment,
   614  		services,
   615  		targetPort,
   616  		ports,
   617  	)
   618  }
   619  
   620  // NewGatewayDuplicateCertificate returns a new diag.Message based on GatewayDuplicateCertificate.
   621  func NewGatewayDuplicateCertificate(r *resource.Instance, gateways []string) diag.Message {
   622  	return diag.NewMessage(
   623  		GatewayDuplicateCertificate,
   624  		r,
   625  		gateways,
   626  	)
   627  }
   628  
   629  // NewInvalidWebhook returns a new diag.Message based on InvalidWebhook.
   630  func NewInvalidWebhook(r *resource.Instance, error string) diag.Message {
   631  	return diag.NewMessage(
   632  		InvalidWebhook,
   633  		r,
   634  		error,
   635  	)
   636  }
   637  
   638  // NewIngressRouteRulesNotAffected returns a new diag.Message based on IngressRouteRulesNotAffected.
   639  func NewIngressRouteRulesNotAffected(r *resource.Instance, virtualservicesubset string, virtualservice string) diag.Message {
   640  	return diag.NewMessage(
   641  		IngressRouteRulesNotAffected,
   642  		r,
   643  		virtualservicesubset,
   644  		virtualservice,
   645  	)
   646  }
   647  
   648  // NewInsufficientPermissions returns a new diag.Message based on InsufficientPermissions.
   649  func NewInsufficientPermissions(r *resource.Instance, resource string, error string) diag.Message {
   650  	return diag.NewMessage(
   651  		InsufficientPermissions,
   652  		r,
   653  		resource,
   654  		error,
   655  	)
   656  }
   657  
   658  // NewUnsupportedKubernetesVersion returns a new diag.Message based on UnsupportedKubernetesVersion.
   659  func NewUnsupportedKubernetesVersion(r *resource.Instance, version string, minimumVersion string) diag.Message {
   660  	return diag.NewMessage(
   661  		UnsupportedKubernetesVersion,
   662  		r,
   663  		version,
   664  		minimumVersion,
   665  	)
   666  }
   667  
   668  // NewLocalhostListener returns a new diag.Message based on LocalhostListener.
   669  func NewLocalhostListener(r *resource.Instance, port string) diag.Message {
   670  	return diag.NewMessage(
   671  		LocalhostListener,
   672  		r,
   673  		port,
   674  	)
   675  }
   676  
   677  // NewInvalidApplicationUID returns a new diag.Message based on InvalidApplicationUID.
   678  func NewInvalidApplicationUID(r *resource.Instance) diag.Message {
   679  	return diag.NewMessage(
   680  		InvalidApplicationUID,
   681  		r,
   682  	)
   683  }
   684  
   685  // NewConflictingGateways returns a new diag.Message based on ConflictingGateways.
   686  func NewConflictingGateways(r *resource.Instance, gateway string, selector string, portnumber string, hosts string) diag.Message {
   687  	return diag.NewMessage(
   688  		ConflictingGateways,
   689  		r,
   690  		gateway,
   691  		selector,
   692  		portnumber,
   693  		hosts,
   694  	)
   695  }
   696  
   697  // NewImageAutoWithoutInjectionWarning returns a new diag.Message based on ImageAutoWithoutInjectionWarning.
   698  func NewImageAutoWithoutInjectionWarning(r *resource.Instance, resourceType string, resourceName string) diag.Message {
   699  	return diag.NewMessage(
   700  		ImageAutoWithoutInjectionWarning,
   701  		r,
   702  		resourceType,
   703  		resourceName,
   704  	)
   705  }
   706  
   707  // NewImageAutoWithoutInjectionError returns a new diag.Message based on ImageAutoWithoutInjectionError.
   708  func NewImageAutoWithoutInjectionError(r *resource.Instance, resourceType string, resourceName string) diag.Message {
   709  	return diag.NewMessage(
   710  		ImageAutoWithoutInjectionError,
   711  		r,
   712  		resourceType,
   713  		resourceName,
   714  	)
   715  }
   716  
   717  // NewNamespaceInjectionEnabledByDefault returns a new diag.Message based on NamespaceInjectionEnabledByDefault.
   718  func NewNamespaceInjectionEnabledByDefault(r *resource.Instance) diag.Message {
   719  	return diag.NewMessage(
   720  		NamespaceInjectionEnabledByDefault,
   721  		r,
   722  	)
   723  }
   724  
   725  // NewJwtClaimBasedRoutingWithoutRequestAuthN returns a new diag.Message based on JwtClaimBasedRoutingWithoutRequestAuthN.
   726  func NewJwtClaimBasedRoutingWithoutRequestAuthN(r *resource.Instance, key string, gateway string, pod string) diag.Message {
   727  	return diag.NewMessage(
   728  		JwtClaimBasedRoutingWithoutRequestAuthN,
   729  		r,
   730  		key,
   731  		gateway,
   732  		pod,
   733  	)
   734  }
   735  
   736  // NewExternalNameServiceTypeInvalidPortName returns a new diag.Message based on ExternalNameServiceTypeInvalidPortName.
   737  func NewExternalNameServiceTypeInvalidPortName(r *resource.Instance) diag.Message {
   738  	return diag.NewMessage(
   739  		ExternalNameServiceTypeInvalidPortName,
   740  		r,
   741  	)
   742  }
   743  
   744  // NewEnvoyFilterUsesRelativeOperation returns a new diag.Message based on EnvoyFilterUsesRelativeOperation.
   745  func NewEnvoyFilterUsesRelativeOperation(r *resource.Instance) diag.Message {
   746  	return diag.NewMessage(
   747  		EnvoyFilterUsesRelativeOperation,
   748  		r,
   749  	)
   750  }
   751  
   752  // NewEnvoyFilterUsesReplaceOperationIncorrectly returns a new diag.Message based on EnvoyFilterUsesReplaceOperationIncorrectly.
   753  func NewEnvoyFilterUsesReplaceOperationIncorrectly(r *resource.Instance) diag.Message {
   754  	return diag.NewMessage(
   755  		EnvoyFilterUsesReplaceOperationIncorrectly,
   756  		r,
   757  	)
   758  }
   759  
   760  // NewEnvoyFilterUsesAddOperationIncorrectly returns a new diag.Message based on EnvoyFilterUsesAddOperationIncorrectly.
   761  func NewEnvoyFilterUsesAddOperationIncorrectly(r *resource.Instance) diag.Message {
   762  	return diag.NewMessage(
   763  		EnvoyFilterUsesAddOperationIncorrectly,
   764  		r,
   765  	)
   766  }
   767  
   768  // NewEnvoyFilterUsesRemoveOperationIncorrectly returns a new diag.Message based on EnvoyFilterUsesRemoveOperationIncorrectly.
   769  func NewEnvoyFilterUsesRemoveOperationIncorrectly(r *resource.Instance) diag.Message {
   770  	return diag.NewMessage(
   771  		EnvoyFilterUsesRemoveOperationIncorrectly,
   772  		r,
   773  	)
   774  }
   775  
   776  // NewEnvoyFilterUsesRelativeOperationWithProxyVersion returns a new diag.Message based on EnvoyFilterUsesRelativeOperationWithProxyVersion.
   777  func NewEnvoyFilterUsesRelativeOperationWithProxyVersion(r *resource.Instance) diag.Message {
   778  	return diag.NewMessage(
   779  		EnvoyFilterUsesRelativeOperationWithProxyVersion,
   780  		r,
   781  	)
   782  }
   783  
   784  // NewUnsupportedGatewayAPIVersion returns a new diag.Message based on UnsupportedGatewayAPIVersion.
   785  func NewUnsupportedGatewayAPIVersion(r *resource.Instance, version string, minimumVersion string) diag.Message {
   786  	return diag.NewMessage(
   787  		UnsupportedGatewayAPIVersion,
   788  		r,
   789  		version,
   790  		minimumVersion,
   791  	)
   792  }
   793  
   794  // NewInvalidTelemetryProvider returns a new diag.Message based on InvalidTelemetryProvider.
   795  func NewInvalidTelemetryProvider(r *resource.Instance, name string, namespace string) diag.Message {
   796  	return diag.NewMessage(
   797  		InvalidTelemetryProvider,
   798  		r,
   799  		name,
   800  		namespace,
   801  	)
   802  }
   803  
   804  // NewPodsIstioProxyImageMismatchInNamespace returns a new diag.Message based on PodsIstioProxyImageMismatchInNamespace.
   805  func NewPodsIstioProxyImageMismatchInNamespace(r *resource.Instance, podNames []string) diag.Message {
   806  	return diag.NewMessage(
   807  		PodsIstioProxyImageMismatchInNamespace,
   808  		r,
   809  		podNames,
   810  	)
   811  }
   812  
   813  // NewConflictingTelemetryWorkloadSelectors returns a new diag.Message based on ConflictingTelemetryWorkloadSelectors.
   814  func NewConflictingTelemetryWorkloadSelectors(r *resource.Instance, conflictingTelemetries []string, namespace string, workloadPod string) diag.Message {
   815  	return diag.NewMessage(
   816  		ConflictingTelemetryWorkloadSelectors,
   817  		r,
   818  		conflictingTelemetries,
   819  		namespace,
   820  		workloadPod,
   821  	)
   822  }
   823  
   824  // NewMultipleTelemetriesWithoutWorkloadSelectors returns a new diag.Message based on MultipleTelemetriesWithoutWorkloadSelectors.
   825  func NewMultipleTelemetriesWithoutWorkloadSelectors(r *resource.Instance, conflictingTelemetries []string, namespace string) diag.Message {
   826  	return diag.NewMessage(
   827  		MultipleTelemetriesWithoutWorkloadSelectors,
   828  		r,
   829  		conflictingTelemetries,
   830  		namespace,
   831  	)
   832  }
   833  
   834  // NewInvalidGatewayCredential returns a new diag.Message based on InvalidGatewayCredential.
   835  func NewInvalidGatewayCredential(r *resource.Instance, gatewayName string, gatewayNamespace string) diag.Message {
   836  	return diag.NewMessage(
   837  		InvalidGatewayCredential,
   838  		r,
   839  		gatewayName,
   840  		gatewayNamespace,
   841  	)
   842  }
   843  
   844  // NewGatewayPortNotDefinedOnService returns a new diag.Message based on GatewayPortNotDefinedOnService.
   845  func NewGatewayPortNotDefinedOnService(r *resource.Instance, port int, selector string) diag.Message {
   846  	return diag.NewMessage(
   847  		GatewayPortNotDefinedOnService,
   848  		r,
   849  		port,
   850  		selector,
   851  	)
   852  }
   853  
   854  // NewInvalidExternalControlPlaneConfig returns a new diag.Message based on InvalidExternalControlPlaneConfig.
   855  func NewInvalidExternalControlPlaneConfig(r *resource.Instance, hostname string, webhook string, msg string) diag.Message {
   856  	return diag.NewMessage(
   857  		InvalidExternalControlPlaneConfig,
   858  		r,
   859  		hostname,
   860  		webhook,
   861  		msg,
   862  	)
   863  }
   864  
   865  // NewExternalControlPlaneAddressIsNotAHostname returns a new diag.Message based on ExternalControlPlaneAddressIsNotAHostname.
   866  func NewExternalControlPlaneAddressIsNotAHostname(r *resource.Instance, hostname string, webhook string) diag.Message {
   867  	return diag.NewMessage(
   868  		ExternalControlPlaneAddressIsNotAHostname,
   869  		r,
   870  		hostname,
   871  		webhook,
   872  	)
   873  }
   874  
   875  // NewReferencedInternalGateway returns a new diag.Message based on ReferencedInternalGateway.
   876  func NewReferencedInternalGateway(r *resource.Instance, virtualservice string, gateway string) diag.Message {
   877  	return diag.NewMessage(
   878  		ReferencedInternalGateway,
   879  		r,
   880  		virtualservice,
   881  		gateway,
   882  	)
   883  }
   884  
   885  // NewIneffectiveSelector returns a new diag.Message based on IneffectiveSelector.
   886  func NewIneffectiveSelector(r *resource.Instance, gateway string) diag.Message {
   887  	return diag.NewMessage(
   888  		IneffectiveSelector,
   889  		r,
   890  		gateway,
   891  	)
   892  }
   893  
   894  // NewIneffectivePolicy returns a new diag.Message based on IneffectivePolicy.
   895  func NewIneffectivePolicy(r *resource.Instance, reason string) diag.Message {
   896  	return diag.NewMessage(
   897  		IneffectivePolicy,
   898  		r,
   899  		reason,
   900  	)
   901  }
   902  
   903  // NewUnknownUpgradeCompatibility returns a new diag.Message based on UnknownUpgradeCompatibility.
   904  func NewUnknownUpgradeCompatibility(r *resource.Instance, field string, release string, info string, compatVersion string) diag.Message {
   905  	return diag.NewMessage(
   906  		UnknownUpgradeCompatibility,
   907  		r,
   908  		field,
   909  		release,
   910  		info,
   911  		compatVersion,
   912  	)
   913  }
   914  
   915  // NewUpdateIncompatibility returns a new diag.Message based on UpdateIncompatibility.
   916  func NewUpdateIncompatibility(r *resource.Instance, field string, release string, info string, compatVersion string) diag.Message {
   917  	return diag.NewMessage(
   918  		UpdateIncompatibility,
   919  		r,
   920  		field,
   921  		release,
   922  		info,
   923  		compatVersion,
   924  	)
   925  }
   926  
   927  // NewMultiClusterInconsistentService returns a new diag.Message based on MultiClusterInconsistentService.
   928  func NewMultiClusterInconsistentService(r *resource.Instance, serviceName string, namespace string, clusters []string, error string) diag.Message {
   929  	return diag.NewMessage(
   930  		MultiClusterInconsistentService,
   931  		r,
   932  		serviceName,
   933  		namespace,
   934  		clusters,
   935  		error,
   936  	)
   937  }