Class ParentReference
- java.lang.Object
-
- io.fabric8.kubernetes.api.model.gatewayapi.v1.ParentReference
-
- All Implemented Interfaces:
io.fabric8.kubernetes.api.builder.Editable<ParentReferenceBuilder>
,io.fabric8.kubernetes.api.model.KubernetesResource
,Serializable
@Generated("io.fabric8.kubernetes.schema.generator.model.ModelGenerator") public class ParentReference extends Object implements io.fabric8.kubernetes.api.builder.Editable<ParentReferenceBuilder>, io.fabric8.kubernetes.api.model.KubernetesResource
ParentReference identifies an API object (usually a Gateway) that can be considered a parent of this resource (usually a route). The only kind of parent resource with "Core" support is Gateway. This API may be extended in the future to support additional kinds of parent resources, such as HTTPRoute.Note that there are specific rules for ParentRefs which cross namespace boundaries. Cross-namespace references are only valid if they are explicitly allowed by something in the namespace they are referring to. For example: Gateway has the AllowedRoutes field, and ReferenceGrant provides a generic way to enable any other kind of cross-namespace reference.
The API object must be valid in the cluster; the Group and Kind must be registered in the cluster for this reference to be valid.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ParentReference()
No args constructor for use in serializationParentReference(String group, String kind, String name, String namespace, Integer port, String sectionName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ParentReferenceBuilder
edit()
Map<String,Object>
getAdditionalProperties()
String
getGroup()
Group is the group of the referent.String
getKind()
Kind is kind of the referent.String
getName()
Name is the name of the referent.String
getNamespace()
Namespace is the namespace of the referent.Integer
getPort()
Port is the network port this Route targets.String
getSectionName()
SectionName is the name of a section within the target resource.void
setAdditionalProperties(Map<String,Object> additionalProperties)
void
setAdditionalProperty(String name, Object value)
void
setGroup(String group)
Group is the group of the referent.void
setKind(String kind)
Kind is kind of the referent.void
setName(String name)
Name is the name of the referent.void
setNamespace(String namespace)
Namespace is the namespace of the referent.void
setPort(Integer port)
Port is the network port this Route targets.void
setSectionName(String sectionName)
SectionName is the name of a section within the target resource.ParentReferenceBuilder
toBuilder()
-
-
-
Method Detail
-
getGroup
public String getGroup()
Group is the group of the referent. When unspecified, "gateway.networking.k8s.io" is inferred. To set the core API group (such as for a "Service" kind referent), Group must be explicitly set to "" (empty string).Support: Core
-
setGroup
public void setGroup(String group)
Group is the group of the referent. When unspecified, "gateway.networking.k8s.io" is inferred. To set the core API group (such as for a "Service" kind referent), Group must be explicitly set to "" (empty string).Support: Core
-
getKind
public String getKind()
Kind is kind of the referent.There are two kinds of parent resources with "Core" support:
* Gateway (Gateway conformance profile) * Service (Mesh conformance profile, ClusterIP Services only)
Support for other resources is Implementation-Specific.
-
setKind
public void setKind(String kind)
Kind is kind of the referent.There are two kinds of parent resources with "Core" support:
* Gateway (Gateway conformance profile) * Service (Mesh conformance profile, ClusterIP Services only)
Support for other resources is Implementation-Specific.
-
getName
public String getName()
Name is the name of the referent.Support: Core
-
setName
public void setName(String name)
Name is the name of the referent.Support: Core
-
getNamespace
public String getNamespace()
Namespace is the namespace of the referent. When unspecified, this refers to the local namespace of the Route.Note that there are specific rules for ParentRefs which cross namespace boundaries. Cross-namespace references are only valid if they are explicitly allowed by something in the namespace they are referring to. For example: Gateway has the AllowedRoutes field, and ReferenceGrant provides a generic way to enable any other kind of cross-namespace reference.
<gateway:experimental:description> ParentRefs from a Route to a Service in the same namespace are "producer" routes, which apply default routing rules to inbound connections from any namespace to the Service.
ParentRefs from a Route to a Service in a different namespace are "consumer" routes, and these routing rules are only applied to outbound connections originating from the same namespace as the Route, for which the intended destination of the connections are a Service targeted as a ParentRef of the Route. </gateway:experimental:description>
Support: Core
-
setNamespace
public void setNamespace(String namespace)
Namespace is the namespace of the referent. When unspecified, this refers to the local namespace of the Route.Note that there are specific rules for ParentRefs which cross namespace boundaries. Cross-namespace references are only valid if they are explicitly allowed by something in the namespace they are referring to. For example: Gateway has the AllowedRoutes field, and ReferenceGrant provides a generic way to enable any other kind of cross-namespace reference.
<gateway:experimental:description> ParentRefs from a Route to a Service in the same namespace are "producer" routes, which apply default routing rules to inbound connections from any namespace to the Service.
ParentRefs from a Route to a Service in a different namespace are "consumer" routes, and these routing rules are only applied to outbound connections originating from the same namespace as the Route, for which the intended destination of the connections are a Service targeted as a ParentRef of the Route. </gateway:experimental:description>
Support: Core
-
getPort
public Integer getPort()
Port is the network port this Route targets. It can be interpreted differently based on the type of parent resource.When the parent resource is a Gateway, this targets all listeners listening on the specified port that also support this kind of Route(and select this Route). It's not recommended to set `Port` unless the networking behaviors specified in a Route must apply to a specific port as opposed to a listener(s) whose port(s) may be changed. When both Port and SectionName are specified, the name and port of the selected listener must match both specified values.
<gateway:experimental:description> When the parent resource is a Service, this targets a specific port in the Service spec. When both Port (experimental) and SectionName are specified, the name and port of the selected port must match both specified values. </gateway:experimental:description>
Implementations MAY choose to support other parent resources. Implementations supporting other types of parent resources MUST clearly document how/if Port is interpreted.
For the purpose of status, an attachment is considered successful as long as the parent resource accepts it partially. For example, Gateway listeners can restrict which Routes can attach to them by Route kind, namespace, or hostname. If 1 of 2 Gateway listeners accept attachment from the referencing Route, the Route MUST be considered successfully attached. If no Gateway listeners accept attachment from this Route, the Route MUST be considered detached from the Gateway.
Support: Extended
-
setPort
public void setPort(Integer port)
Port is the network port this Route targets. It can be interpreted differently based on the type of parent resource.When the parent resource is a Gateway, this targets all listeners listening on the specified port that also support this kind of Route(and select this Route). It's not recommended to set `Port` unless the networking behaviors specified in a Route must apply to a specific port as opposed to a listener(s) whose port(s) may be changed. When both Port and SectionName are specified, the name and port of the selected listener must match both specified values.
<gateway:experimental:description> When the parent resource is a Service, this targets a specific port in the Service spec. When both Port (experimental) and SectionName are specified, the name and port of the selected port must match both specified values. </gateway:experimental:description>
Implementations MAY choose to support other parent resources. Implementations supporting other types of parent resources MUST clearly document how/if Port is interpreted.
For the purpose of status, an attachment is considered successful as long as the parent resource accepts it partially. For example, Gateway listeners can restrict which Routes can attach to them by Route kind, namespace, or hostname. If 1 of 2 Gateway listeners accept attachment from the referencing Route, the Route MUST be considered successfully attached. If no Gateway listeners accept attachment from this Route, the Route MUST be considered detached from the Gateway.
Support: Extended
-
getSectionName
public String getSectionName()
SectionName is the name of a section within the target resource. In the following resources, SectionName is interpreted as the following:* Gateway: Listener name. When both Port (experimental) and SectionName are specified, the name and port of the selected listener must match both specified values. * Service: Port name. When both Port (experimental) and SectionName are specified, the name and port of the selected listener must match both specified values.
Implementations MAY choose to support attaching Routes to other resources. If that is the case, they MUST clearly document how SectionName is interpreted.
When unspecified (empty string), this will reference the entire resource. For the purpose of status, an attachment is considered successful if at least one section in the parent resource accepts it. For example, Gateway listeners can restrict which Routes can attach to them by Route kind, namespace, or hostname. If 1 of 2 Gateway listeners accept attachment from the referencing Route, the Route MUST be considered successfully attached. If no Gateway listeners accept attachment from this Route, the Route MUST be considered detached from the Gateway.
Support: Core
-
setSectionName
public void setSectionName(String sectionName)
SectionName is the name of a section within the target resource. In the following resources, SectionName is interpreted as the following:* Gateway: Listener name. When both Port (experimental) and SectionName are specified, the name and port of the selected listener must match both specified values. * Service: Port name. When both Port (experimental) and SectionName are specified, the name and port of the selected listener must match both specified values.
Implementations MAY choose to support attaching Routes to other resources. If that is the case, they MUST clearly document how SectionName is interpreted.
When unspecified (empty string), this will reference the entire resource. For the purpose of status, an attachment is considered successful if at least one section in the parent resource accepts it. For example, Gateway listeners can restrict which Routes can attach to them by Route kind, namespace, or hostname. If 1 of 2 Gateway listeners accept attachment from the referencing Route, the Route MUST be considered successfully attached. If no Gateway listeners accept attachment from this Route, the Route MUST be considered detached from the Gateway.
Support: Core
-
edit
public ParentReferenceBuilder edit()
- Specified by:
edit
in interfaceio.fabric8.kubernetes.api.builder.Editable<ParentReferenceBuilder>
-
toBuilder
public ParentReferenceBuilder toBuilder()
-
-