Skip to content

Commit

Permalink
Update hub
Browse files Browse the repository at this point in the history
Signed-off-by: Tamal Saha <[email protected]>
  • Loading branch information
tamalsaha committed Dec 17, 2023
1 parent 5998c4a commit 244fae9
Show file tree
Hide file tree
Showing 470 changed files with 132,117 additions and 6,617 deletions.
1 change: 1 addition & 0 deletions cmd/import-crds/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ go run cmd/import-crds/main.go --input=$HOME/go/src/github.com/cert-manager/cert
go run cmd/import-crds/main.go --input=$HOME/go/src/voyagermesh.dev/apimachinery/crds
go run cmd/import-crds/main.go --input=$HOME/go/src/stash.appscode.dev/apimachinery/crds
go run cmd/import-crds/main.go --input=$HOME/go/src/kubestash.dev/apimachinery/crds
go run cmd/import-crds/main.go --input=$HOME/go/src/kmodules.xyz/custom-resources/crds
go run cmd/import-crds/main.go --input=$HOME/go/src/kmodules.xyz/resource-metadata/crds
go run cmd/import-crds/main.go --input=$HOME/go/src/kubedb.dev/apimachinery/crds
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ spec:
spec:
description: spec represents a desired configuration for an add-on.
properties:
agentInstallNamespace:
default: open-cluster-management-agent-addon
description: AgentInstallNamespace is the namespace where the add-on agent should be installed on the managed cluster.
maxLength: 63
pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$
type: string
customizedVariables:
description: CustomizedVariables is a list of name-value variables for the current add-on deployment. The add-on implementation can use these variables to render its add-on deployment. The default is an empty list.
items:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -271,31 +271,42 @@ spec:
items:
description: HubPermissionConfig configures the permission of the addon agent to access the hub cluster. Will create a RoleBinding in the same namespace as the managedClusterAddon to bind the user provided ClusterRole/Role to the "system:open-cluster-management:cluster:<cluster-name>:addon:<addon-name>" Group.
properties:
roleRef:
description: RoleRef is an reference to the permission resource. it could be a role or a cluster role, the user must make sure it exist on the hub cluster.
currentCluster:
description: CurrentCluster contains the configuration of CurrentCluster type binding. It is required when the type is CurrentCluster.
properties:
apiGroup:
description: APIGroup is the group for the resource being referenced
type: string
kind:
description: Kind is the type of resource being referenced
type: string
name:
description: Name is the name of resource being referenced
clusterRoleName:
description: ClusterRoleName is the name of the clusterrole the addon agent is bound. A rolebinding will be created referring to this cluster role in each cluster namespace. The user must make sure the clusterrole exists on the hub cluster.
type: string
required:
- apiGroup
- kind
- name
- clusterRoleName
type: object
x-kubernetes-map-type: atomic
singleNamespace:
description: SingleNamespace contains the configuration of SingleNamespace type binding. It is required when the type is SingleNamespace
properties:
namespace:
description: Namespace is the namespace the addon agent has permissions to bind to. A rolebinding will be created in this namespace referring to the RoleRef.
type: string
roleRef:
description: RoleRef is an reference to the permission resource. it could be a role or a cluster role, the user must make sure it exist on the hub cluster.
properties:
apiGroup:
description: APIGroup is the group for the resource being referenced
type: string
kind:
description: Kind is the type of resource being referenced
type: string
name:
description: Name is the name of resource being referenced
type: string
required:
- apiGroup
- kind
- name
type: object
x-kubernetes-map-type: atomic
required:
- namespace
- roleRef
type: object
type:
description: 'Type of the permissions setting. It defines how to bind the roleRef on the hub cluster. It can be: - CurrentCluster: Bind the roleRef to the namespace with the same name as the managedCluster. - SingleNamespace: Bind the roleRef to the namespace specified by SingleNamespaceBindingConfig.'
Expand All @@ -304,7 +315,6 @@ spec:
- SingleNamespace
type: string
required:
- roleRef
- type
type: object
type: array
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,55 +111,78 @@ spec:
type: string
rolloutStrategy:
default:
type: UpdateAll
type: All
description: The rollout strategy to apply addon configurations change. The rollout strategy only watches the addon configurations defined in ClusterManagementAddOn.
properties:
rollingUpdate:
description: Rolling update with placement config params. Present only if the type is RollingUpdate.
all:
description: All define required fields for RolloutStrategy type All
properties:
maxConcurrency:
anyOf:
- type: integer
- type: string
default: 25%
description: 'The maximum concurrently updating number of clusters. Value can be an absolute number (ex: 5) or a percentage of desired addons (ex: 10%). Absolute number is calculated from percentage by rounding up. Defaults to 25%. Example: when this is set to 30%, once the addon configs change, the addon on 30% of the selected clusters will adopt the new configs. When the addons with new configs are healthy, the addon on the remaining clusters will be further updated.'
x-kubernetes-int-or-string: true
timeout:
default: None
description: Timeout define how long workload applier controller will wait till workload reach successful state in the cluster. Timeout default value is None meaning the workload applier will not proceed apply workload to other clusters if did not reach the successful state. Timeout must be defined in [0-9h]|[0-9m]|[0-9s] format examples; 2h , 90m , 360s
pattern: ^(([0-9])+[h|m|s])|None$
type: string
type: object
rollingUpdateWithCanary:
description: Rolling update with placement config params. Present only if the type is RollingUpdateWithCanary.
progressive:
description: Progressive define required fields for RolloutStrategy type Progressive
properties:
mandatoryDecisionGroups:
description: List of the decision groups names or indexes to apply the workload first and fail if workload did not reach successful state. GroupName or GroupIndex must match with the decisionGroups defined in the placement's decisionStrategy
items:
description: MandatoryDecisionGroup set the decision group name or group index. GroupName is considered first to select the decisionGroups then GroupIndex.
properties:
groupIndex:
description: GroupIndex of the decision group should match the placementDecisions label value with label key cluster.open-cluster-management.io/decision-group-index
format: int32
type: integer
groupName:
description: GroupName of the decision group should match the placementDecisions label value with label key cluster.open-cluster-management.io/decision-group-name
type: string
type: object
type: array
maxConcurrency:
anyOf:
- type: integer
- type: string
default: 25%
description: 'The maximum concurrently updating number of clusters. Value can be an absolute number (ex: 5) or a percentage of desired addons (ex: 10%). Absolute number is calculated from percentage by rounding up. Defaults to 25%. Example: when this is set to 30%, once the addon configs change, the addon on 30% of the selected clusters will adopt the new configs. When the addons with new configs are healthy, the addon on the remaining clusters will be further updated.'
description: MaxConcurrency is the max number of clusters to deploy workload concurrently. The default value for MaxConcurrency is determined from the clustersPerDecisionGroup defined in the placement->DecisionStrategy.
pattern: ^((100|[0-9]{1,2})%|[0-9]+)$
x-kubernetes-int-or-string: true
placement:
description: Canary placement reference.
properties:
name:
description: Name is the name of the placement
minLength: 1
type: string
namespace:
description: Namespace is the namespace of the placement
minLength: 1
type: string
required:
- name
- namespace
type: object
required:
- placement
timeout:
default: None
description: Timeout define how long workload applier controller will wait till workload reach successful state in the cluster. Timeout default value is None meaning the workload applier will not proceed apply workload to other clusters if did not reach the successful state. Timeout must be defined in [0-9h]|[0-9m]|[0-9s] format examples; 2h , 90m , 360s
pattern: ^(([0-9])+[h|m|s])|None$
type: string
type: object
progressivePerGroup:
description: ProgressivePerGroup define required fields for RolloutStrategy type ProgressivePerGroup
properties:
mandatoryDecisionGroups:
description: List of the decision groups names or indexes to apply the workload first and fail if workload did not reach successful state. GroupName or GroupIndex must match with the decisionGroups defined in the placement's decisionStrategy
items:
description: MandatoryDecisionGroup set the decision group name or group index. GroupName is considered first to select the decisionGroups then GroupIndex.
properties:
groupIndex:
description: GroupIndex of the decision group should match the placementDecisions label value with label key cluster.open-cluster-management.io/decision-group-index
format: int32
type: integer
groupName:
description: GroupName of the decision group should match the placementDecisions label value with label key cluster.open-cluster-management.io/decision-group-name
type: string
type: object
type: array
timeout:
default: None
description: Timeout define how long workload applier controller will wait till workload reach successful state in the cluster. Timeout default value is None meaning the workload applier will not proceed apply workload to other clusters if did not reach the successful state. Timeout must be defined in [0-9h]|[0-9m]|[0-9s] format examples; 2h , 90m , 360s
pattern: ^(([0-9])+[h|m|s])|None$
type: string
type: object
type:
default: UpdateAll
description: "Type is the type of the rollout strategy, it supports UpdateAll, RollingUpdate and RollingUpdateWithCanary: - UpdateAll: when configs change, apply the new configs to all the selected clusters at once. This is the default strategy. - RollingUpdate: when configs change, apply the new configs to all the selected clusters with the concurrence rate defined in MaxConcurrency. - RollingUpdateWithCanary: when configs change, wait and check if add-ons on the canary placement selected clusters have applied the new configs and are healthy, then apply the new configs to all the selected clusters with the concurrence rate defined in MaxConcurrency. \n The field lastKnownGoodConfig in the status record the last successfully applied spec hash of canary placement. If the config spec hash changes after the canary is passed and before the rollout is done, the current rollout will continue, then roll out to the latest change. \n For example, the addon configs have spec hash A. The canary is passed and the lastKnownGoodConfig would be A, and all the selected clusters are rolling out to A. Then the config spec hash changes to B. At this time, the clusters will continue rolling out to A. When the rollout is done and canary passed B, the lastKnownGoodConfig would be B and all the clusters will start rolling out to B. \n The canary placement does not have to be a subset of the install placement, and it is more like a reference for finding and checking canary clusters before upgrading all. To trigger the rollout on the canary clusters, you can define another rollout strategy with the type RollingUpdate, or even manually upgrade the addons on those clusters."
default: All
description: Rollout strategy Types are All, Progressive and ProgressivePerGroup 1) All means apply the workload to all clusters in the decision groups at once. 2) Progressive means apply the workload to the selected clusters progressively per cluster. The workload will not be applied to the next cluster unless one of the current applied clusters reach the successful state or timeout. 3) ProgressivePerGroup means apply the workload to decisionGroup clusters progressively per group. The workload will not be applied to the next decisionGroup unless all clusters in the current group reach the successful state or timeout.
enum:
- UpdateAll
- RollingUpdate
- RollingUpdateWithCanary
- All
- Progressive
- ProgressivePerGroup
type: string
type: object
required:
Expand Down
Loading

0 comments on commit 244fae9

Please sign in to comment.