diff --git a/config/crds/core.kubeadmiral.io_clustercollectedstatuses.yaml b/config/crds/core.kubeadmiral.io_clustercollectedstatuses.yaml index 5159d603..5ed6d579 100644 --- a/config/crds/core.kubeadmiral.io_clustercollectedstatuses.yaml +++ b/config/crds/core.kubeadmiral.io_clustercollectedstatuses.yaml @@ -4,6 +4,7 @@ kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.11.1 + kubeadmiral.io/no-federated-resource: "true" creationTimestamp: null name: clustercollectedstatuses.core.kubeadmiral.io spec: @@ -13,58 +14,49 @@ spec: listKind: ClusterCollectedStatusList plural: clustercollectedstatuses shortNames: - - ccs + - ccs singular: clustercollectedstatus scope: Cluster versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - description: ClusterCollectedStatus stores the collected fields of Kubernetes - objects from member clusters, that are propagated by a ClusterFederatedObject. - 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 - clusters: - description: Clusters is the list of member clusters and collected fields - for its propagated Kubernetes object. - items: - description: CollectedFieldsWithCluster stores the collected fields - of a Kubernetes object in a member cluster. - properties: - cluster: - description: Cluster is the name of the member cluster. - type: string - collectedFields: - description: CollectedFields is the the set of fields collected - for the Kubernetes object. - x-kubernetes-preserve-unknown-fields: true - error: - description: Error records any errors encountered while collecting - fields from the cluster. - type: string - required: - - cluster - - collectedFields + - name: v1alpha1 + schema: + openAPIV3Schema: + description: ClusterCollectedStatus stores the collected fields of Kubernetes objects from member clusters, that are propagated by a ClusterFederatedObject. + 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 + clusters: + description: Clusters is the list of member clusters and collected fields for its propagated Kubernetes object. + items: + description: CollectedFieldsWithCluster stores the collected fields of a Kubernetes object in a member cluster. + properties: + cluster: + description: Cluster is the name of the member cluster. + type: string + collectedFields: + description: CollectedFields is the the set of fields collected for the Kubernetes object. + x-kubernetes-preserve-unknown-fields: true + error: + description: Error records any errors encountered while collecting fields from the cluster. + type: string + required: + - cluster + - collectedFields + type: object + type: array + 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 + lastUpdateTime: + description: LastUpdateTime is the last time that a collection was performed. + format: date-time + type: string + metadata: type: object - type: array - 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 - lastUpdateTime: - description: LastUpdateTime is the last time that a collection was performed. - format: date-time - type: string - metadata: - type: object - required: - - clusters - - lastUpdateTime - type: object - served: true - storage: true + required: + - clusters + - lastUpdateTime + type: object + served: true + storage: true diff --git a/config/crds/core.kubeadmiral.io_clusterfederatedobjects.yaml b/config/crds/core.kubeadmiral.io_clusterfederatedobjects.yaml index 42c354c7..4f361f67 100644 --- a/config/crds/core.kubeadmiral.io_clusterfederatedobjects.yaml +++ b/config/crds/core.kubeadmiral.io_clusterfederatedobjects.yaml @@ -4,6 +4,7 @@ kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.11.1 + kubeadmiral.io/no-federated-resource: "true" creationTimestamp: null name: clusterfederatedobjects.core.kubeadmiral.io spec: @@ -13,213 +14,178 @@ spec: listKind: ClusterFederatedObjectList plural: clusterfederatedobjects shortNames: - - cfo + - cfo singular: clusterfederatedobject scope: Cluster versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - description: ClusterFederatedObject describes a cluster-scoped Kubernetes - object and how it should be propagated to different member clusters. - 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 the desired behavior of the FederatedObject. - properties: - follows: - description: Follows defines other objects, or "leaders", that the - Kubernetes object should follow during propagation, i.e. the Kubernetes - object should be propagated to all member clusters that its "leaders" - are placed in. - items: - description: LeaderReference contains the identifying metadata of - a "leader" Kubernetes object. - properties: - group: - type: string - kind: - type: string - name: - type: string - namespace: - type: string - required: - - kind - - name - type: object - type: array - overrides: - description: Overrides describe the overrides that should be applied - to the base template of the Kubernetes object before it is propagated - to individual member clusters. - items: - description: OverrideWithController describes the overrides that - will be applied to a Kubernetes object before it is propagated - to individual member clusters. - properties: - clusters: - description: Override is the list of member clusters and their - respective override patches. - items: - description: ClusterReferenceWithPatches represents a single - member cluster and a list of override patches for the cluster. - properties: - cluster: - description: Cluster is the name of the member cluster. - type: string - patches: - description: Patches is the list of override patches for - the member cluster. - items: - description: OverridePatch defines a JSON patch. - properties: - op: - type: string - path: - type: string - value: - x-kubernetes-preserve-unknown-fields: true - required: - - path - type: object - type: array - required: - - cluster - type: object - type: array - controller: - description: Controller identifies the controller responsible - for this override. - type: string - required: - - clusters - - controller - type: object - type: array - placements: - description: Placements describe the member clusters that the Kubernetes - object will be propagated to, which is a union of all the listed - clusters. - items: - description: PlacementWithController describes the member clusters - that a Kubernetes object should be propagated to. - properties: - controller: - description: Controller identifies the controller responsible - for this placement. - type: string - placement: - description: Placement is the list of member clusters that the - Kubernetes object should be propagated to. - items: - description: ClusterReference represents a single member cluster. - properties: - cluster: - description: Cluster is the name of the member cluster. - type: string - required: - - cluster - type: object - type: array - required: - - controller - - placement - type: object - type: array - template: - description: Template is the base template of the Kubernetes object - to be propagated. - x-kubernetes-preserve-unknown-fields: true - required: - - template - type: object - status: - description: Status describes the most recently observed status of the - FederatedObject. - properties: - clusters: - description: Clusters contains the propagation status of the Kubernetes - object for individual member clusters. - items: - description: PropagationStatus describes the propagation of a Kubernetes - object to a given member cluster. - properties: - cluster: - description: Cluster is the name of the member cluster. - type: string - lastObservedGeneration: - description: LastObservedGeneration is the last observed generation - of the Kubernetes object in the member cluster. - format: int64 - type: integer - status: - description: Status describes the current status of propagating - the Kubernetes object to the member cluster. - type: string - required: - - cluster - - status - type: object - type: array - collisionCount: - description: CollisionCount can be used in conjunction with RevisionHistory - to implement rollbacks. - format: int32 - type: integer - conditions: - description: Conditions describe the current state of this FederatedObject. - items: - description: GenericFederatedObjectCondition contains the current - details about a particular condition of a FederatedObject. - properties: - lastTransitionTime: - description: LastTransitionTime is the last time the status - of this condition changed. - format: date-time - type: string - lastUpdateTime: - description: LastUpdateTime is the last time a reconciliation - for this condition occurred. - format: date-time - type: string - reason: - description: Reason is the reason for the last status change - of this condition. - type: string - status: - description: Status is the status of the condition, one of True, - False or Unknown. - type: string - type: - description: Type is the type of the condition. - type: string - required: - - status - - type - type: object - type: array - syncedGeneration: - description: SyncedGeneration is the generation of this FederatedObject - when it was last synced to selected member clusters. - format: int64 - type: integer - type: object - required: - - spec - type: object - served: true - storage: true - subresources: - status: {} + - name: v1alpha1 + schema: + openAPIV3Schema: + description: ClusterFederatedObject describes a cluster-scoped Kubernetes object and how it should be propagated to different member clusters. + 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 the desired behavior of the FederatedObject. + properties: + follows: + description: Follows defines other objects, or "leaders", that the Kubernetes object should follow during propagation, i.e. the Kubernetes object should be propagated to all member clusters that its "leaders" are placed in. + items: + description: LeaderReference contains the identifying metadata of a "leader" Kubernetes object. + properties: + group: + type: string + kind: + type: string + name: + type: string + namespace: + type: string + required: + - kind + - name + type: object + type: array + overrides: + description: Overrides describe the overrides that should be applied to the base template of the Kubernetes object before it is propagated to individual member clusters. + items: + description: OverrideWithController describes the overrides that will be applied to a Kubernetes object before it is propagated to individual member clusters. + properties: + clusters: + description: Override is the list of member clusters and their respective override patches. + items: + description: ClusterReferenceWithPatches represents a single member cluster and a list of override patches for the cluster. + properties: + cluster: + description: Cluster is the name of the member cluster. + type: string + patches: + description: Patches is the list of override patches for the member cluster. + items: + description: OverridePatch defines a JSON patch. + properties: + op: + type: string + path: + type: string + value: + x-kubernetes-preserve-unknown-fields: true + required: + - path + type: object + type: array + required: + - cluster + type: object + type: array + controller: + description: Controller identifies the controller responsible for this override. + type: string + required: + - clusters + - controller + type: object + type: array + placements: + description: Placements describe the member clusters that the Kubernetes object will be propagated to, which is a union of all the listed clusters. + items: + description: PlacementWithController describes the member clusters that a Kubernetes object should be propagated to. + properties: + controller: + description: Controller identifies the controller responsible for this placement. + type: string + placement: + description: Placement is the list of member clusters that the Kubernetes object should be propagated to. + items: + description: ClusterReference represents a single member cluster. + properties: + cluster: + description: Cluster is the name of the member cluster. + type: string + required: + - cluster + type: object + type: array + required: + - controller + - placement + type: object + type: array + template: + description: Template is the base template of the Kubernetes object to be propagated. + x-kubernetes-preserve-unknown-fields: true + required: + - template + type: object + status: + description: Status describes the most recently observed status of the FederatedObject. + properties: + clusters: + description: Clusters contains the propagation status of the Kubernetes object for individual member clusters. + items: + description: PropagationStatus describes the propagation of a Kubernetes object to a given member cluster. + properties: + cluster: + description: Cluster is the name of the member cluster. + type: string + lastObservedGeneration: + description: LastObservedGeneration is the last observed generation of the Kubernetes object in the member cluster. + format: int64 + type: integer + status: + description: Status describes the current status of propagating the Kubernetes object to the member cluster. + type: string + required: + - cluster + - status + type: object + type: array + collisionCount: + description: CollisionCount can be used in conjunction with RevisionHistory to implement rollbacks. + format: int32 + type: integer + conditions: + description: Conditions describe the current state of this FederatedObject. + items: + description: GenericFederatedObjectCondition contains the current details about a particular condition of a FederatedObject. + properties: + lastTransitionTime: + description: LastTransitionTime is the last time the status of this condition changed. + format: date-time + type: string + lastUpdateTime: + description: LastUpdateTime is the last time a reconciliation for this condition occurred. + format: date-time + type: string + reason: + description: Reason is the reason for the last status change of this condition. + type: string + status: + description: Status is the status of the condition, one of True, False or Unknown. + type: string + type: + description: Type is the type of the condition. + type: string + required: + - status + - type + type: object + type: array + syncedGeneration: + description: SyncedGeneration is the generation of this FederatedObject when it was last synced to selected member clusters. + format: int64 + type: integer + type: object + required: + - spec + type: object + served: true + storage: true + subresources: + status: {} diff --git a/config/crds/core.kubeadmiral.io_clusteroverridepolicies.yaml b/config/crds/core.kubeadmiral.io_clusteroverridepolicies.yaml index 1d918ecf..5d8bcdea 100644 --- a/config/crds/core.kubeadmiral.io_clusteroverridepolicies.yaml +++ b/config/crds/core.kubeadmiral.io_clusteroverridepolicies.yaml @@ -4,6 +4,7 @@ kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.11.1 + kubeadmiral.io/no-federated-resource: "true" creationTimestamp: null name: clusteroverridepolicies.core.kubeadmiral.io spec: @@ -13,187 +14,154 @@ spec: listKind: ClusterOverridePolicyList plural: clusteroverridepolicies shortNames: - - cop + - cop singular: clusteroverridepolicy scope: Cluster versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - description: ClusterOverridePolicy describes the override rules for a resource. - 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: - properties: - overrideRules: - description: OverrideRules specify the override rules. Each rule specifies - the overriders and the clusters these overriders should be applied - to. - items: - properties: - overriders: - description: Overriders specify the overriders to be applied - in the target clusters. - properties: - jsonpatch: - description: JsonPatch specifies overriders in a syntax - similar to RFC6902 JSON Patch. - items: - properties: - operator: - description: Operator specifies the operation. If - omitted, defaults to "replace". - type: string - path: - description: Path is a JSON pointer (RFC 6901) specifying - the location within the resource document where - the operation is performed. Each key in the path - should be prefixed with "/", while "~" and "/" should - be escaped as "~0" and "~1" respectively. For example, - to add a label "kubeadmiral.io/label", the path - should be "/metadata/labels/kubeadmiral.io~1label". - type: string - value: - description: Value is the value(s) required by the - operation. - x-kubernetes-preserve-unknown-fields: true - required: - - path - type: object - type: array - type: object - targetClusters: - description: TargetClusters selects the clusters in which the - overriders in this rule should be applied. If multiple types - of selectors are specified, the overall result is the intersection - of all of them. - properties: - clusterAffinity: - description: ClusterAffinity selects FederatedClusters by - matching their labels and fields against expressions. - If multiple terms are specified, their results are ORed. - items: - properties: - matchExpressions: - description: A list of cluster selector requirements - by cluster labels. - items: - description: ClusterSelectorRequirement is a selector - that contains values, a key, and an operator that - relates the values and keys - properties: - key: - type: string - operator: - description: ClusterSelectorOperator is the - set of operators that can be used in a cluster - selector requirement. - enum: - - In - - NotIn - - Exists - - DoesNotExist - - Gt - - Lt - type: string - values: - items: + - name: v1alpha1 + schema: + openAPIV3Schema: + description: ClusterOverridePolicy describes the override rules for a resource. + 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: + properties: + overrideRules: + description: OverrideRules specify the override rules. Each rule specifies the overriders and the clusters these overriders should be applied to. + items: + properties: + overriders: + description: Overriders specify the overriders to be applied in the target clusters. + properties: + jsonpatch: + description: JsonPatch specifies overriders in a syntax similar to RFC6902 JSON Patch. + items: + properties: + operator: + description: Operator specifies the operation. If omitted, defaults to "replace". + type: string + path: + description: Path is a JSON pointer (RFC 6901) specifying the location within the resource document where the operation is performed. Each key in the path should be prefixed with "/", while "~" and "/" should be escaped as "~0" and "~1" respectively. For example, to add a label "kubeadmiral.io/label", the path should be "/metadata/labels/kubeadmiral.io~1label". + type: string + value: + description: Value is the value(s) required by the operation. + x-kubernetes-preserve-unknown-fields: true + required: + - path + type: object + type: array + type: object + targetClusters: + description: TargetClusters selects the clusters in which the overriders in this rule should be applied. If multiple types of selectors are specified, the overall result is the intersection of all of them. + properties: + clusterAffinity: + description: ClusterAffinity selects FederatedClusters by matching their labels and fields against expressions. If multiple terms are specified, their results are ORed. + items: + properties: + matchExpressions: + description: A list of cluster selector requirements by cluster labels. + items: + description: ClusterSelectorRequirement is a selector that contains values, a key, and an operator that relates the values and keys + properties: + key: + type: string + operator: + description: ClusterSelectorOperator is the set of operators that can be used in a cluster selector requirement. + enum: + - In + - NotIn + - Exists + - DoesNotExist + - Gt + - Lt + type: string + values: + items: + type: string + type: array + required: + - key + - operator + - values + type: object + type: array + matchFields: + description: A list of cluster selector requirements by cluster fields. + items: + description: ClusterSelectorRequirement is a selector that contains values, a key, and an operator that relates the values and keys + properties: + key: type: string - type: array - required: - - key - - operator - - values - type: object - type: array - matchFields: - description: A list of cluster selector requirements - by cluster fields. - items: - description: ClusterSelectorRequirement is a selector - that contains values, a key, and an operator that - relates the values and keys - properties: - key: - type: string - operator: - description: ClusterSelectorOperator is the - set of operators that can be used in a cluster - selector requirement. - enum: - - In - - NotIn - - Exists - - DoesNotExist - - Gt - - Lt - type: string - values: - items: + operator: + description: ClusterSelectorOperator is the set of operators that can be used in a cluster selector requirement. + enum: + - In + - NotIn + - Exists + - DoesNotExist + - Gt + - Lt type: string - type: array - required: - - key - - operator - - values - type: object - type: array + values: + items: + type: string + type: array + required: + - key + - operator + - values + type: object + type: array + type: object + type: array + clusterSelector: + additionalProperties: + type: string + description: ClusterSelector selects FederatedClusters by their labels. Empty labels selects all FederatedClusters. type: object - type: array - clusterSelector: - additionalProperties: - type: string - description: ClusterSelector selects FederatedClusters by - their labels. Empty labels selects all FederatedClusters. - type: object - clusters: - description: Clusters selects FederatedClusters by their - names. Empty Clusters selects all FederatedClusters. - items: - type: string - type: array - type: object - type: object - type: array - type: object - status: - properties: - refCount: - format: int64 - minimum: 0 - type: integer - typedRefCount: - items: - properties: - count: - format: int64 - minimum: 0 - type: integer - group: - type: string - resource: - type: string - required: - - count - - resource - type: object - type: array - type: object - required: - - spec - type: object - served: true - storage: true - subresources: - status: {} + clusters: + description: Clusters selects FederatedClusters by their names. Empty Clusters selects all FederatedClusters. + items: + type: string + type: array + type: object + type: object + type: array + type: object + status: + properties: + refCount: + format: int64 + minimum: 0 + type: integer + typedRefCount: + items: + properties: + count: + format: int64 + minimum: 0 + type: integer + group: + type: string + resource: + type: string + required: + - count + - resource + type: object + type: array + type: object + required: + - spec + type: object + served: true + storage: true + subresources: + status: {} diff --git a/config/crds/core.kubeadmiral.io_clusterpropagatedversions.yaml b/config/crds/core.kubeadmiral.io_clusterpropagatedversions.yaml index 1b5c8f35..a1b58028 100644 --- a/config/crds/core.kubeadmiral.io_clusterpropagatedversions.yaml +++ b/config/crds/core.kubeadmiral.io_clusterpropagatedversions.yaml @@ -4,6 +4,7 @@ kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.11.1 + kubeadmiral.io/no-federated-resource: "true" creationTimestamp: null name: clusterpropagatedversions.core.kubeadmiral.io spec: @@ -15,61 +16,49 @@ spec: singular: clusterpropagatedversion scope: Cluster versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - description: ClusterPropagatedVersion holds version information about the - state propagated from KubeFed APIs (configured by FederatedTypeConfig resources) - to member clusters. The name of a ClusterPropagatedVersion encodes the kind - and name of the resource it stores information for (i.e. -). If a target resource has a populated metadata.Generation field, - the generation will be stored with a prefix of `gen:` as the version for - the cluster. If metadata.Generation is not available, metadata.ResourceVersion - will be stored with a prefix of `rv:` as the version for the cluster. - 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 - status: - description: PropagatedVersionStatus defines the observed state of PropagatedVersion - properties: - clusterVersions: - description: The last versions produced in each cluster for this resource. - items: - properties: - clusterName: - description: The name of the cluster the version is for. - type: string - version: - description: The last version produced for the resource by a - KubeFed operation. - type: string - required: - - clusterName - - version - type: object - type: array - overridesVersion: - description: The observed version of the overrides for this resource. - type: string - templateVersion: - description: The observed version of the template for this resource. - type: string - required: - - overridesVersion - - templateVersion - type: object - type: object - served: true - storage: true - subresources: - status: {} + - name: v1alpha1 + schema: + openAPIV3Schema: + description: ClusterPropagatedVersion holds version information about the state propagated from KubeFed APIs (configured by FederatedTypeConfig resources) to member clusters. The name of a ClusterPropagatedVersion encodes the kind and name of the resource it stores information for (i.e. -). If a target resource has a populated metadata.Generation field, the generation will be stored with a prefix of `gen:` as the version for the cluster. If metadata.Generation is not available, metadata.ResourceVersion will be stored with a prefix of `rv:` as the version for the cluster. + 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 + status: + description: PropagatedVersionStatus defines the observed state of PropagatedVersion + properties: + clusterVersions: + description: The last versions produced in each cluster for this resource. + items: + properties: + clusterName: + description: The name of the cluster the version is for. + type: string + version: + description: The last version produced for the resource by a KubeFed operation. + type: string + required: + - clusterName + - version + type: object + type: array + overridesVersion: + description: The observed version of the overrides for this resource. + type: string + templateVersion: + description: The observed version of the template for this resource. + type: string + required: + - overridesVersion + - templateVersion + type: object + type: object + served: true + storage: true + subresources: + status: {} diff --git a/config/crds/core.kubeadmiral.io_clusterpropagationpolicies.yaml b/config/crds/core.kubeadmiral.io_clusterpropagationpolicies.yaml index 828a179f..f3707846 100644 --- a/config/crds/core.kubeadmiral.io_clusterpropagationpolicies.yaml +++ b/config/crds/core.kubeadmiral.io_clusterpropagationpolicies.yaml @@ -4,6 +4,7 @@ kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.11.1 + kubeadmiral.io/no-federated-resource: "true" creationTimestamp: null name: clusterpropagationpolicies.core.kubeadmiral.io spec: diff --git a/config/crds/core.kubeadmiral.io_collectedstatuses.yaml b/config/crds/core.kubeadmiral.io_collectedstatuses.yaml index 815d4ed2..a455bd20 100644 --- a/config/crds/core.kubeadmiral.io_collectedstatuses.yaml +++ b/config/crds/core.kubeadmiral.io_collectedstatuses.yaml @@ -4,6 +4,7 @@ kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.11.1 + kubeadmiral.io/no-federated-resource: "true" creationTimestamp: null name: collectedstatuses.core.kubeadmiral.io spec: @@ -13,58 +14,49 @@ spec: listKind: CollectedStatusList plural: collectedstatuses shortNames: - - cs + - cs singular: collectedstatus scope: Namespaced versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - description: CollectedStatus stores the collected fields of Kubernetes objects - from member clusters, that are propagated by a FederatedObject. - 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 - clusters: - description: Clusters is the list of member clusters and collected fields - for its propagated Kubernetes object. - items: - description: CollectedFieldsWithCluster stores the collected fields - of a Kubernetes object in a member cluster. - properties: - cluster: - description: Cluster is the name of the member cluster. - type: string - collectedFields: - description: CollectedFields is the the set of fields collected - for the Kubernetes object. - x-kubernetes-preserve-unknown-fields: true - error: - description: Error records any errors encountered while collecting - fields from the cluster. - type: string - required: - - cluster - - collectedFields + - name: v1alpha1 + schema: + openAPIV3Schema: + description: CollectedStatus stores the collected fields of Kubernetes objects from member clusters, that are propagated by a FederatedObject. + 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 + clusters: + description: Clusters is the list of member clusters and collected fields for its propagated Kubernetes object. + items: + description: CollectedFieldsWithCluster stores the collected fields of a Kubernetes object in a member cluster. + properties: + cluster: + description: Cluster is the name of the member cluster. + type: string + collectedFields: + description: CollectedFields is the the set of fields collected for the Kubernetes object. + x-kubernetes-preserve-unknown-fields: true + error: + description: Error records any errors encountered while collecting fields from the cluster. + type: string + required: + - cluster + - collectedFields + type: object + type: array + 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 + lastUpdateTime: + description: LastUpdateTime is the last time that a collection was performed. + format: date-time + type: string + metadata: type: object - type: array - 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 - lastUpdateTime: - description: LastUpdateTime is the last time that a collection was performed. - format: date-time - type: string - metadata: - type: object - required: - - clusters - - lastUpdateTime - type: object - served: true - storage: true + required: + - clusters + - lastUpdateTime + type: object + served: true + storage: true diff --git a/config/crds/core.kubeadmiral.io_federatedclusters.yaml b/config/crds/core.kubeadmiral.io_federatedclusters.yaml index be926b74..4aba2edc 100644 --- a/config/crds/core.kubeadmiral.io_federatedclusters.yaml +++ b/config/crds/core.kubeadmiral.io_federatedclusters.yaml @@ -4,6 +4,7 @@ kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.11.1 + kubeadmiral.io/no-federated-resource: "true" creationTimestamp: null name: federatedclusters.core.kubeadmiral.io spec: @@ -13,203 +14,180 @@ spec: listKind: FederatedClusterList plural: federatedclusters shortNames: - - fcluster + - fcluster singular: federatedcluster scope: Cluster versions: - - additionalPrinterColumns: - - jsonPath: .status.conditions[?(@.type=='Ready')].status - name: ready - type: string - - jsonPath: .status.conditions[?(@.type=='Joined')].status - name: joined - type: string - - jsonPath: .metadata.creationTimestamp - name: age - type: date - name: v1alpha1 - schema: - openAPIV3Schema: - description: FederatedCluster is the Schema for the federatedclusters API - 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: FederatedClusterSpec defines the desired state of FederatedCluster - properties: - apiEndpoint: - description: The API endpoint of the member cluster. This can be a - hostname, hostname:port, IP or IP:port. - type: string - insecure: - description: Access API endpoint with security. - type: boolean - secretRef: - description: Name of the secret containing the token required to access - the member cluster. The secret needs to exist in the fed system - namespace. - properties: - name: - description: Name of a secret within the enclosing namespace - type: string - required: - - name - type: object - taints: - description: If specified, the cluster's taints. - items: - description: The node this Taint is attached to has the "effect" - on any pod that does not tolerate the Taint. + - additionalPrinterColumns: + - jsonPath: .status.conditions[?(@.type=='Ready')].status + name: ready + type: string + - jsonPath: .status.conditions[?(@.type=='Joined')].status + name: joined + type: string + - jsonPath: .metadata.creationTimestamp + name: age + type: date + name: v1alpha1 + schema: + openAPIV3Schema: + description: FederatedCluster is the Schema for the federatedclusters API + 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: FederatedClusterSpec defines the desired state of FederatedCluster + properties: + apiEndpoint: + description: The API endpoint of the member cluster. This can be a hostname, hostname:port, IP or IP:port. + type: string + insecure: + description: Access API endpoint with security. + type: boolean + secretRef: + description: Name of the secret containing the token required to access the member cluster. The secret needs to exist in the fed system namespace. properties: - effect: - description: Required. The effect of the taint on pods that - do not tolerate the taint. Valid effects are NoSchedule, PreferNoSchedule - and NoExecute. - type: string - key: - description: Required. The taint key to be applied to a node. - type: string - timeAdded: - description: TimeAdded represents the time at which the taint - was added. It is only written for NoExecute taints. - format: date-time - type: string - value: - description: The taint value corresponding to the taint key. - type: string - required: - - effect - - key - type: object - type: array - useServiceAccount: - description: Whether to use service account token to authenticate - to the member cluster. - type: boolean - required: - - apiEndpoint - - secretRef - type: object - status: - description: FederatedClusterStatus defines the observed state of FederatedCluster - properties: - apiResourceTypes: - description: The list of api resource types defined in the federated - cluster - items: - description: APIResource represents a Kubernetes API resource. - properties: - group: - description: Group of the resource. - type: string - kind: - description: Kind of the resource. - type: string - pluralName: - description: Lower-cased plural name of the resource (e.g. configmaps). If - not provided, it will be computed by lower-casing the kind - and suffixing an 's'. - type: string - scope: - description: Scope of the resource. - type: string - version: - description: Version of the resource. + name: + description: Name of a secret within the enclosing namespace type: string required: - - kind - - pluralName - - scope - - version + - name type: object - type: array - conditions: - description: Conditions is an array of current cluster conditions. - items: - description: ClusterCondition describes current state of a cluster. - properties: - lastProbeTime: - description: Last time the condition was checked. - format: date-time - type: string - lastTransitionTime: - description: Last time the condition transit from one status - to another. - format: date-time - type: string - message: - description: Human readable message indicating details about - the current status. - type: string - reason: - description: Programmatic identifier indicating the reason for - the current status. - type: string - status: - description: Status of the condition, one of True, False, Unknown. - type: string - type: - description: Type of cluster condition, Ready or Offline. - type: string - required: - - lastProbeTime - - lastTransitionTime - - message - - reason - - status - - type - type: object - type: array - x-kubernetes-list-map-keys: - - type - x-kubernetes-list-type: map - joinPerformed: - description: Whether any effectual action was performed in the cluster - while joining. If true, clean-up is required on cluster removal - to undo the side-effects. - type: boolean - resources: - description: Resources describes the cluster's resources. - properties: - allocatable: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: Allocatable represents the total resources that are - allocatable for scheduling. + taints: + description: If specified, the cluster's taints. + items: + description: The node this Taint is attached to has the "effect" on any pod that does not tolerate the Taint. + properties: + effect: + description: Required. The effect of the taint on pods that do not tolerate the taint. Valid effects are NoSchedule, PreferNoSchedule and NoExecute. + type: string + key: + description: Required. The taint key to be applied to a node. + type: string + timeAdded: + description: TimeAdded represents the time at which the taint was added. It is only written for NoExecute taints. + format: date-time + type: string + value: + description: The taint value corresponding to the taint key. + type: string + required: + - effect + - key + type: object + type: array + useServiceAccount: + description: Whether to use service account token to authenticate to the member cluster. + type: boolean + required: + - apiEndpoint + - secretRef + type: object + status: + description: FederatedClusterStatus defines the observed state of FederatedCluster + properties: + apiResourceTypes: + description: The list of api resource types defined in the federated cluster + items: + description: APIResource represents a Kubernetes API resource. + properties: + group: + description: Group of the resource. + type: string + kind: + description: Kind of the resource. + type: string + pluralName: + description: Lower-cased plural name of the resource (e.g. configmaps). If not provided, it will be computed by lower-casing the kind and suffixing an 's'. + type: string + scope: + description: Scope of the resource. + type: string + version: + description: Version of the resource. + type: string + required: + - kind + - pluralName + - scope + - version type: object - available: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: Available represents the resources currently available - for scheduling. + type: array + conditions: + description: Conditions is an array of current cluster conditions. + items: + description: ClusterCondition describes current state of a cluster. + properties: + lastProbeTime: + description: Last time the condition was checked. + format: date-time + type: string + lastTransitionTime: + description: Last time the condition transit from one status to another. + format: date-time + type: string + message: + description: Human readable message indicating details about the current status. + type: string + reason: + description: Programmatic identifier indicating the reason for the current status. + type: string + status: + description: Status of the condition, one of True, False, Unknown. + type: string + type: + description: Type of cluster condition, Ready or Offline. + type: string + required: + - lastProbeTime + - lastTransitionTime + - message + - reason + - status + - type type: object - schedulableNodes: - description: SchedulableNodes represents number of nodes which - is ready and schedulable. - format: int64 - type: integer - type: object - type: object - type: object - served: true - storage: true - subresources: - status: {} + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + joinPerformed: + description: Whether any effectual action was performed in the cluster while joining. If true, clean-up is required on cluster removal to undo the side-effects. + type: boolean + resources: + description: Resources describes the cluster's resources. + properties: + allocatable: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: Allocatable represents the total resources that are allocatable for scheduling. + type: object + available: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: Available represents the resources currently available for scheduling. + type: object + schedulableNodes: + description: SchedulableNodes represents number of nodes which is ready and schedulable. + format: int64 + type: integer + type: object + type: object + type: object + served: true + storage: true + subresources: + status: {} diff --git a/config/crds/core.kubeadmiral.io_federatedobjects.yaml b/config/crds/core.kubeadmiral.io_federatedobjects.yaml index aa8e9cef..33f803e4 100644 --- a/config/crds/core.kubeadmiral.io_federatedobjects.yaml +++ b/config/crds/core.kubeadmiral.io_federatedobjects.yaml @@ -4,6 +4,7 @@ kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.11.1 + kubeadmiral.io/no-federated-resource: "true" creationTimestamp: null name: federatedobjects.core.kubeadmiral.io spec: @@ -13,213 +14,178 @@ spec: listKind: FederatedObjectList plural: federatedobjects shortNames: - - fo + - fo singular: federatedobject scope: Namespaced versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - description: FederatedObject describes a namespace-scoped Kubernetes object - and how it should be propagated to different member clusters. - 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 the desired behavior of the FederatedObject. - properties: - follows: - description: Follows defines other objects, or "leaders", that the - Kubernetes object should follow during propagation, i.e. the Kubernetes - object should be propagated to all member clusters that its "leaders" - are placed in. - items: - description: LeaderReference contains the identifying metadata of - a "leader" Kubernetes object. - properties: - group: - type: string - kind: - type: string - name: - type: string - namespace: - type: string - required: - - kind - - name - type: object - type: array - overrides: - description: Overrides describe the overrides that should be applied - to the base template of the Kubernetes object before it is propagated - to individual member clusters. - items: - description: OverrideWithController describes the overrides that - will be applied to a Kubernetes object before it is propagated - to individual member clusters. - properties: - clusters: - description: Override is the list of member clusters and their - respective override patches. - items: - description: ClusterReferenceWithPatches represents a single - member cluster and a list of override patches for the cluster. - properties: - cluster: - description: Cluster is the name of the member cluster. - type: string - patches: - description: Patches is the list of override patches for - the member cluster. - items: - description: OverridePatch defines a JSON patch. - properties: - op: - type: string - path: - type: string - value: - x-kubernetes-preserve-unknown-fields: true - required: - - path - type: object - type: array - required: - - cluster - type: object - type: array - controller: - description: Controller identifies the controller responsible - for this override. - type: string - required: - - clusters - - controller - type: object - type: array - placements: - description: Placements describe the member clusters that the Kubernetes - object will be propagated to, which is a union of all the listed - clusters. - items: - description: PlacementWithController describes the member clusters - that a Kubernetes object should be propagated to. - properties: - controller: - description: Controller identifies the controller responsible - for this placement. - type: string - placement: - description: Placement is the list of member clusters that the - Kubernetes object should be propagated to. - items: - description: ClusterReference represents a single member cluster. - properties: - cluster: - description: Cluster is the name of the member cluster. - type: string - required: - - cluster - type: object - type: array - required: - - controller - - placement - type: object - type: array - template: - description: Template is the base template of the Kubernetes object - to be propagated. - x-kubernetes-preserve-unknown-fields: true - required: - - template - type: object - status: - description: Status describes the most recently observed status of the - FederatedObject. - properties: - clusters: - description: Clusters contains the propagation status of the Kubernetes - object for individual member clusters. - items: - description: PropagationStatus describes the propagation of a Kubernetes - object to a given member cluster. - properties: - cluster: - description: Cluster is the name of the member cluster. - type: string - lastObservedGeneration: - description: LastObservedGeneration is the last observed generation - of the Kubernetes object in the member cluster. - format: int64 - type: integer - status: - description: Status describes the current status of propagating - the Kubernetes object to the member cluster. - type: string - required: - - cluster - - status - type: object - type: array - collisionCount: - description: CollisionCount can be used in conjunction with RevisionHistory - to implement rollbacks. - format: int32 - type: integer - conditions: - description: Conditions describe the current state of this FederatedObject. - items: - description: GenericFederatedObjectCondition contains the current - details about a particular condition of a FederatedObject. - properties: - lastTransitionTime: - description: LastTransitionTime is the last time the status - of this condition changed. - format: date-time - type: string - lastUpdateTime: - description: LastUpdateTime is the last time a reconciliation - for this condition occurred. - format: date-time - type: string - reason: - description: Reason is the reason for the last status change - of this condition. - type: string - status: - description: Status is the status of the condition, one of True, - False or Unknown. - type: string - type: - description: Type is the type of the condition. - type: string - required: - - status - - type - type: object - type: array - syncedGeneration: - description: SyncedGeneration is the generation of this FederatedObject - when it was last synced to selected member clusters. - format: int64 - type: integer - type: object - required: - - spec - type: object - served: true - storage: true - subresources: - status: {} + - name: v1alpha1 + schema: + openAPIV3Schema: + description: FederatedObject describes a namespace-scoped Kubernetes object and how it should be propagated to different member clusters. + 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 the desired behavior of the FederatedObject. + properties: + follows: + description: Follows defines other objects, or "leaders", that the Kubernetes object should follow during propagation, i.e. the Kubernetes object should be propagated to all member clusters that its "leaders" are placed in. + items: + description: LeaderReference contains the identifying metadata of a "leader" Kubernetes object. + properties: + group: + type: string + kind: + type: string + name: + type: string + namespace: + type: string + required: + - kind + - name + type: object + type: array + overrides: + description: Overrides describe the overrides that should be applied to the base template of the Kubernetes object before it is propagated to individual member clusters. + items: + description: OverrideWithController describes the overrides that will be applied to a Kubernetes object before it is propagated to individual member clusters. + properties: + clusters: + description: Override is the list of member clusters and their respective override patches. + items: + description: ClusterReferenceWithPatches represents a single member cluster and a list of override patches for the cluster. + properties: + cluster: + description: Cluster is the name of the member cluster. + type: string + patches: + description: Patches is the list of override patches for the member cluster. + items: + description: OverridePatch defines a JSON patch. + properties: + op: + type: string + path: + type: string + value: + x-kubernetes-preserve-unknown-fields: true + required: + - path + type: object + type: array + required: + - cluster + type: object + type: array + controller: + description: Controller identifies the controller responsible for this override. + type: string + required: + - clusters + - controller + type: object + type: array + placements: + description: Placements describe the member clusters that the Kubernetes object will be propagated to, which is a union of all the listed clusters. + items: + description: PlacementWithController describes the member clusters that a Kubernetes object should be propagated to. + properties: + controller: + description: Controller identifies the controller responsible for this placement. + type: string + placement: + description: Placement is the list of member clusters that the Kubernetes object should be propagated to. + items: + description: ClusterReference represents a single member cluster. + properties: + cluster: + description: Cluster is the name of the member cluster. + type: string + required: + - cluster + type: object + type: array + required: + - controller + - placement + type: object + type: array + template: + description: Template is the base template of the Kubernetes object to be propagated. + x-kubernetes-preserve-unknown-fields: true + required: + - template + type: object + status: + description: Status describes the most recently observed status of the FederatedObject. + properties: + clusters: + description: Clusters contains the propagation status of the Kubernetes object for individual member clusters. + items: + description: PropagationStatus describes the propagation of a Kubernetes object to a given member cluster. + properties: + cluster: + description: Cluster is the name of the member cluster. + type: string + lastObservedGeneration: + description: LastObservedGeneration is the last observed generation of the Kubernetes object in the member cluster. + format: int64 + type: integer + status: + description: Status describes the current status of propagating the Kubernetes object to the member cluster. + type: string + required: + - cluster + - status + type: object + type: array + collisionCount: + description: CollisionCount can be used in conjunction with RevisionHistory to implement rollbacks. + format: int32 + type: integer + conditions: + description: Conditions describe the current state of this FederatedObject. + items: + description: GenericFederatedObjectCondition contains the current details about a particular condition of a FederatedObject. + properties: + lastTransitionTime: + description: LastTransitionTime is the last time the status of this condition changed. + format: date-time + type: string + lastUpdateTime: + description: LastUpdateTime is the last time a reconciliation for this condition occurred. + format: date-time + type: string + reason: + description: Reason is the reason for the last status change of this condition. + type: string + status: + description: Status is the status of the condition, one of True, False or Unknown. + type: string + type: + description: Type is the type of the condition. + type: string + required: + - status + - type + type: object + type: array + syncedGeneration: + description: SyncedGeneration is the generation of this FederatedObject when it was last synced to selected member clusters. + format: int64 + type: integer + type: object + required: + - spec + type: object + served: true + storage: true + subresources: + status: {} diff --git a/config/crds/core.kubeadmiral.io_federatedtypeconfigs.yaml b/config/crds/core.kubeadmiral.io_federatedtypeconfigs.yaml index c38a577f..14d563ac 100644 --- a/config/crds/core.kubeadmiral.io_federatedtypeconfigs.yaml +++ b/config/crds/core.kubeadmiral.io_federatedtypeconfigs.yaml @@ -4,6 +4,7 @@ kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.11.1 + kubeadmiral.io/no-federated-resource: "true" creationTimestamp: null name: federatedtypeconfigs.core.kubeadmiral.io spec: @@ -13,163 +14,132 @@ spec: listKind: FederatedTypeConfigList plural: federatedtypeconfigs shortNames: - - ftc + - ftc singular: federatedtypeconfig scope: Cluster versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - description: FederatedTypeConfig specifies an API resource type to federate - and various type-specific options. - 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: - properties: - autoMigration: - description: Configuration for AutoMigration. If left empty, the AutoMigration - feature will be disabled. - properties: - enabled: - description: Whether or not to automatically migrate unschedulable - pods to a different cluster. - type: boolean - required: - - enabled - type: object - controllers: - description: The controllers that must run before the source object - can be propagated to member clusters. Each inner slice specifies - a step. Step T must complete before step T+1 can commence. Controllers - within each step can execute in parallel. - items: + - name: v1alpha1 + schema: + openAPIV3Schema: + description: FederatedTypeConfig specifies an API resource type to federate and various type-specific options. + 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: + properties: + autoMigration: + description: Configuration for AutoMigration. If left empty, the AutoMigration feature will be disabled. + properties: + enabled: + description: Whether or not to automatically migrate unschedulable pods to a different cluster. + type: boolean + required: + - enabled + type: object + controllers: + description: The controllers that must run before the source object can be propagated to member clusters. Each inner slice specifies a step. Step T must complete before step T+1 can commence. Controllers within each step can execute in parallel. items: - type: string - type: array - type: array - pathDefinition: - description: Defines the paths to various fields in the target object's - schema. - properties: - availableReplicasStatus: - description: Path to a numeric field that reflects the number - of available replicas that the object currently has. E.g. `status.availableReplicas` - for Deployment and ReplicaSet. - type: string - labelSelector: - description: Path to a metav1.LabelSelector field that selects - the replicas for this object. E.g. `spec.selector` for Deployment - and ReplicaSet. - type: string - readyReplicasStatus: - description: Path to a numeric field that reflects the number - of ready replicas that the object currently has. E.g. `status.readyReplicas` - for Deployment and ReplicaSet. - type: string - replicasSpec: - description: Path to a numeric field that indicates the number - of replicas that an object can be divided into. E.g. `spec.replicas` - for Deployment and ReplicaSet. - type: string - replicasStatus: - description: Path to a numeric field that reflects the number - of replicas that the object currently has. E.g. `status.replicas` - for Deployment and ReplicaSet. - type: string - type: object - revisionHistory: - description: Configuration for RevisionHistory. If left empty, the - RevisionHistory feature will be disabled. - properties: - enabled: - description: Whether or not preserve a RevisionHistory for the - federated object during updates. - type: boolean - required: - - enabled - type: object - rolloutPlan: - description: Configuration for RolloutPlan. If left empty, the RolloutPlan - feature will be disabled. - properties: - enabled: - description: Whether or not to synchronize the rollout process - across clusters. - type: boolean - required: - - enabled - type: object - sourceType: - description: The API resource type to be federated. - properties: - group: - description: Group of the resource. - type: string - kind: - description: Kind of the resource. - type: string - pluralName: - description: Lower-cased plural name of the resource (e.g. configmaps). If - not provided, it will be computed by lower-casing the kind and - suffixing an 's'. - type: string - scope: - description: Scope of the resource. - type: string - version: - description: Version of the resource. - type: string - required: - - kind - - pluralName - - scope - - version - type: object - statusAggregation: - description: Configuration for StatusAggregation. If left empty, the - StatusAggregation feature will be disabled. - properties: - enabled: - description: Whether or not to enable status aggregation. - type: boolean - required: - - enabled - type: object - statusCollection: - description: Configuration for StatusCollection. If left empty, the - StatusCollection feature will be disabled. - properties: - enabled: - description: Whether or not to enable status collection. - type: boolean - fields: - description: Contains the fields to be collected during status - collection. Each field is a dot separated string that corresponds - to its path in the source object's schema. E.g. `metadata.creationTimestamp`. items: type: string type: array - required: - - enabled - type: object - required: - - sourceType - type: object - required: - - spec - type: object - served: true - storage: true - subresources: - status: {} + type: array + pathDefinition: + description: Defines the paths to various fields in the target object's schema. + properties: + availableReplicasStatus: + description: Path to a numeric field that reflects the number of available replicas that the object currently has. E.g. `status.availableReplicas` for Deployment and ReplicaSet. + type: string + labelSelector: + description: Path to a metav1.LabelSelector field that selects the replicas for this object. E.g. `spec.selector` for Deployment and ReplicaSet. + type: string + readyReplicasStatus: + description: Path to a numeric field that reflects the number of ready replicas that the object currently has. E.g. `status.readyReplicas` for Deployment and ReplicaSet. + type: string + replicasSpec: + description: Path to a numeric field that indicates the number of replicas that an object can be divided into. E.g. `spec.replicas` for Deployment and ReplicaSet. + type: string + replicasStatus: + description: Path to a numeric field that reflects the number of replicas that the object currently has. E.g. `status.replicas` for Deployment and ReplicaSet. + type: string + type: object + revisionHistory: + description: Configuration for RevisionHistory. If left empty, the RevisionHistory feature will be disabled. + properties: + enabled: + description: Whether or not preserve a RevisionHistory for the federated object during updates. + type: boolean + required: + - enabled + type: object + rolloutPlan: + description: Configuration for RolloutPlan. If left empty, the RolloutPlan feature will be disabled. + properties: + enabled: + description: Whether or not to synchronize the rollout process across clusters. + type: boolean + required: + - enabled + type: object + sourceType: + description: The API resource type to be federated. + properties: + group: + description: Group of the resource. + type: string + kind: + description: Kind of the resource. + type: string + pluralName: + description: Lower-cased plural name of the resource (e.g. configmaps). If not provided, it will be computed by lower-casing the kind and suffixing an 's'. + type: string + scope: + description: Scope of the resource. + type: string + version: + description: Version of the resource. + type: string + required: + - kind + - pluralName + - scope + - version + type: object + statusAggregation: + description: Configuration for StatusAggregation. If left empty, the StatusAggregation feature will be disabled. + properties: + enabled: + description: Whether or not to enable status aggregation. + type: boolean + required: + - enabled + type: object + statusCollection: + description: Configuration for StatusCollection. If left empty, the StatusCollection feature will be disabled. + properties: + enabled: + description: Whether or not to enable status collection. + type: boolean + fields: + description: Contains the fields to be collected during status collection. Each field is a dot separated string that corresponds to its path in the source object's schema. E.g. `metadata.creationTimestamp`. + items: + type: string + type: array + required: + - enabled + type: object + required: + - sourceType + type: object + required: + - spec + type: object + served: true + storage: true + subresources: + status: {} diff --git a/config/crds/core.kubeadmiral.io_overridepolicies.yaml b/config/crds/core.kubeadmiral.io_overridepolicies.yaml index c2727763..f15c6e41 100644 --- a/config/crds/core.kubeadmiral.io_overridepolicies.yaml +++ b/config/crds/core.kubeadmiral.io_overridepolicies.yaml @@ -4,6 +4,7 @@ kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.11.1 + kubeadmiral.io/no-federated-resource: "true" creationTimestamp: null name: overridepolicies.core.kubeadmiral.io spec: @@ -13,187 +14,154 @@ spec: listKind: OverridePolicyList plural: overridepolicies shortNames: - - op + - op singular: overridepolicy scope: Namespaced versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - description: OverridePolicy describes the override rules for a resource. - 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: - properties: - overrideRules: - description: OverrideRules specify the override rules. Each rule specifies - the overriders and the clusters these overriders should be applied - to. - items: - properties: - overriders: - description: Overriders specify the overriders to be applied - in the target clusters. - properties: - jsonpatch: - description: JsonPatch specifies overriders in a syntax - similar to RFC6902 JSON Patch. - items: - properties: - operator: - description: Operator specifies the operation. If - omitted, defaults to "replace". - type: string - path: - description: Path is a JSON pointer (RFC 6901) specifying - the location within the resource document where - the operation is performed. Each key in the path - should be prefixed with "/", while "~" and "/" should - be escaped as "~0" and "~1" respectively. For example, - to add a label "kubeadmiral.io/label", the path - should be "/metadata/labels/kubeadmiral.io~1label". - type: string - value: - description: Value is the value(s) required by the - operation. - x-kubernetes-preserve-unknown-fields: true - required: - - path - type: object - type: array - type: object - targetClusters: - description: TargetClusters selects the clusters in which the - overriders in this rule should be applied. If multiple types - of selectors are specified, the overall result is the intersection - of all of them. - properties: - clusterAffinity: - description: ClusterAffinity selects FederatedClusters by - matching their labels and fields against expressions. - If multiple terms are specified, their results are ORed. - items: - properties: - matchExpressions: - description: A list of cluster selector requirements - by cluster labels. - items: - description: ClusterSelectorRequirement is a selector - that contains values, a key, and an operator that - relates the values and keys - properties: - key: - type: string - operator: - description: ClusterSelectorOperator is the - set of operators that can be used in a cluster - selector requirement. - enum: - - In - - NotIn - - Exists - - DoesNotExist - - Gt - - Lt - type: string - values: - items: + - name: v1alpha1 + schema: + openAPIV3Schema: + description: OverridePolicy describes the override rules for a resource. + 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: + properties: + overrideRules: + description: OverrideRules specify the override rules. Each rule specifies the overriders and the clusters these overriders should be applied to. + items: + properties: + overriders: + description: Overriders specify the overriders to be applied in the target clusters. + properties: + jsonpatch: + description: JsonPatch specifies overriders in a syntax similar to RFC6902 JSON Patch. + items: + properties: + operator: + description: Operator specifies the operation. If omitted, defaults to "replace". + type: string + path: + description: Path is a JSON pointer (RFC 6901) specifying the location within the resource document where the operation is performed. Each key in the path should be prefixed with "/", while "~" and "/" should be escaped as "~0" and "~1" respectively. For example, to add a label "kubeadmiral.io/label", the path should be "/metadata/labels/kubeadmiral.io~1label". + type: string + value: + description: Value is the value(s) required by the operation. + x-kubernetes-preserve-unknown-fields: true + required: + - path + type: object + type: array + type: object + targetClusters: + description: TargetClusters selects the clusters in which the overriders in this rule should be applied. If multiple types of selectors are specified, the overall result is the intersection of all of them. + properties: + clusterAffinity: + description: ClusterAffinity selects FederatedClusters by matching their labels and fields against expressions. If multiple terms are specified, their results are ORed. + items: + properties: + matchExpressions: + description: A list of cluster selector requirements by cluster labels. + items: + description: ClusterSelectorRequirement is a selector that contains values, a key, and an operator that relates the values and keys + properties: + key: + type: string + operator: + description: ClusterSelectorOperator is the set of operators that can be used in a cluster selector requirement. + enum: + - In + - NotIn + - Exists + - DoesNotExist + - Gt + - Lt + type: string + values: + items: + type: string + type: array + required: + - key + - operator + - values + type: object + type: array + matchFields: + description: A list of cluster selector requirements by cluster fields. + items: + description: ClusterSelectorRequirement is a selector that contains values, a key, and an operator that relates the values and keys + properties: + key: type: string - type: array - required: - - key - - operator - - values - type: object - type: array - matchFields: - description: A list of cluster selector requirements - by cluster fields. - items: - description: ClusterSelectorRequirement is a selector - that contains values, a key, and an operator that - relates the values and keys - properties: - key: - type: string - operator: - description: ClusterSelectorOperator is the - set of operators that can be used in a cluster - selector requirement. - enum: - - In - - NotIn - - Exists - - DoesNotExist - - Gt - - Lt - type: string - values: - items: + operator: + description: ClusterSelectorOperator is the set of operators that can be used in a cluster selector requirement. + enum: + - In + - NotIn + - Exists + - DoesNotExist + - Gt + - Lt type: string - type: array - required: - - key - - operator - - values - type: object - type: array + values: + items: + type: string + type: array + required: + - key + - operator + - values + type: object + type: array + type: object + type: array + clusterSelector: + additionalProperties: + type: string + description: ClusterSelector selects FederatedClusters by their labels. Empty labels selects all FederatedClusters. type: object - type: array - clusterSelector: - additionalProperties: - type: string - description: ClusterSelector selects FederatedClusters by - their labels. Empty labels selects all FederatedClusters. - type: object - clusters: - description: Clusters selects FederatedClusters by their - names. Empty Clusters selects all FederatedClusters. - items: - type: string - type: array - type: object - type: object - type: array - type: object - status: - properties: - refCount: - format: int64 - minimum: 0 - type: integer - typedRefCount: - items: - properties: - count: - format: int64 - minimum: 0 - type: integer - group: - type: string - resource: - type: string - required: - - count - - resource - type: object - type: array - type: object - required: - - spec - type: object - served: true - storage: true - subresources: - status: {} + clusters: + description: Clusters selects FederatedClusters by their names. Empty Clusters selects all FederatedClusters. + items: + type: string + type: array + type: object + type: object + type: array + type: object + status: + properties: + refCount: + format: int64 + minimum: 0 + type: integer + typedRefCount: + items: + properties: + count: + format: int64 + minimum: 0 + type: integer + group: + type: string + resource: + type: string + required: + - count + - resource + type: object + type: array + type: object + required: + - spec + type: object + served: true + storage: true + subresources: + status: {} diff --git a/config/crds/core.kubeadmiral.io_propagatedversions.yaml b/config/crds/core.kubeadmiral.io_propagatedversions.yaml index d18bbd69..52940220 100644 --- a/config/crds/core.kubeadmiral.io_propagatedversions.yaml +++ b/config/crds/core.kubeadmiral.io_propagatedversions.yaml @@ -4,6 +4,7 @@ kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.11.1 + kubeadmiral.io/no-federated-resource: "true" creationTimestamp: null name: propagatedversions.core.kubeadmiral.io spec: @@ -15,61 +16,49 @@ spec: singular: propagatedversion scope: Namespaced versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - description: PropagatedVersion holds version information about the state propagated - from KubeFed APIs (configured by FederatedTypeConfig resources) to member - clusters. The name of a PropagatedVersion encodes the kind and name of the - resource it stores information for (i.e. -). - If a target resource has a populated metadata.Generation field, the generation - will be stored with a prefix of `gen:` as the version for the cluster. If - metadata.Generation is not available, metadata.ResourceVersion will be stored - with a prefix of `rv:` as the version for the cluster. - 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 - status: - description: PropagatedVersionStatus defines the observed state of PropagatedVersion - properties: - clusterVersions: - description: The last versions produced in each cluster for this resource. - items: - properties: - clusterName: - description: The name of the cluster the version is for. - type: string - version: - description: The last version produced for the resource by a - KubeFed operation. - type: string - required: - - clusterName - - version - type: object - type: array - overridesVersion: - description: The observed version of the overrides for this resource. - type: string - templateVersion: - description: The observed version of the template for this resource. - type: string - required: - - overridesVersion - - templateVersion - type: object - type: object - served: true - storage: true - subresources: - status: {} + - name: v1alpha1 + schema: + openAPIV3Schema: + description: PropagatedVersion holds version information about the state propagated from KubeFed APIs (configured by FederatedTypeConfig resources) to member clusters. The name of a PropagatedVersion encodes the kind and name of the resource it stores information for (i.e. -). If a target resource has a populated metadata.Generation field, the generation will be stored with a prefix of `gen:` as the version for the cluster. If metadata.Generation is not available, metadata.ResourceVersion will be stored with a prefix of `rv:` as the version for the cluster. + 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 + status: + description: PropagatedVersionStatus defines the observed state of PropagatedVersion + properties: + clusterVersions: + description: The last versions produced in each cluster for this resource. + items: + properties: + clusterName: + description: The name of the cluster the version is for. + type: string + version: + description: The last version produced for the resource by a KubeFed operation. + type: string + required: + - clusterName + - version + type: object + type: array + overridesVersion: + description: The observed version of the overrides for this resource. + type: string + templateVersion: + description: The observed version of the template for this resource. + type: string + required: + - overridesVersion + - templateVersion + type: object + type: object + served: true + storage: true + subresources: + status: {} diff --git a/config/crds/core.kubeadmiral.io_propagationpolicies.yaml b/config/crds/core.kubeadmiral.io_propagationpolicies.yaml index 780b1563..424b87d8 100644 --- a/config/crds/core.kubeadmiral.io_propagationpolicies.yaml +++ b/config/crds/core.kubeadmiral.io_propagationpolicies.yaml @@ -4,6 +4,7 @@ kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.11.1 + kubeadmiral.io/no-federated-resource: "true" creationTimestamp: null name: propagationpolicies.core.kubeadmiral.io spec: diff --git a/config/crds/core.kubeadmiral.io_schedulerpluginwebhookconfigurations.yaml b/config/crds/core.kubeadmiral.io_schedulerpluginwebhookconfigurations.yaml index 2f77a84e..f0c47f7a 100644 --- a/config/crds/core.kubeadmiral.io_schedulerpluginwebhookconfigurations.yaml +++ b/config/crds/core.kubeadmiral.io_schedulerpluginwebhookconfigurations.yaml @@ -4,6 +4,7 @@ kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.11.1 + kubeadmiral.io/no-federated-resource: "true" creationTimestamp: null name: schedulerpluginwebhookconfigurations.core.kubeadmiral.io spec: @@ -15,96 +16,72 @@ spec: singular: schedulerpluginwebhookconfiguration scope: Cluster versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - description: SchedulerPluginWebhookConfiguration is a webhook that can be - used as a scheduler plugin. - 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: - properties: - filterPath: - description: Path for the filter call, empty if not supported. This - path is appended to the URLPrefix when issuing the filter call to - webhook. - type: string - httpTimeout: - default: 5s - description: HTTPTimeout specifies the timeout duration for a call - to the webhook. Timeout fails the scheduling of the workload. Defaults - to 5 seconds. - format: duration - type: string - payloadVersions: - description: PayloadVersions is an ordered list of preferred request - and response versions the webhook expects. The scheduler will try - to use the first version in the list which it supports. If none - of the versions specified in this list supported by the scheduler, - scheduling will fail for this object. - items: + - name: v1alpha1 + schema: + openAPIV3Schema: + description: SchedulerPluginWebhookConfiguration is a webhook that can be used as a scheduler plugin. + 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: + properties: + filterPath: + description: Path for the filter call, empty if not supported. This path is appended to the URLPrefix when issuing the filter call to webhook. type: string - minItems: 1 - type: array - scorePath: - description: Path for the score call, empty if not supported. This - verb is appended to the URLPrefix when issuing the score call to - webhook. - type: string - selectPath: - description: Path for the select call, empty if not supported. This - verb is appended to the URLPrefix when issuing the select call to - webhook. - type: string - tlsConfig: - description: TLSConfig specifies the transport layer security config. - properties: - caData: - description: CAData holds PEM-encoded bytes (typically read from - a root certificates bundle). - format: byte - type: string - certData: - description: CertData holds PEM-encoded bytes (typically read - from a client certificate file). - format: byte - type: string - insecure: - description: Server should be accessed without verifying the TLS - certificate. For testing only. - type: boolean - keyData: - description: KeyData holds PEM-encoded bytes (typically read from - a client certificate key file). - format: byte - type: string - serverName: - description: ServerName is passed to the server for SNI and is - used in the client to check server certificates against. If - ServerName is empty, the hostname used to contact the server - is used. + httpTimeout: + default: 5s + description: HTTPTimeout specifies the timeout duration for a call to the webhook. Timeout fails the scheduling of the workload. Defaults to 5 seconds. + format: duration + type: string + payloadVersions: + description: PayloadVersions is an ordered list of preferred request and response versions the webhook expects. The scheduler will try to use the first version in the list which it supports. If none of the versions specified in this list supported by the scheduler, scheduling will fail for this object. + items: type: string - type: object - urlPrefix: - description: URLPrefix at which the webhook is available - type: string - required: - - payloadVersions - - urlPrefix - type: object - required: - - spec - type: object - served: true - storage: true + minItems: 1 + type: array + scorePath: + description: Path for the score call, empty if not supported. This verb is appended to the URLPrefix when issuing the score call to webhook. + type: string + selectPath: + description: Path for the select call, empty if not supported. This verb is appended to the URLPrefix when issuing the select call to webhook. + type: string + tlsConfig: + description: TLSConfig specifies the transport layer security config. + properties: + caData: + description: CAData holds PEM-encoded bytes (typically read from a root certificates bundle). + format: byte + type: string + certData: + description: CertData holds PEM-encoded bytes (typically read from a client certificate file). + format: byte + type: string + insecure: + description: Server should be accessed without verifying the TLS certificate. For testing only. + type: boolean + keyData: + description: KeyData holds PEM-encoded bytes (typically read from a client certificate key file). + format: byte + type: string + serverName: + description: ServerName is passed to the server for SNI and is used in the client to check server certificates against. If ServerName is empty, the hostname used to contact the server is used. + type: string + type: object + urlPrefix: + description: URLPrefix at which the webhook is available + type: string + required: + - payloadVersions + - urlPrefix + type: object + required: + - spec + type: object + served: true + storage: true diff --git a/config/crds/core.kubeadmiral.io_schedulingprofiles.yaml b/config/crds/core.kubeadmiral.io_schedulingprofiles.yaml index db2e1a5e..1ac860d9 100644 --- a/config/crds/core.kubeadmiral.io_schedulingprofiles.yaml +++ b/config/crds/core.kubeadmiral.io_schedulingprofiles.yaml @@ -4,6 +4,7 @@ kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.11.1 + kubeadmiral.io/no-federated-resource: "true" creationTimestamp: null name: schedulingprofiles.core.kubeadmiral.io spec: @@ -13,234 +14,179 @@ spec: listKind: SchedulingProfileList plural: schedulingprofiles shortNames: - - sp + - sp singular: schedulingprofile scope: Cluster versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - description: SchedulingProfile configures the plugins to use when scheduling - a resource - 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: - properties: - pluginConfig: - description: PluginConfig is an optional set of custom plugin arguments - for each plugin. Omitting config args for a plugin is equivalent - to using the default config for that plugin. - items: - description: PluginConfig specifies arguments that should be passed - to a plugin at the time of initialization. A plugin that is invoked - at multiple extension points is initialized once. Args can have - arbitrary structure. It is up to the plugin to process these Args. - properties: - args: - description: Args defines the arguments passed to the plugins - at the time of initialization. Args can have arbitrary structure. - x-kubernetes-preserve-unknown-fields: true - name: - description: Name defines the name of plugin being configured. - type: string - required: - - name - type: object - type: array - plugins: - description: Plugins specify the set of plugins that should be enabled - or disabled. Enabled plugins are the ones that should be enabled - in addition to the default plugins. Disabled plugins are any of - the default plugins that should be disabled. When no enabled or - disabled plugin is specified for an extension point, default plugins - for that extension point will be used if there is any. - properties: - filter: - description: Filter is the list of plugins that should be invoked - during the filter phase. - properties: - disabled: - description: Disabled specifies default plugins that should - be disabled. - items: - description: Plugin specifies a plugin type, name and its - weight when applicable. Weight is used only for Score - plugins. - properties: - name: - description: Name defines the name of the plugin. - type: string - type: - description: Type defines the type of the plugin. Type - should be omitted when referencing in-tree plugins. - enum: - - Webhook - type: string - wait: - description: Weight defines the weight of the plugin. - format: int64 - minimum: 0 - type: integer - type: object - type: array - enabled: - description: Enabled specifies plugins that should be enabled - in addition to the default plugins. Enabled plugins are - called in the order specified here, after default plugins. - If they need to be invoked before default plugins, default - plugins must be disabled and re-enabled here in desired - order. - items: - description: Plugin specifies a plugin type, name and its - weight when applicable. Weight is used only for Score - plugins. - properties: - name: - description: Name defines the name of the plugin. - type: string - type: - description: Type defines the type of the plugin. Type - should be omitted when referencing in-tree plugins. - enum: - - Webhook - type: string - wait: - description: Weight defines the weight of the plugin. - format: int64 - minimum: 0 - type: integer - type: object - type: array - type: object - score: - description: Score is the list of plugins that should be invoked - during the score phase. + - name: v1alpha1 + schema: + openAPIV3Schema: + description: SchedulingProfile configures the plugins to use when scheduling a resource + 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: + properties: + pluginConfig: + description: PluginConfig is an optional set of custom plugin arguments for each plugin. Omitting config args for a plugin is equivalent to using the default config for that plugin. + items: + description: PluginConfig specifies arguments that should be passed to a plugin at the time of initialization. A plugin that is invoked at multiple extension points is initialized once. Args can have arbitrary structure. It is up to the plugin to process these Args. properties: - disabled: - description: Disabled specifies default plugins that should - be disabled. - items: - description: Plugin specifies a plugin type, name and its - weight when applicable. Weight is used only for Score - plugins. - properties: - name: - description: Name defines the name of the plugin. - type: string - type: - description: Type defines the type of the plugin. Type - should be omitted when referencing in-tree plugins. - enum: - - Webhook - type: string - wait: - description: Weight defines the weight of the plugin. - format: int64 - minimum: 0 - type: integer - type: object - type: array - enabled: - description: Enabled specifies plugins that should be enabled - in addition to the default plugins. Enabled plugins are - called in the order specified here, after default plugins. - If they need to be invoked before default plugins, default - plugins must be disabled and re-enabled here in desired - order. - items: - description: Plugin specifies a plugin type, name and its - weight when applicable. Weight is used only for Score - plugins. - properties: - name: - description: Name defines the name of the plugin. - type: string - type: - description: Type defines the type of the plugin. Type - should be omitted when referencing in-tree plugins. - enum: - - Webhook - type: string - wait: - description: Weight defines the weight of the plugin. - format: int64 - minimum: 0 - type: integer - type: object - type: array + args: + description: Args defines the arguments passed to the plugins at the time of initialization. Args can have arbitrary structure. + x-kubernetes-preserve-unknown-fields: true + name: + description: Name defines the name of plugin being configured. + type: string + required: + - name type: object - select: - description: Select is the list of plugins that should be invoked - during the select phase. - properties: - disabled: - description: Disabled specifies default plugins that should - be disabled. - items: - description: Plugin specifies a plugin type, name and its - weight when applicable. Weight is used only for Score - plugins. - properties: - name: - description: Name defines the name of the plugin. - type: string - type: - description: Type defines the type of the plugin. Type - should be omitted when referencing in-tree plugins. - enum: - - Webhook - type: string - wait: - description: Weight defines the weight of the plugin. - format: int64 - minimum: 0 - type: integer - type: object - type: array - enabled: - description: Enabled specifies plugins that should be enabled - in addition to the default plugins. Enabled plugins are - called in the order specified here, after default plugins. - If they need to be invoked before default plugins, default - plugins must be disabled and re-enabled here in desired - order. - items: - description: Plugin specifies a plugin type, name and its - weight when applicable. Weight is used only for Score - plugins. - properties: - name: - description: Name defines the name of the plugin. - type: string - type: - description: Type defines the type of the plugin. Type - should be omitted when referencing in-tree plugins. - enum: - - Webhook - type: string - wait: - description: Weight defines the weight of the plugin. - format: int64 - minimum: 0 - type: integer - type: object - type: array - type: object - type: object - type: object - required: - - spec - type: object - served: true - storage: true + type: array + plugins: + description: Plugins specify the set of plugins that should be enabled or disabled. Enabled plugins are the ones that should be enabled in addition to the default plugins. Disabled plugins are any of the default plugins that should be disabled. When no enabled or disabled plugin is specified for an extension point, default plugins for that extension point will be used if there is any. + properties: + filter: + description: Filter is the list of plugins that should be invoked during the filter phase. + properties: + disabled: + description: Disabled specifies default plugins that should be disabled. + items: + description: Plugin specifies a plugin type, name and its weight when applicable. Weight is used only for Score plugins. + properties: + name: + description: Name defines the name of the plugin. + type: string + type: + description: Type defines the type of the plugin. Type should be omitted when referencing in-tree plugins. + enum: + - Webhook + type: string + wait: + description: Weight defines the weight of the plugin. + format: int64 + minimum: 0 + type: integer + type: object + type: array + enabled: + description: Enabled specifies plugins that should be enabled in addition to the default plugins. Enabled plugins are called in the order specified here, after default plugins. If they need to be invoked before default plugins, default plugins must be disabled and re-enabled here in desired order. + items: + description: Plugin specifies a plugin type, name and its weight when applicable. Weight is used only for Score plugins. + properties: + name: + description: Name defines the name of the plugin. + type: string + type: + description: Type defines the type of the plugin. Type should be omitted when referencing in-tree plugins. + enum: + - Webhook + type: string + wait: + description: Weight defines the weight of the plugin. + format: int64 + minimum: 0 + type: integer + type: object + type: array + type: object + score: + description: Score is the list of plugins that should be invoked during the score phase. + properties: + disabled: + description: Disabled specifies default plugins that should be disabled. + items: + description: Plugin specifies a plugin type, name and its weight when applicable. Weight is used only for Score plugins. + properties: + name: + description: Name defines the name of the plugin. + type: string + type: + description: Type defines the type of the plugin. Type should be omitted when referencing in-tree plugins. + enum: + - Webhook + type: string + wait: + description: Weight defines the weight of the plugin. + format: int64 + minimum: 0 + type: integer + type: object + type: array + enabled: + description: Enabled specifies plugins that should be enabled in addition to the default plugins. Enabled plugins are called in the order specified here, after default plugins. If they need to be invoked before default plugins, default plugins must be disabled and re-enabled here in desired order. + items: + description: Plugin specifies a plugin type, name and its weight when applicable. Weight is used only for Score plugins. + properties: + name: + description: Name defines the name of the plugin. + type: string + type: + description: Type defines the type of the plugin. Type should be omitted when referencing in-tree plugins. + enum: + - Webhook + type: string + wait: + description: Weight defines the weight of the plugin. + format: int64 + minimum: 0 + type: integer + type: object + type: array + type: object + select: + description: Select is the list of plugins that should be invoked during the select phase. + properties: + disabled: + description: Disabled specifies default plugins that should be disabled. + items: + description: Plugin specifies a plugin type, name and its weight when applicable. Weight is used only for Score plugins. + properties: + name: + description: Name defines the name of the plugin. + type: string + type: + description: Type defines the type of the plugin. Type should be omitted when referencing in-tree plugins. + enum: + - Webhook + type: string + wait: + description: Weight defines the weight of the plugin. + format: int64 + minimum: 0 + type: integer + type: object + type: array + enabled: + description: Enabled specifies plugins that should be enabled in addition to the default plugins. Enabled plugins are called in the order specified here, after default plugins. If they need to be invoked before default plugins, default plugins must be disabled and re-enabled here in desired order. + items: + description: Plugin specifies a plugin type, name and its weight when applicable. Weight is used only for Score plugins. + properties: + name: + description: Name defines the name of the plugin. + type: string + type: + description: Type defines the type of the plugin. Type should be omitted when referencing in-tree plugins. + enum: + - Webhook + type: string + wait: + description: Weight defines the weight of the plugin. + format: int64 + minimum: 0 + type: integer + type: object + type: array + type: object + type: object + type: object + required: + - spec + type: object + served: true + storage: true diff --git a/hack/generate-groups.sh b/hack/generate-groups.sh index a11d2df2..7686f835 100644 --- a/hack/generate-groups.sh +++ b/hack/generate-groups.sh @@ -51,6 +51,8 @@ for group in "${groups[@]}"; do INPUT_DIRS+=("${INPUT_BASE}/${group}") done +NO_FEDERATED_ANNOTATION="kubeadmiral.io/no-federated-resource" + # generate code function codegen::join() { local IFS="$1" @@ -61,7 +63,13 @@ function codegen::join() { # generate manifests echo "Generating manifests" ${GOBIN}/controller-gen crd paths=$(codegen::join ";" "${INPUT_DIRS[@]}") output:crd:artifacts:config=config/crds -# apply CRD patches + +# patch CRDs with no-federate annotation +for crd_file in config/crds/*.yaml; do + yq eval -i ".metadata.annotations[\"${NO_FEDERATED_ANNOTATION}\"] = \"true\"" "${crd_file}" +done + +# apply other CRD patches for patch_file in config/crds/patches/*.sh; do if [[ $patch_file == *.src.sh ]]; then continue