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

Rollups Operator #45

Open
wants to merge 1 commit into
base: feature/machine-download
Choose a base branch
from
Open

Conversation

tuler
Copy link
Member

@tuler tuler commented Aug 16, 2023

Introduces a operator implemented in typescript that will watch a CRD for rollups applications, and create the necessary infrastructure of a rollups node for that application.

We need to create a helm that will install the CRD, which should follow the definition below:

---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
    name: applications.rollups.cartesi.io
spec:
    group: rollups.cartesi.io
    names:
        kind: Application
        listKind: ApplicationList
        plural: applications
        singular: application
    scope: Namespaced
    versions:
        - name: v1
          schema:
              openAPIV3Schema:
                  description: Application is the Schema for the applications API
                  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
                      status:
                          description: Status defines the observed state of DApp
                          type: object
                      metadata:
                          type: object
                      spec:
                          description: Spec defines the desired state of DApp
                          type: object
                          properties:
                              address:
                                  description: Address of the application
                                  type: string
                              blockHash:
                                  description: Block hash of the block which deployed the application
                                  type: string
                              blockNumber:
                                  description: Block number of the block which deployed the application
                                  type: string
                              transactionHash:
                                  description: Transaction hash of the transaction which deployed the application
                                  type: string
                              location:
                                  description: Location of the cartesi machine snapshot
                                  type: string
                  type: object
          served: true
          storage: true
          subresources:
              status: {}

@tuler tuler changed the base branch from main to feature/machine-download August 16, 2023 16:46
@endersonmaia
Copy link
Collaborator

We need to create a helm that will install the CRD, which should follow the definition below:

Working on it at #41

@tuler tuler force-pushed the feature/operator branch 2 times, most recently from a7b6c34 to b0fc080 Compare August 22, 2023 19:50
@endersonmaia
Copy link
Collaborator

I'm changing the helm-chart for the rollups-node so that we have 1 Pod per Service. This way I think it's easier to manage the templates.

Also, we should consider using something like https://kosko.dev/docs/components/loading-helm-chart , even if only at build time to load the manifests, instead of maintaining a copy of the templates in TypeScript code.

@tuler tuler force-pushed the feature/machine-download branch 2 times, most recently from 74b072e to 68cdea1 Compare October 4, 2023 02:37
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.

2 participants