Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: MAISTRA-2518 add conditions to federation status #420

Open
wants to merge 1 commit into
base: maistra-2.1
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ module istio.io/istio

go 1.15

replace maistra.io/api => ../../maistra.io/api

// pin to v1.9.5
replace istio.io/api => github.com/istio/api v0.0.0-20210419172736-e076ff10ec38

Expand Down
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1440,8 +1440,6 @@ k8s.io/utils v0.0.0-20200729134348-d5654de09c73/go.mod h1:jPW/WVKK9YHAvNhRxK0md/
k8s.io/utils v0.0.0-20200912215256-4140de9c8800/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
k8s.io/utils v0.0.0-20201110183641-67b214c5f920 h1:CbnUZsM497iRC5QMVkHwyl8s2tB3g7yaSHkYPkpgelw=
k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
maistra.io/api v0.0.0-20210726125459-3d5819d0bd1b h1:LLp9dJctk8s7WTgau8laV+29lc/lQ2cm5RIyZSDN3Cw=
maistra.io/api v0.0.0-20210726125459-3d5819d0bd1b/go.mod h1:lr+bFp/3PnYhRC/0IrDhCy7GfnQPhiOTW/CQ8qgTV9U=
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
Expand Down
293 changes: 158 additions & 135 deletions manifests/charts/base/crds/federation.maistra.io_exportedservicesets.yaml

Large diffs are not rendered by default.

235 changes: 129 additions & 106 deletions manifests/charts/base/crds/federation.maistra.io_importedservicesets.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@

---
apiVersion: apiextensions.k8s.io/v1beta1
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
Expand All @@ -14,118 +13,142 @@ spec:
listKind: ImportedServiceSetList
plural: importedservicesets
singular: importedserviceset
preserveUnknownFields: false
scope: Namespaced
subresources:
status: {}
validation:
openAPIV3Schema:
description: ImportedServiceSet is the Schema for configuring imported services. The name of the ImportedServiceSet resource must match the name of a ServiceMeshPeer resource defining the remote mesh from which the services will be imported.
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type: string
kind:
description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
description: Spec defines rules for matching services to be imported.
properties:
domainSuffix:
description: 'DomainSuffix specifies the domain suffix to be applies to imported services. If no domain suffix is specified, imported services will be named as follows: <imported-name>.<imported-namespace>.svc.<mesh-name>-imports.local If a domain suffix is specified, imported services will be named as follows: <imported-name>.<imported-namespace>.<domain-suffix>'
type: string
importRules:
description: ImportRules are the rules that determine which services are imported to the mesh. The list is processed in order and the first spec in the list that applies to a service is the one that will be applied. This allows more specific selectors to be placed before more general selectors.
items:
versions:
- name: v1
schema:
openAPIV3Schema:
description: ImportedServiceSet is the Schema for configuring imported services. The name of the ImportedServiceSet resource must match the name of a ServiceMeshPeer resource defining the remote mesh from which the services will be imported.
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type: string
kind:
description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
description: Spec defines rules for matching services to be imported.
properties:
domainSuffix:
description: 'DomainSuffix specifies the domain suffix to be applies to imported services. If no domain suffix is specified, imported services will be named as follows: <imported-name>.<imported-namespace>.svc.<mesh-name>-imports.local If a domain suffix is specified, imported services will be named as follows: <imported-name>.<imported-namespace>.<domain-suffix>'
type: string
importRules:
description: ImportRules are the rules that determine which services are imported to the mesh. The list is processed in order and the first spec in the list that applies to a service is the one that will be applied. This allows more specific selectors to be placed before more general selectors.
items:
properties:
domainSuffix:
description: DomainSuffix applies the specified suffix to services imported by this rule. The behavior is identical to that of ImportedServiceSetSpec.DomainSuffix.
type: string
importAsLocal:
description: ImportAsLocal imports the service as a local service in the mesh. For example, if an exported service, foo/bar is imported as some-ns/service, the service will be imported as service.some-ns.svc.cluster.local in the some-ns namespace. If a service of this name already exists in the mesh, the imported service's endpoints will be aggregated with any other workloads associated with the service. This setting overrides DomainSuffix.
type: boolean
nameSelector:
description: NameSelector provides a simple name matcher for importing services in the mesh.
properties:
alias:
properties:
name:
type: string
namespace:
type: string
type: object
name:
type: string
namespace:
type: string
type: object
type:
description: Type of rule. Only Name type is supported.
type: string
required:
- type
type: object
type: array
locality:
description: Locality within which imported services should be associated.
properties:
domainSuffix:
description: DomainSuffix applies the specified suffix to services imported by this rule. The behavior is identical to that of ImportedServiceSetSpec.DomainSuffix.
region:
description: Region within which imported services are located.
type: string
importAsLocal:
description: ImportAsLocal imports the service as a local service in the mesh. For example, if an exported service, foo/bar is imported as some-ns/service, the service will be imported as service.some-ns.svc.cluster.local in the some-ns namespace. If a service of this name already exists in the mesh, the imported service's endpoints will be aggregated with any other workloads associated with the service. This setting overrides DomainSuffix.
type: boolean
nameSelector:
description: NameSelector provides a simple name matcher for importing services in the mesh.
properties:
alias:
properties:
name:
type: string
namespace:
type: string
type: object
name:
type: string
namespace:
type: string
type: object
type:
description: Type of rule. Only Name type is supported.
subzone:
description: Subzone within which imported services are located. If Subzone is specified, Zone must also be specified.
type: string
required:
- type
type: object
type: array
locality:
description: Locality within which imported services should be associated.
properties:
region:
description: Region within which imported services are located.
type: string
subzone:
description: Subzone within which imported services are located. If Subzone is specified, Zone must also be specified.
type: string
zone:
description: Zone within which imported services are located. If Zone is specified, Region must also be specified.
type: string
type: object
type: object
status:
properties:
importedServices:
description: Imports provides details about the services imported by this mesh.
items:
description: PeerServiceMapping represents the name mapping between an exported service and its local counterpart.
properties:
exportedName:
description: ExportedName represents the fully qualified domain name (FQDN) of an exported service. For an exporting mesh, this is the name that is exported to the remote mesh. For an importing mesh, this would be the name of the service exported by the remote mesh.
zone:
description: Zone within which imported services are located. If Zone is specified, Region must also be specified.
type: string
localService:
description: LocalService represents the service in the local (i.e. this) mesh. For an exporting mesh, this would be the service being exported. For an importing mesh, this would be the imported service.
properties:
hostname:
description: Hostname represents fully qualified domain name (FQDN) used to access the service.
type: string
name:
description: Name represents the simple name of the service, e.g. the metadata.name field of a kubernetes Service.
type: string
namespace:
description: Namespace represents the namespace within which the service resides.
type: string
required:
- hostname
- name
- namespace
type: object
required:
- exportedName
- localService
type: object
type: array
x-kubernetes-list-map-keys:
- exportedName
x-kubernetes-list-type: map
required:
- importedServices
type: object
type: object
version: v1
versions:
- name: v1
type: object
status:
properties:
conditions:
description: Represents the latest available observations of a federation's current state.
items:
description: Condition describes the state of a federation at a certain point.
properties:
lastTransitionTime:
description: Last time the condition transitioned from one status to another.
format: date-time
type: string
message:
description: A human readable message indicating details about the transition.
type: string
reason:
description: The reason for the condition's last transition.
type: string
status:
description: Status of the condition, one of True, False, Unknown.
type: string
type:
description: Type of federation condition.
type: string
required:
- status
- type
type: object
type: array
importedServices:
description: Imports provides details about the services imported by this mesh.
items:
description: PeerServiceMapping represents the name mapping between an exported service and its local counterpart.
properties:
exportedName:
description: ExportedName represents the fully qualified domain name (FQDN) of an exported service. For an exporting mesh, this is the name that is exported to the remote mesh. For an importing mesh, this would be the name of the service exported by the remote mesh.
type: string
localService:
description: LocalService represents the service in the local (i.e. this) mesh. For an exporting mesh, this would be the service being exported. For an importing mesh, this would be the imported service.
properties:
hostname:
description: Hostname represents fully qualified domain name (FQDN) used to access the service.
type: string
name:
description: Name represents the simple name of the service, e.g. the metadata.name field of a kubernetes Service.
type: string
namespace:
description: Namespace represents the namespace within which the service resides.
type: string
required:
- hostname
- name
- namespace
type: object
required:
- exportedName
- localService
type: object
type: array
x-kubernetes-list-map-keys:
- exportedName
x-kubernetes-list-type: map
required:
- importedServices
type: object
type: object
served: true
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
Expand Down
Loading