Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

use ocm-0.9 #88

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions controlplane/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,7 @@ vendor:
go mod tidy
go mod vendor
.PHONY: vendor

update:
bash -x hack/crd-update/copy-crds.sh
.PHONY: update
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ spec:
type: object
properties:
addOnConfiguration:
description: addOnConfiguration is a reference to configuration information for the add-on. In scenario where a multiple add-ons share the same add-on CRD, multiple ClusterManagementAddOn resources need to be created and reference the same AddOnConfiguration.
description: 'Deprecated: Use supportedConfigs filed instead addOnConfiguration is a reference to configuration information for the add-on. In scenario where a multiple add-ons share the same add-on CRD, multiple ClusterManagementAddOn resources need to be created and reference the same AddOnConfiguration.'
type: object
properties:
crName:
Expand All @@ -61,6 +61,35 @@ spec:
displayName:
description: displayName represents the name of add-on that will be displayed.
type: string
supportedConfigs:
description: supportedConfigs is a list of configuration types supported by add-on. An empty list means the add-on does not require configurations. The default is an empty list
type: array
items:
description: ConfigMeta represents a collection of metadata information for add-on configuration.
type: object
required:
- resource
properties:
defaultConfig:
description: defaultConfig represents the namespace and name of the default add-on configuration. In scenario where all add-ons have a same configuration.
type: object
required:
- name
properties:
name:
description: name of the add-on configuration.
type: string
minLength: 1
namespace:
description: namespace of the add-on configuration. If this field is not set, the configuration is in the cluster scope.
type: string
group:
description: group of the add-on configuration.
type: string
resource:
description: resource of the add-on configuration.
type: string
minLength: 1
status:
description: status represents the current status of cluster management add-on.
type: object
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,22 @@ spec:
scope: Cluster
preserveUnknownFields: false
versions:
- name: v1alpha1
- additionalPrinterColumns:
- jsonPath: .status.conditions[?(@.type=="ClusterSetEmpty")].status
name: Empty
type: string
- jsonPath: .metadata.creationTimestamp
name: Age
type: date
name: v1beta1
deprecated: true
deprecationWarning: "cluster.open-cluster-management.io/v1alpha1 ManagedClusterSet is deprecated; use cluster.open-cluster-management.io/v1beta1 ManagedClusterSet"
schema:
openAPIV3Schema:
deprecationWarning: "cluster.open-cluster-management.io/v1beta1 ManagedClusterSet is deprecated; use cluster.open-cluster-management.io/v1beta2 ManagedClusterSet"
served: true
storage: true
subresources:
status: {}
"schema":
"openAPIV3Schema":
description: "ManagedClusterSet defines a group of ManagedClusters that user's workload can run on. A workload can be defined to deployed on a ManagedClusterSet, which mean: 1. The workload can run on any ManagedCluster in the ManagedClusterSet 2. The workload cannot run on any ManagedCluster outside the ManagedClusterSet 3. The service exposed by the workload can be shared in any ManagedCluster in the ManagedClusterSet \n In order to assign a ManagedCluster to a certian ManagedClusterSet, add a label with name `cluster.open-cluster-management.io/clusterset` on the ManagedCluster to refers to the ManagedClusterSet. User is not allow to add/remove this label on a ManagedCluster unless they have a RBAC rule to CREATE on a virtual subresource of managedclustersets/join. In order to update this label, user must have the permission on both the old and new ManagedClusterSet."
type: object
properties:
Expand All @@ -34,6 +45,53 @@ spec:
spec:
description: Spec defines the attributes of the ManagedClusterSet
type: object
default:
clusterSelector:
selectorType: LegacyClusterSetLabel
properties:
clusterSelector:
description: ClusterSelector represents a selector of ManagedClusters
type: object
default:
selectorType: LegacyClusterSetLabel
properties:
labelSelector:
description: LabelSelector define the general labelSelector which clusterset will use to select target managedClusters
type: object
properties:
matchExpressions:
description: matchExpressions is a list of label selector requirements. The requirements are ANDed.
type: array
items:
description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
type: object
required:
- key
- operator
properties:
key:
description: key is the label key that the selector applies to.
type: string
operator:
description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
type: string
values:
description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
type: array
items:
type: string
matchLabels:
description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
type: object
additionalProperties:
type: string
selectorType:
description: SelectorType could only be "LegacyClusterSetLabel" or "LabelSelector" "LegacyClusterSetLabel" means to use label "cluster.open-cluster-management.io/clusterset:<ManagedClusterSet Name>"" to select target clusters. "LabelSelector" means use labelSelector to select target managedClusters
type: string
default: LegacyClusterSetLabel
enum:
- LegacyClusterSetLabel
- LabelSelector
status:
description: Status represents the current status of the ManagedClusterSet
type: object
Expand Down Expand Up @@ -82,20 +140,20 @@ spec:
type: string
maxLength: 316
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
served: true
storage: false
subresources:
status: {}
- additionalPrinterColumns:
- jsonPath: .status.conditions[?(@.type=="ClusterSetEmpty")].status
name: Empty
type: string
- jsonPath: .metadata.creationTimestamp
name: Age
type: date
name: v1beta1
schema:
openAPIV3Schema:
name: v1beta2
served: true
storage: false
subresources:
status: {}
"schema":
"openAPIV3Schema":
description: "ManagedClusterSet defines a group of ManagedClusters that user's workload can run on. A workload can be defined to deployed on a ManagedClusterSet, which mean: 1. The workload can run on any ManagedCluster in the ManagedClusterSet 2. The workload cannot run on any ManagedCluster outside the ManagedClusterSet 3. The service exposed by the workload can be shared in any ManagedCluster in the ManagedClusterSet \n In order to assign a ManagedCluster to a certian ManagedClusterSet, add a label with name `cluster.open-cluster-management.io/clusterset` on the ManagedCluster to refers to the ManagedClusterSet. User is not allow to add/remove this label on a ManagedCluster unless they have a RBAC rule to CREATE on a virtual subresource of managedclustersets/join. In order to update this label, user must have the permission on both the old and new ManagedClusterSet."
type: object
properties:
Expand All @@ -112,13 +170,13 @@ spec:
type: object
default:
clusterSelector:
selectorType: LegacyClusterSetLabel
selectorType: ExclusiveClusterSetLabel
properties:
clusterSelector:
description: ClusterSelector represents a selector of ManagedClusters
type: object
default:
selectorType: LegacyClusterSetLabel
selectorType: ExclusiveClusterSetLabel
properties:
labelSelector:
description: LabelSelector define the general labelSelector which clusterset will use to select target managedClusters
Expand Down Expand Up @@ -151,11 +209,11 @@ spec:
additionalProperties:
type: string
selectorType:
description: SelectorType could only be "LegacyClusterSetLabel" or "LabelSelector" "LegacyClusterSetLabel" means to use label "cluster.open-cluster-management.io/clusterset:<ManagedClusterSet Name>"" to select target clusters. "LabelSelector" means use labelSelector to select target managedClusters
description: SelectorType could only be "ExclusiveClusterSetLabel" or "LabelSelector" "ExclusiveClusterSetLabel" means to use label "cluster.open-cluster-management.io/clusterset:<ManagedClusterSet Name>"" to select target clusters. "LabelSelector" means use labelSelector to select target managedClusters
type: string
default: LegacyClusterSetLabel
default: ExclusiveClusterSetLabel
enum:
- LegacyClusterSetLabel
- ExclusiveClusterSetLabel
- LabelSelector
status:
description: Status represents the current status of the ManagedClusterSet
Expand Down Expand Up @@ -205,10 +263,6 @@ spec:
type: string
maxLength: 316
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
served: true
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,41 @@ spec:
description: spec holds configuration that could apply to any operator.
type: object
properties:
configs:
description: configs is a list of add-on configurations. In scenario where the current add-on has its own configurations. An empty list means there are no defautl configurations for add-on. The default is an empty list
type: array
items:
type: object
required:
- name
- resource
properties:
group:
description: group of the add-on configuration.
type: string
name:
description: name of the add-on configuration.
type: string
minLength: 1
namespace:
description: namespace of the add-on configuration. If this field is not set, the configuration is in the cluster scope.
type: string
resource:
description: resource of the add-on configuration.
type: string
minLength: 1
installNamespace:
description: installNamespace is the namespace on the managed cluster to install the addon agent. If it is not set, open-cluster-management-agent-addon namespace is used to install the addon agent.
type: string
default: open-cluster-management-agent-addon
maxLength: 63
pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$
status:
description: status holds the information about the state of an operator. It is consistent with status information across the Kubernetes ecosystem.
type: object
properties:
addOnConfiguration:
description: addOnConfiguration is a reference to configuration information for the add-on. This resource is use to locate the configuration resource for the add-on.
description: 'Deprecated: Use configReference instead addOnConfiguration is a reference to configuration information for the add-on. This resource is use to locate the configuration resource for the add-on.'
type: object
properties:
crName:
Expand Down Expand Up @@ -119,6 +143,34 @@ spec:
type: string
maxLength: 316
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
configReferences:
description: configReferences is a list of current add-on configuration references. This will be overridden by the clustermanagementaddon configuration references.
type: array
items:
description: ConfigReference is a reference to the current add-on configuration. This resource is used to locate the configuration resource for the current add-on.
type: object
required:
- name
- resource
properties:
group:
description: group of the add-on configuration.
type: string
lastObservedGeneration:
description: lastObservedGeneration is the observed generation of the add-on configuration.
type: integer
format: int64
name:
description: name of the add-on configuration.
type: string
minLength: 1
namespace:
description: namespace of the add-on configuration. If this field is not set, the configuration is in the cluster scope.
type: string
resource:
description: resource of the add-on configuration.
type: string
minLength: 1
healthCheck:
description: healthCheck indicates how to check the healthiness status of the current addon. It should be set by each addon implementation, by default, the lease mode will be used.
type: object
Expand Down
Loading