istio.io/istio@v0.0.0-20240520182934-d79c90f27776/tests/integration/pilot/testdata/mcs-serviceimport-crd.yaml (about) 1 # Copied from https://github.com/kubernetes-sigs/mcs-api/blob/master/config/crd/multicluster.x-k8s.io_serviceimports.yaml 2 # Copyright 2020 The Kubernetes Authors. 3 # 4 # Licensed under the Apache License, Version 2.0 (the "License"); 5 # you may not use this file except in compliance with the License. 6 # You may obtain a copy of the License at 7 # 8 # http://www.apache.org/licenses/LICENSE-2.0 9 # 10 # Unless required by applicable law or agreed to in writing, software 11 # distributed under the License is distributed on an "AS IS" BASIS, 12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 # See the License for the specific language governing permissions and 14 # limitations under the License. 15 apiVersion: apiextensions.k8s.io/v1 16 kind: CustomResourceDefinition 17 metadata: 18 name: serviceimports.{{ .Group }} 19 spec: 20 group: {{ .Group }} 21 scope: Namespaced 22 names: 23 plural: serviceimports 24 singular: serviceimport 25 kind: ServiceImport 26 shortNames: 27 - svcim 28 versions: 29 - name: {{ .Version }} 30 served: true 31 storage: true 32 subresources: 33 status: {} 34 additionalPrinterColumns: 35 - name: Type 36 type: string 37 description: The type of this ServiceImport 38 jsonPath: .spec.type 39 - name: IP 40 type: string 41 description: The VIP for this ServiceImport 42 jsonPath: .spec.ips 43 - name: Age 44 type: date 45 jsonPath: .metadata.creationTimestamp 46 "schema": 47 "openAPIV3Schema": 48 description: ServiceImport describes a service imported from clusters in a 49 ClusterSet. 50 type: object 51 properties: 52 apiVersion: 53 description: 'APIVersion defines the versioned schema of this representation 54 of an object. Servers should convert recognized schemas to the latest 55 internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' 56 type: string 57 kind: 58 description: 'Kind is a string value representing the REST resource this 59 object represents. Servers may infer this from the endpoint the client 60 submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' 61 type: string 62 metadata: 63 type: object 64 spec: 65 description: spec defines the behavior of a ServiceImport. 66 type: object 67 required: 68 - ports 69 - type 70 properties: 71 ips: 72 description: ip will be used as the VIP for this service when type 73 is ClusterSetIP. 74 type: array 75 maxItems: 1 76 items: 77 type: string 78 ports: 79 type: array 80 items: 81 description: ServicePort represents the port on which the service 82 is exposed 83 type: object 84 required: 85 - port 86 properties: 87 appProtocol: 88 description: The application protocol for this port. This field 89 follows standard Kubernetes label syntax. Un-prefixed names 90 are reserved for IANA standard service names (as per RFC-6335 91 and http://www.iana.org/assignments/service-names). Non-standard 92 protocols should use prefixed names such as mycompany.com/my-custom-protocol. 93 Field can be enabled with ServiceAppProtocol feature gate. 94 type: string 95 name: 96 description: The name of this port within the service. This 97 must be a DNS_LABEL. All ports within a ServiceSpec must have 98 unique names. When considering the endpoints for a Service, 99 this must match the 'name' field in the EndpointPort. Optional 100 if only one ServicePort is defined on this service. 101 type: string 102 port: 103 description: The port that will be exposed by this service. 104 type: integer 105 format: int32 106 protocol: 107 description: The IP protocol for this port. Supports "TCP", 108 "UDP", and "SCTP". Default is TCP. 109 type: string 110 x-kubernetes-list-type: atomic 111 sessionAffinity: 112 description: 'Supports "ClientIP" and "None". Used to maintain session 113 affinity. Enable client IP based session affinity. Must be ClientIP 114 or None. Defaults to None. Ignored when type is Headless More info: 115 https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies' 116 type: string 117 sessionAffinityConfig: 118 description: sessionAffinityConfig contains session affinity configuration. 119 type: object 120 properties: 121 clientIP: 122 description: clientIP contains the configurations of Client IP 123 based session affinity. 124 type: object 125 properties: 126 timeoutSeconds: 127 description: timeoutSeconds specifies the seconds of ClientIP 128 type session sticky time. The value must be >0 && <=86400(for 129 1 day) if ServiceAffinity == "ClientIP". Default value is 130 10800(for 3 hours). 131 type: integer 132 format: int32 133 type: 134 description: type defines the type of this service. Must be ClusterSetIP 135 or Headless. 136 type: string 137 enum: 138 - ClusterSetIP 139 - Headless 140 status: 141 description: status contains information about the exported services that 142 form the multi-cluster service referenced by this ServiceImport. 143 type: object 144 properties: 145 clusters: 146 description: clusters is the list of exporting clusters from which 147 this service was derived. 148 type: array 149 items: 150 description: ClusterStatus contains service configuration mapped 151 to a specific source cluster 152 type: object 153 required: 154 - cluster 155 properties: 156 cluster: 157 description: cluster is the name of the exporting cluster. Must 158 be a valid RFC-1123 DNS label. 159 type: string 160 x-kubernetes-list-map-keys: 161 - cluster 162 x-kubernetes-list-type: map