diff --git a/api/v1beta1/clusterhealthcheck_type.go b/api/v1beta1/clusterhealthcheck_type.go index 5b1ea7b..57bebbd 100644 --- a/api/v1beta1/clusterhealthcheck_type.go +++ b/api/v1beta1/clusterhealthcheck_type.go @@ -219,7 +219,7 @@ type NotificationSummary struct { type ClusterHealthCheckSpec struct { // Selector identifies clusters to associate to. // +optional - ClusterSelector Selector `json:"selector,omitempty"` + ClusterSelector Selector `json:"clusterSelector,omitempty"` // LivenessChecks is a list of source of liveness checks to evaluate. // Anytime one of those changes, notifications will be sent diff --git a/api/v1beta1/rolerequest_type.go b/api/v1beta1/rolerequest_type.go index 6b3426f..00a41fd 100644 --- a/api/v1beta1/rolerequest_type.go +++ b/api/v1beta1/rolerequest_type.go @@ -37,7 +37,7 @@ const ( type RoleRequestSpec struct { // Selector identifies clusters to associate to. // +optional - ClusterSelector Selector `json:"selector,omitempty"` + ClusterSelector Selector `json:"clusterSelector,omitempty"` // RoleRefs references all the Secret/ConfigMaps containing kubernetes // Roles/ClusterRoles that need to be deployed in the matching clusters. diff --git a/config/crd/bases/lib.projectsveltos.io_clusterhealthchecks.yaml b/config/crd/bases/lib.projectsveltos.io_clusterhealthchecks.yaml index 0082367..81bd752 100644 --- a/config/crd/bases/lib.projectsveltos.io_clusterhealthchecks.yaml +++ b/config/crd/bases/lib.projectsveltos.io_clusterhealthchecks.yaml @@ -438,6 +438,52 @@ spec: spec: description: ClusterHealthCheckSpec defines the desired state of ClusterHealthCheck properties: + clusterSelector: + description: Selector identifies clusters to associate to. + properties: + matchExpressions: + description: matchExpressions is a list of label selector requirements. + The requirements are ANDed. + items: + description: |- + A label selector requirement is a selector that contains values, a key, and an operator that + relates the key and values. + 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. + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + 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 + type: object + x-kubernetes-map-type: atomic livenessChecks: description: |- LivenessChecks is a list of source of liveness checks to evaluate. @@ -575,52 +621,6 @@ spec: - type type: object type: array - selector: - description: Selector identifies clusters to associate to. - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. - The requirements are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - 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. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - 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 - type: object - x-kubernetes-map-type: atomic required: - livenessChecks - notifications diff --git a/config/crd/bases/lib.projectsveltos.io_rolerequests.yaml b/config/crd/bases/lib.projectsveltos.io_rolerequests.yaml index 14ff55d..b36f599 100644 --- a/config/crd/bases/lib.projectsveltos.io_rolerequests.yaml +++ b/config/crd/bases/lib.projectsveltos.io_rolerequests.yaml @@ -276,45 +276,7 @@ spec: spec: description: RoleRequestSpec defines the desired state of RoleRequest properties: - expirationSeconds: - description: |- - ExpirationSeconds is the requested duration of validity of the TokenRequest - associated to ServiceAccount. If not specified, default value is used - format: int64 - type: integer - roleRefs: - description: |- - RoleRefs references all the Secret/ConfigMaps containing kubernetes - Roles/ClusterRoles that need to be deployed in the matching clusters. - items: - description: |- - PolicyRef specifies a resource containing one or more policy - to deploy in matching Clusters. - properties: - kind: - description: 'Kind of the resource. Supported kinds are: Secrets - and ConfigMaps.' - enum: - - Secret - - ConfigMap - type: string - name: - description: Name of the referenced resource. - minLength: 1 - type: string - namespace: - description: |- - Namespace of the referenced resource. - Namespace can be left empty. In such a case, namespace will - be implicit set to cluster's namespace. - type: string - required: - - kind - - name - - namespace - type: object - type: array - selector: + clusterSelector: description: Selector identifies clusters to associate to. properties: matchExpressions: @@ -360,6 +322,44 @@ spec: type: object type: object x-kubernetes-map-type: atomic + expirationSeconds: + description: |- + ExpirationSeconds is the requested duration of validity of the TokenRequest + associated to ServiceAccount. If not specified, default value is used + format: int64 + type: integer + roleRefs: + description: |- + RoleRefs references all the Secret/ConfigMaps containing kubernetes + Roles/ClusterRoles that need to be deployed in the matching clusters. + items: + description: |- + PolicyRef specifies a resource containing one or more policy + to deploy in matching Clusters. + properties: + kind: + description: 'Kind of the resource. Supported kinds are: Secrets + and ConfigMaps.' + enum: + - Secret + - ConfigMap + type: string + name: + description: Name of the referenced resource. + minLength: 1 + type: string + namespace: + description: |- + Namespace of the referenced resource. + Namespace can be left empty. In such a case, namespace will + be implicit set to cluster's namespace. + type: string + required: + - kind + - name + - namespace + type: object + type: array serviceAccountName: description: |- ServiceAccountName is the name of the ServiceAccount representing a tenant admin for which diff --git a/lib/crd/clusterhealthchecks.go b/lib/crd/clusterhealthchecks.go index 319a901..715d104 100644 --- a/lib/crd/clusterhealthchecks.go +++ b/lib/crd/clusterhealthchecks.go @@ -467,6 +467,52 @@ spec: spec: description: ClusterHealthCheckSpec defines the desired state of ClusterHealthCheck properties: + clusterSelector: + description: Selector identifies clusters to associate to. + properties: + matchExpressions: + description: matchExpressions is a list of label selector requirements. + The requirements are ANDed. + items: + description: |- + A label selector requirement is a selector that contains values, a key, and an operator that + relates the key and values. + 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. + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + 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 + type: object + x-kubernetes-map-type: atomic livenessChecks: description: |- LivenessChecks is a list of source of liveness checks to evaluate. @@ -604,52 +650,6 @@ spec: - type type: object type: array - selector: - description: Selector identifies clusters to associate to. - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. - The requirements are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - 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. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - 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 - type: object - x-kubernetes-map-type: atomic required: - livenessChecks - notifications diff --git a/lib/crd/rolerequests.go b/lib/crd/rolerequests.go index 55ad064..e7e2d66 100644 --- a/lib/crd/rolerequests.go +++ b/lib/crd/rolerequests.go @@ -305,45 +305,7 @@ spec: spec: description: RoleRequestSpec defines the desired state of RoleRequest properties: - expirationSeconds: - description: |- - ExpirationSeconds is the requested duration of validity of the TokenRequest - associated to ServiceAccount. If not specified, default value is used - format: int64 - type: integer - roleRefs: - description: |- - RoleRefs references all the Secret/ConfigMaps containing kubernetes - Roles/ClusterRoles that need to be deployed in the matching clusters. - items: - description: |- - PolicyRef specifies a resource containing one or more policy - to deploy in matching Clusters. - properties: - kind: - description: 'Kind of the resource. Supported kinds are: Secrets - and ConfigMaps.' - enum: - - Secret - - ConfigMap - type: string - name: - description: Name of the referenced resource. - minLength: 1 - type: string - namespace: - description: |- - Namespace of the referenced resource. - Namespace can be left empty. In such a case, namespace will - be implicit set to cluster's namespace. - type: string - required: - - kind - - name - - namespace - type: object - type: array - selector: + clusterSelector: description: Selector identifies clusters to associate to. properties: matchExpressions: @@ -389,6 +351,44 @@ spec: type: object type: object x-kubernetes-map-type: atomic + expirationSeconds: + description: |- + ExpirationSeconds is the requested duration of validity of the TokenRequest + associated to ServiceAccount. If not specified, default value is used + format: int64 + type: integer + roleRefs: + description: |- + RoleRefs references all the Secret/ConfigMaps containing kubernetes + Roles/ClusterRoles that need to be deployed in the matching clusters. + items: + description: |- + PolicyRef specifies a resource containing one or more policy + to deploy in matching Clusters. + properties: + kind: + description: 'Kind of the resource. Supported kinds are: Secrets + and ConfigMaps.' + enum: + - Secret + - ConfigMap + type: string + name: + description: Name of the referenced resource. + minLength: 1 + type: string + namespace: + description: |- + Namespace of the referenced resource. + Namespace can be left empty. In such a case, namespace will + be implicit set to cluster's namespace. + type: string + required: + - kind + - name + - namespace + type: object + type: array serviceAccountName: description: |- ServiceAccountName is the name of the ServiceAccount representing a tenant admin for which diff --git a/manifests/apiextensions.k8s.io_v1_customresourcedefinition_clusterhealthchecks.lib.projectsveltos.io.yaml b/manifests/apiextensions.k8s.io_v1_customresourcedefinition_clusterhealthchecks.lib.projectsveltos.io.yaml index 20b34e7..f2bb151 100644 --- a/manifests/apiextensions.k8s.io_v1_customresourcedefinition_clusterhealthchecks.lib.projectsveltos.io.yaml +++ b/manifests/apiextensions.k8s.io_v1_customresourcedefinition_clusterhealthchecks.lib.projectsveltos.io.yaml @@ -448,6 +448,52 @@ spec: spec: description: ClusterHealthCheckSpec defines the desired state of ClusterHealthCheck properties: + clusterSelector: + description: Selector identifies clusters to associate to. + properties: + matchExpressions: + description: matchExpressions is a list of label selector requirements. + The requirements are ANDed. + items: + description: |- + A label selector requirement is a selector that contains values, a key, and an operator that + relates the key and values. + 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. + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + 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 + type: object + x-kubernetes-map-type: atomic livenessChecks: description: |- LivenessChecks is a list of source of liveness checks to evaluate. @@ -585,52 +631,6 @@ spec: - type type: object type: array - selector: - description: Selector identifies clusters to associate to. - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. - The requirements are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - 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. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - 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 - type: object - x-kubernetes-map-type: atomic required: - livenessChecks - notifications diff --git a/manifests/apiextensions.k8s.io_v1_customresourcedefinition_rolerequests.lib.projectsveltos.io.yaml b/manifests/apiextensions.k8s.io_v1_customresourcedefinition_rolerequests.lib.projectsveltos.io.yaml index 9c1be0e..ec22579 100644 --- a/manifests/apiextensions.k8s.io_v1_customresourcedefinition_rolerequests.lib.projectsveltos.io.yaml +++ b/manifests/apiextensions.k8s.io_v1_customresourcedefinition_rolerequests.lib.projectsveltos.io.yaml @@ -286,45 +286,7 @@ spec: spec: description: RoleRequestSpec defines the desired state of RoleRequest properties: - expirationSeconds: - description: |- - ExpirationSeconds is the requested duration of validity of the TokenRequest - associated to ServiceAccount. If not specified, default value is used - format: int64 - type: integer - roleRefs: - description: |- - RoleRefs references all the Secret/ConfigMaps containing kubernetes - Roles/ClusterRoles that need to be deployed in the matching clusters. - items: - description: |- - PolicyRef specifies a resource containing one or more policy - to deploy in matching Clusters. - properties: - kind: - description: 'Kind of the resource. Supported kinds are: Secrets - and ConfigMaps.' - enum: - - Secret - - ConfigMap - type: string - name: - description: Name of the referenced resource. - minLength: 1 - type: string - namespace: - description: |- - Namespace of the referenced resource. - Namespace can be left empty. In such a case, namespace will - be implicit set to cluster's namespace. - type: string - required: - - kind - - name - - namespace - type: object - type: array - selector: + clusterSelector: description: Selector identifies clusters to associate to. properties: matchExpressions: @@ -370,6 +332,44 @@ spec: type: object type: object x-kubernetes-map-type: atomic + expirationSeconds: + description: |- + ExpirationSeconds is the requested duration of validity of the TokenRequest + associated to ServiceAccount. If not specified, default value is used + format: int64 + type: integer + roleRefs: + description: |- + RoleRefs references all the Secret/ConfigMaps containing kubernetes + Roles/ClusterRoles that need to be deployed in the matching clusters. + items: + description: |- + PolicyRef specifies a resource containing one or more policy + to deploy in matching Clusters. + properties: + kind: + description: 'Kind of the resource. Supported kinds are: Secrets + and ConfigMaps.' + enum: + - Secret + - ConfigMap + type: string + name: + description: Name of the referenced resource. + minLength: 1 + type: string + namespace: + description: |- + Namespace of the referenced resource. + Namespace can be left empty. In such a case, namespace will + be implicit set to cluster's namespace. + type: string + required: + - kind + - name + - namespace + type: object + type: array serviceAccountName: description: |- ServiceAccountName is the name of the ServiceAccount representing a tenant admin for which