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

support custom resource #10

Merged
merged 2 commits into from
Dec 7, 2021
Merged

Conversation

Iceber
Copy link
Member

@Iceber Iceber commented Dec 6, 2021

When collecting custom resources, you need to specify the version to be synchronized.
eg.

    resources:
    - group: apps
      resources:
      - deployments
    - group: cert-manager.io
      resources:
      - issuers
      versions:
      - v1
      - v1beta1
      - v1alpha2

If no version is specified, then the top three versions of the priority order in the member cluster will be synchronized by default.

  status:
    resources:
    - group: cert-manager.io
      resources:
      - kind: Issuer
        namespaced: true
        resource: issuers
        syncConditions:
        - lastTransitionTime: "2021-12-07T02:14:21Z"
          status: Syncing
          storageVersion: v1
          version: v1
        - lastTransitionTime: "2021-12-07T03:57:08Z"
          status: Syncing
          storageVersion: v1beta1
          version: v1beta1
        - lastTransitionTime: "2021-12-07T03:57:08Z"
          status: Syncing
          storageVersion: v1alpha3
          version: v1alpha3

@Iceber Iceber force-pushed the customresource branch 4 times, most recently from 4a85386 to ab77bf9 Compare December 7, 2021 03:04
@Iceber Iceber changed the title [WIP] support custom resource support custom resource Dec 7, 2021
@Iceber
Copy link
Member Author

Iceber commented Dec 7, 2021

Since different versions may exist in different clusters, and the conversion strategy between these versions may also be Webhook, redundant data is saved if multiple versions are synchronized.

In the next stage, the versions of custom resources in different clusters are reconciled in the clustersynchro manager by watching for the CRD resources.

If there is an intersection between the versions of custom resources between clusters and the conversion strategy is None, then only one version needs to be synchronized in the cluster and saved as the same version.

if the conversion strategy for a custom resource between clusters is Webhook, then it falls back to the default synchronization policy

@Iceber Iceber mentioned this pull request Dec 7, 2021
3 tasks
@Iceber Iceber merged commit 367055a into clusterpedia-io:main Dec 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants