diff --git a/charts/cluster-auth-manager/crds/work.open-cluster-management.io_manifestworkreplicasets.yaml b/charts/cluster-auth-manager/crds/work.open-cluster-management.io_manifestworkreplicasets.yaml new file mode 100644 index 00000000..5e681559 --- /dev/null +++ b/charts/cluster-auth-manager/crds/work.open-cluster-management.io_manifestworkreplicasets.yaml @@ -0,0 +1,719 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + name: manifestworkreplicasets.work.open-cluster-management.io +spec: + group: work.open-cluster-management.io + names: + kind: ManifestWorkReplicaSet + listKind: ManifestWorkReplicaSetList + plural: manifestworkreplicasets + shortNames: + - mwrs + singular: manifestworkreplicaset + scope: Namespaced + versions: + - additionalPrinterColumns: + - description: Reason + jsonPath: .status.conditions[?(@.type=="PlacementVerified")].reason + name: Placement + type: string + - description: Configured + jsonPath: .status.conditions[?(@.type=="PlacementVerified")].status + name: Found + type: string + - description: Reason + jsonPath: .status.conditions[?(@.type=="ManifestworkApplied")].reason + name: ManifestWorks + type: string + - description: Applied + jsonPath: .status.conditions[?(@.type=="ManifestworkApplied")].status + name: Applied + type: string + name: v1alpha1 + schema: + openAPIV3Schema: + description: ManifestWorkReplicaSet is the Schema for the ManifestWorkReplicaSet + API. This custom resource is able to apply ManifestWork using Placement + for 0..n ManagedCluster(in their namespaces). It will also remove the ManifestWork + custom resources when deleted. Lastly the specific ManifestWork custom resources + created per ManagedCluster namespace will be adjusted based on PlacementDecision + changes. + 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 reperesents the desired ManifestWork payload and Placement + reference to be reconciled + properties: + manifestWorkTemplate: + description: ManifestWorkTemplate is the ManifestWorkSpec that will + be used to generate a per-cluster ManifestWork + properties: + deleteOption: + description: DeleteOption represents deletion strategy when the + manifestwork is deleted. Foreground deletion strategy is applied + to all the resource in this manifestwork if it is not set. + properties: + propagationPolicy: + default: Foreground + description: propagationPolicy can be Foreground, Orphan or + SelectivelyOrphan SelectivelyOrphan should be rarely used. It + is provided for cases where particular resources is transfering + ownership from one ManifestWork to another or another management + unit. Setting this value will allow a flow like 1. create + manifestwork/2 to manage foo 2. update manifestwork/1 to + selectively orphan foo 3. remove foo from manifestwork/1 + without impacting continuity because manifestwork/2 adopts + it. + enum: + - Foreground + - Orphan + - SelectivelyOrphan + type: string + selectivelyOrphans: + description: selectivelyOrphan represents a list of resources + following orphan deletion stratecy + properties: + orphaningRules: + description: orphaningRules defines a slice of orphaningrule. + Each orphaningrule identifies a single resource included + in this manifestwork + items: + description: OrphaningRule identifies a single resource + included in this manifestwork to be orphaned + properties: + group: + description: Group is the API Group of the Kubernetes + resource, empty string indicates it is in core + group. + type: string + name: + description: Name is the name of the Kubernetes + resource. + type: string + namespace: + description: Name is the namespace of the Kubernetes + resource, empty string indicates it is a cluster + scoped resource. + type: string + resource: + description: Resource is the resource name of the + Kubernetes resource. + type: string + required: + - name + - resource + type: object + type: array + type: object + type: object + executor: + description: Executor is the configuration that makes the work + agent to perform some pre-request processing/checking. e.g. + the executor identity tells the work agent to check the executor + has sufficient permission to write the workloads to the local + managed cluster. Note that nil executor is still supported for + backward-compatibility which indicates that the work agent will + not perform any additional actions before applying resources. + properties: + subject: + description: Subject is the subject identity which the work + agent uses to talk to the local cluster when applying the + resources. + properties: + serviceAccount: + description: ServiceAccount is for identifying which service + account to use by the work agent. Only required if the + type is "ServiceAccount". + properties: + name: + description: Name is the name of the service account. + maxLength: 253 + minLength: 1 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*)$ + type: string + namespace: + description: Namespace is the namespace of the service + account. + maxLength: 253 + minLength: 1 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*)$ + type: string + required: + - name + - namespace + type: object + type: + description: 'Type is the type of the subject identity. + Supported types are: "ServiceAccount".' + enum: + - ServiceAccount + type: string + required: + - type + type: object + type: object + manifestConfigs: + description: ManifestConfigs represents the configurations of + manifests defined in workload field. + items: + description: ManifestConfigOption represents the configurations + of a manifest defined in workload field. + properties: + feedbackRules: + description: FeedbackRules defines what resource status + field should be returned. If it is not set or empty, no + feedback rules will be honored. + items: + properties: + jsonPaths: + description: JsonPaths defines the json path under + status field to be synced. + items: + properties: + name: + description: Name represents the alias name + for this field + type: string + path: + description: Path represents the json path of + the field under status. The path must point + to a field with single value in the type of + integer, bool or string. If the path points + to a non-existing field, no value will be + returned. If the path points to a structure, + map or slice, no value will be returned and + the status conddition of StatusFeedBackSynced + will be set as false. Ref to https://kubernetes.io/docs/reference/kubectl/jsonpath/ + on how to write a jsonPath. + type: string + version: + description: Version is the version of the Kubernetes + resource. If it is not specified, the resource + with the semantically latest version is used + to resolve the path. + type: string + required: + - name + - path + type: object + type: array + type: + description: Type defines the option of how status + can be returned. It can be jsonPaths or wellKnownStatus. + If the type is JSONPaths, user should specify the + jsonPaths field If the type is WellKnownStatus, + certain common fields of status defined by a rule + only for types in in k8s.io/api and open-cluster-management/api + will be reported, If these status fields do not + exist, no values will be reported. + enum: + - WellKnownStatus + - JSONPaths + type: string + required: + - type + type: object + type: array + resourceIdentifier: + description: ResourceIdentifier represents the group, resource, + name and namespace of a resoure. iff this refers to a + resource not created by this manifest work, the related + rules will not be executed. + properties: + group: + description: Group is the API Group of the Kubernetes + resource, empty string indicates it is in core group. + type: string + name: + description: Name is the name of the Kubernetes resource. + type: string + namespace: + description: Name is the namespace of the Kubernetes + resource, empty string indicates it is a cluster scoped + resource. + type: string + resource: + description: Resource is the resource name of the Kubernetes + resource. + type: string + required: + - name + - resource + type: object + updateStrategy: + description: UpdateStrategy defines the strategy to update + this manifest. UpdateStrategy is Update if it is not set. + properties: + serverSideApply: + description: serverSideApply defines the configuration + for server side apply. It is honored only when type + of updateStrategy is ServerSideApply + properties: + fieldManager: + default: work-agent + description: FieldManager is the manager to apply + the resource. It is work-agent by default, but + can be other name with work-agent as the prefix. + pattern: ^work-agent + type: string + force: + description: Force represents to force apply the + manifest. + type: boolean + type: object + type: + default: Update + description: type defines the strategy to update this + manifest, default value is Update. Update type means + to update resource by an update call. CreateOnly type + means do not update resource based on current manifest. + ServerSideApply type means to update resource using + server side apply with work-controller as the field + manager. If there is conflict, the related Applied + condition of manifest will be in the status of False + with the reason of ApplyConflict. + enum: + - Update + - CreateOnly + - ServerSideApply + type: string + required: + - type + type: object + required: + - resourceIdentifier + type: object + type: array + workload: + description: Workload represents the manifest workload to be deployed + on a managed cluster. + properties: + manifests: + description: Manifests represents a list of kuberenetes resources + to be deployed on a managed cluster. + items: + description: Manifest represents a resource to be deployed + on managed cluster. + type: object + x-kubernetes-embedded-resource: true + x-kubernetes-preserve-unknown-fields: true + type: array + type: object + type: object + placementRefs: + description: PacementRefs is a list of the names of the Placement + resource, from which a PlacementDecision will be found and used + to distribute the ManifestWork. + items: + description: localPlacementReference is the name of a Placement + resource in current namespace + properties: + name: + description: Name of the Placement resource in the current namespace + minLength: 1 + type: string + rolloutStrategy: + default: + all: + progressDeadline: None + type: All + description: Rollout strategy to apply workload to the selected + clusters by Placement and DecisionStrategy. + properties: + all: + description: All defines required fields for RolloutStrategy + type All + properties: + maxFailures: + anyOf: + - type: integer + - type: string + default: 0 + description: MaxFailures is a percentage or number of + clusters in the current rollout that can fail before + proceeding to the next rollout. Fail means the cluster + has a failed status or timeout status (does not reach + successful status after ProgressDeadline). Once the + MaxFailures is breached, the rollout will stop. MaxFailures + is only considered for rollout types Progressive and + ProgressivePerGroup. For Progressive, this is considered + over the total number of clusters. For ProgressivePerGroup, + this is considered according to the size of the current + group. For both Progressive and ProgressivePerGroup, + the MaxFailures does not apply for MandatoryDecisionGroups, + which tolerate no failures. Default is that no failures + are tolerated. + pattern: ^((100|[0-9]{1,2})%|[0-9]+)$ + x-kubernetes-int-or-string: true + minSuccessTime: + default: "0" + description: MinSuccessTime is a "soak" time. In other + words, the minimum amount of time the workload applier + controller will wait from the start of each rollout + before proceeding (assuming a successful state has + been reached and MaxFailures wasn't breached). MinSuccessTime + is only considered for rollout types Progressive and + ProgressivePerGroup. The default value is 0 meaning + the workload applier proceeds immediately after a + successful state is reached. MinSuccessTime must be + defined in [0-9h]|[0-9m]|[0-9s] format examples; 2h + , 90m , 360s + type: string + progressDeadline: + default: None + description: ProgressDeadline defines how long workload + applier controller will wait for the workload to reach + a successful state in the cluster. If the workload + does not reach a successful state after ProgressDeadline, + will stop waiting and workload will be treated as + "timeout" and be counted into MaxFailures. Once the + MaxFailures is breached, the rollout will stop. ProgressDeadline + default value is "None", meaning the workload applier + will wait for a successful state indefinitely. ProgressDeadline + 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 + progressive: + description: Progressive defines 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 + 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 + maxFailures: + anyOf: + - type: integer + - type: string + default: 0 + description: MaxFailures is a percentage or number of + clusters in the current rollout that can fail before + proceeding to the next rollout. Fail means the cluster + has a failed status or timeout status (does not reach + successful status after ProgressDeadline). Once the + MaxFailures is breached, the rollout will stop. MaxFailures + is only considered for rollout types Progressive and + ProgressivePerGroup. For Progressive, this is considered + over the total number of clusters. For ProgressivePerGroup, + this is considered according to the size of the current + group. For both Progressive and ProgressivePerGroup, + the MaxFailures does not apply for MandatoryDecisionGroups, + which tolerate no failures. Default is that no failures + are tolerated. + pattern: ^((100|[0-9]{1,2})%|[0-9]+)$ + x-kubernetes-int-or-string: true + minSuccessTime: + default: "0" + description: MinSuccessTime is a "soak" time. In other + words, the minimum amount of time the workload applier + controller will wait from the start of each rollout + before proceeding (assuming a successful state has + been reached and MaxFailures wasn't breached). MinSuccessTime + is only considered for rollout types Progressive and + ProgressivePerGroup. The default value is 0 meaning + the workload applier proceeds immediately after a + successful state is reached. MinSuccessTime must be + defined in [0-9h]|[0-9m]|[0-9s] format examples; 2h + , 90m , 360s + type: string + progressDeadline: + default: None + description: ProgressDeadline defines how long workload + applier controller will wait for the workload to reach + a successful state in the cluster. If the workload + does not reach a successful state after ProgressDeadline, + will stop waiting and workload will be treated as + "timeout" and be counted into MaxFailures. Once the + MaxFailures is breached, the rollout will stop. ProgressDeadline + default value is "None", meaning the workload applier + will wait for a successful state indefinitely. ProgressDeadline + 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 defines 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 + maxFailures: + anyOf: + - type: integer + - type: string + default: 0 + description: MaxFailures is a percentage or number of + clusters in the current rollout that can fail before + proceeding to the next rollout. Fail means the cluster + has a failed status or timeout status (does not reach + successful status after ProgressDeadline). Once the + MaxFailures is breached, the rollout will stop. MaxFailures + is only considered for rollout types Progressive and + ProgressivePerGroup. For Progressive, this is considered + over the total number of clusters. For ProgressivePerGroup, + this is considered according to the size of the current + group. For both Progressive and ProgressivePerGroup, + the MaxFailures does not apply for MandatoryDecisionGroups, + which tolerate no failures. Default is that no failures + are tolerated. + pattern: ^((100|[0-9]{1,2})%|[0-9]+)$ + x-kubernetes-int-or-string: true + minSuccessTime: + default: "0" + description: MinSuccessTime is a "soak" time. In other + words, the minimum amount of time the workload applier + controller will wait from the start of each rollout + before proceeding (assuming a successful state has + been reached and MaxFailures wasn't breached). MinSuccessTime + is only considered for rollout types Progressive and + ProgressivePerGroup. The default value is 0 meaning + the workload applier proceeds immediately after a + successful state is reached. MinSuccessTime must be + defined in [0-9h]|[0-9m]|[0-9s] format examples; 2h + , 90m , 360s + type: string + progressDeadline: + default: None + description: ProgressDeadline defines how long workload + applier controller will wait for the workload to reach + a successful state in the cluster. If the workload + does not reach a successful state after ProgressDeadline, + will stop waiting and workload will be treated as + "timeout" and be counted into MaxFailures. Once the + MaxFailures is breached, the rollout will stop. ProgressDeadline + default value is "None", meaning the workload applier + will wait for a successful state indefinitely. ProgressDeadline + 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: All + enum: + - All + - Progressive + - ProgressivePerGroup + type: string + type: object + required: + - name + type: object + minItems: 1 + type: array + required: + - placementRefs + type: object + status: + description: Status represent the current status of Placing ManifestWork + resources + properties: + conditions: + description: 'Conditions contains the different condition statuses + for distrbution of ManifestWork resources Valid condition types + are: 1. AppliedManifestWorks represents ManifestWorks have been + distributed as per placement All, Partial, None, Problem 2. PlacementRefValid' + items: + description: "Condition contains details for one aspect of the current + state of this API Resource. --- This struct is intended for direct + use as an array at the field path .status.conditions. For example, + \n type FooStatus struct{ // Represents the observations of a + foo's current state. // Known .status.conditions.type are: \"Available\", + \"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge + // +listType=map // +listMapKey=type Conditions []metav1.Condition + `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" + protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }" + properties: + lastTransitionTime: + description: lastTransitionTime is the last time the condition + transitioned from one status to another. This should be when + the underlying condition changed. If that is not known, then + using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: message is a human readable message indicating + details about the transition. This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: observedGeneration represents the .metadata.generation + that the condition was set based upon. For instance, if .metadata.generation + is currently 12, but the .status.conditions[x].observedGeneration + is 9, the condition is out of date with respect to the current + state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: reason contains a programmatic identifier indicating + the reason for the condition's last transition. Producers + of specific condition types may define expected values and + meanings for this field, and whether the values are considered + a guaranteed API. The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + --- Many .condition.type values are consistent across resources + like Available, but because arbitrary conditions can be useful + (see .node.status.conditions), the ability to deconflict is + important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) + 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])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + type: array + placementSummary: + description: PlacementRef Summary + items: + description: PlacementSummary provides info regards number of clusters + and clusterGroups selected by the placement refs. + properties: + availableDecisionGroups: + description: availableDecisionGroups shows number of decisionGroups + that have all clusters manifestWorks in available state regards + total number of decisionGroups. ex; 2/4 (2 out of 4) + type: string + name: + description: PlacementRef Name + type: string + summary: + description: Summary totals of resulting ManifestWorks for the + placement + properties: + Applied: + description: 'Applied is the number of ManifestWorks with + condition Applied: true' + type: integer + available: + description: 'Available is the number of ManifestWorks with + condition Available: true' + type: integer + degraded: + description: 'TODO: Degraded is the number of ManifestWorks + with condition Degraded: true' + type: integer + progressing: + description: 'TODO: Progressing is the number of ManifestWorks + with condition Progressing: true' + type: integer + total: + description: Total number of ManifestWorks managed by the + ManifestWorkReplicaSet + type: integer + type: object + type: object + type: array + summary: + description: Summary totals of resulting ManifestWorks for all placements + properties: + Applied: + description: 'Applied is the number of ManifestWorks with condition + Applied: true' + type: integer + available: + description: 'Available is the number of ManifestWorks with condition + Available: true' + type: integer + degraded: + description: 'TODO: Degraded is the number of ManifestWorks with + condition Degraded: true' + type: integer + progressing: + description: 'TODO: Progressing is the number of ManifestWorks + with condition Progressing: true' + type: integer + total: + description: Total number of ManifestWorks managed by the ManifestWorkReplicaSet + type: integer + type: object + type: object + type: object + served: true + storage: true + subresources: + status: {} diff --git a/charts/cluster-auth-manager/templates/k8s/addon.yaml b/charts/cluster-auth-manager/templates/k8s/addon.yaml index 030c2c0a..8a460d5f 100644 --- a/charts/cluster-auth-manager/templates/k8s/addon.yaml +++ b/charts/cluster-auth-manager/templates/k8s/addon.yaml @@ -1,18 +1,18 @@ {{- if not .Values.kubeconfigSecretName }} -{{- $restpl := $.Files.Get "common/addon/clustermanagementaddon.yaml" -}} +{{- $restpl := $.Files.Get "common/addon/clustermanagementaddon.yaml" }} {{ tpl $restpl $ }} --- -{{- $restpl := $.Files.Get "common/addon/clustersetbinding.yaml" -}} +{{- $restpl := $.Files.Get "common/addon/clustersetbinding.yaml" }} {{ tpl $restpl $ }} --- -{{- $restpl := $.Files.Get "common/addon/placement.yaml" -}} +{{- $restpl := $.Files.Get "common/addon/placement.yaml" }} {{ tpl $restpl $ }} --- -{{- $restpl := $.Files.Get "common/work-agent/perm.yaml" -}} +{{- $restpl := $.Files.Get "common/work-agent/perm.yaml" }} {{ tpl $restpl $ }} --- -{{- $restpl := $.Files.Get "common/gateway_cluster_role.yaml" -}} +{{- $restpl := $.Files.Get "common/gateway_cluster_role.yaml" }} {{ tpl $restpl $ }} {{- end }} diff --git a/charts/cluster-gateway-manager/templates/k8s/addon.yaml b/charts/cluster-gateway-manager/templates/k8s/addon.yaml index e68d3952..c1c2f2a7 100644 --- a/charts/cluster-gateway-manager/templates/k8s/addon.yaml +++ b/charts/cluster-gateway-manager/templates/k8s/addon.yaml @@ -1,15 +1,15 @@ {{- if not .Values.kubeconfigSecretName }} -{{- $restpl := $.Files.Get "common/addon/clustermanagementaddon.yaml" -}} +{{- $restpl := $.Files.Get "common/addon/clustermanagementaddon.yaml" }} {{ tpl $restpl $ }} --- -{{- $restpl := $.Files.Get "common/addon/clustersetbinding.yaml" -}} +{{- $restpl := $.Files.Get "common/addon/clustersetbinding.yaml" }} {{ tpl $restpl $ }} --- -{{- $restpl := $.Files.Get "common/addon/placement.yaml" -}} +{{- $restpl := $.Files.Get "common/addon/placement.yaml" }} {{ tpl $restpl $ }} --- -{{- $restpl := $.Files.Get "common/addon/clustergatewayconfiguration.yaml" -}} +{{- $restpl := $.Files.Get "common/addon/clustergatewayconfiguration.yaml" }} {{ tpl $restpl $ }} {{- end }} diff --git a/charts/cluster-proxy-manager/templates/k8s/addon.yaml b/charts/cluster-proxy-manager/templates/k8s/addon.yaml index ccdcc931..b10bdfd9 100644 --- a/charts/cluster-proxy-manager/templates/k8s/addon.yaml +++ b/charts/cluster-proxy-manager/templates/k8s/addon.yaml @@ -1,9 +1,9 @@ {{- if not .Values.kubeconfigSecretName }} -{{- $restpl := $.Files.Get "common/addon/clustermanagementaddon.yaml" -}} +{{- $restpl := $.Files.Get "common/addon/clustermanagementaddon.yaml" }} {{ tpl $restpl $ }} --- -{{- $restpl := $.Files.Get "common/addon/managedproxyconfiguration.yaml" -}} +{{- $restpl := $.Files.Get "common/addon/managedproxyconfiguration.yaml" }} {{ tpl $restpl $ }} {{- end }} diff --git a/charts/fluxcd-manager/Chart.yaml b/charts/fluxcd-manager/Chart.yaml index 25054137..bbefbad3 100644 --- a/charts/fluxcd-manager/Chart.yaml +++ b/charts/fluxcd-manager/Chart.yaml @@ -1,6 +1,12 @@ -apiVersion: v1 +apiVersion: v2 name: fluxcd-manager description: Installs FluxCD in managed clusters type: application version: v2024.2.25 appVersion: "v0.0.2" +home: https://open-cluster-management.io +sources: +- https://github.com/kluster-manager/installer +maintainers: +- name: appscode + email: support@appscode.com diff --git a/charts/fluxcd-manager/templates/k8s/addon.yaml b/charts/fluxcd-manager/templates/k8s/addon.yaml index 2167b764..67210efe 100644 --- a/charts/fluxcd-manager/templates/k8s/addon.yaml +++ b/charts/fluxcd-manager/templates/k8s/addon.yaml @@ -1,15 +1,15 @@ {{- if not .Values.kubeconfigSecretName }} -{{- $restpl := $.Files.Get "common/addon/clustermanagementaddon.yaml" -}} +{{- $restpl := $.Files.Get "common/addon/clustermanagementaddon.yaml" }} {{ tpl $restpl $ }} --- -{{- $restpl := $.Files.Get "common/addon/clustersetbinding.yaml" -}} +{{- $restpl := $.Files.Get "common/addon/clustersetbinding.yaml" }} {{ tpl $restpl $ }} --- -{{- $restpl := $.Files.Get "common/addon/fluxcd_config.yaml" -}} +{{- $restpl := $.Files.Get "common/addon/fluxcd_config.yaml" }} {{ tpl $restpl $ }} --- -{{- $restpl := $.Files.Get "common/addon/placement.yaml" -}} +{{- $restpl := $.Files.Get "common/addon/placement.yaml" }} {{ tpl $restpl $ }} {{- end }} diff --git a/charts/managed-serviceaccount-manager/templates/k8s/addon.yaml b/charts/managed-serviceaccount-manager/templates/k8s/addon.yaml index 00b50ed0..c4951868 100644 --- a/charts/managed-serviceaccount-manager/templates/k8s/addon.yaml +++ b/charts/managed-serviceaccount-manager/templates/k8s/addon.yaml @@ -1,12 +1,12 @@ {{- if not .Values.kubeconfigSecretName }} -{{- $restpl := $.Files.Get "common/addon/clustermanagementaddon.yaml" -}} +{{- $restpl := $.Files.Get "common/addon/clustermanagementaddon.yaml" }} {{ tpl $restpl $ }} --- -{{- $restpl := $.Files.Get "common/addon/clustersetbinding.yaml" -}} +{{- $restpl := $.Files.Get "common/addon/clustersetbinding.yaml" }} {{ tpl $restpl $ }} --- -{{- $restpl := $.Files.Get "common/addon/placement.yaml" -}} +{{- $restpl := $.Files.Get "common/addon/placement.yaml" }} {{ tpl $restpl $ }} {{- end }} diff --git a/hack/scripts/ct.sh b/hack/scripts/ct.sh index 0a57b5a4..a3e00781 100755 --- a/hack/scripts/ct.sh +++ b/hack/scripts/ct.sh @@ -21,12 +21,21 @@ for dir in charts/*/; do dir=${dir##*/} num_files=$(find charts/${dir}/templates -type f | wc -l) echo $dir - if [ $num_files -le 1 ]; then + if [ $num_files -le 1 ] || + [[ "$dir" = "cluster-gateway" ]] || + [[ "$dir" = "cluster-manager-hub" ]] || + [[ "$dir" = "multicluster-controlplane" ]]; then make ct CT_COMMAND=lint TEST_CHARTS=charts/$dir + elif [[ "$dir" = "cluster-manager-spoke" ]]; then + kubectl apply -f charts/cluster-manager-spoke/crds + helm install cluster-manager-spoke charts/cluster-manager-spoke \ + --set hub.kubeConfig=abc \ + --set clusterName=abc \ + --dry-run=server else ns=app-$(date +%s | head -c 6) kubectl create ns $ns - kubectl label ns $ns pod-security.kubernetes.io/enforce=restricted + # kubectl label ns $ns pod-security.kubernetes.io/enforce=restricted make ct TEST_CHARTS=charts/$dir KUBE_NAMESPACE=$ns kubectl delete ns $ns || true fi diff --git a/hack/scripts/import-crds.sh b/hack/scripts/import-crds.sh index 77338794..58af2b5f 100755 --- a/hack/scripts/import-crds.sh +++ b/hack/scripts/import-crds.sh @@ -31,6 +31,7 @@ crd-importer \ --input=https://github.com/open-cluster-management-io/api/raw/${OPEN_CLUSTER_MANAGEMENT_IO_API_TAG}/addon/v1alpha1/0000_00_addon.open-cluster-management.io_clustermanagementaddons.crd.yaml \ --input=https://github.com/open-cluster-management-io/api/raw/${OPEN_CLUSTER_MANAGEMENT_IO_API_TAG}/cluster/v1beta1/0000_02_clusters.open-cluster-management.io_placements.crd.yaml \ --input=https://github.com/open-cluster-management-io/api/raw/${OPEN_CLUSTER_MANAGEMENT_IO_API_TAG}/cluster/v1beta2/0000_01_clusters.open-cluster-management.io_managedclustersetbindings.crd.yaml \ + --input=https://github.com/open-cluster-management-io/api/raw/${OPEN_CLUSTER_MANAGEMENT_IO_API_TAG}/work/v1alpha1/0000_00_work.open-cluster-management.io_manifestworkreplicasets.crd.yaml \ --out=./charts/cluster-auth-manager/crds crd-importer \