mirror of
https://github.com/hanzoai/nchain.git
synced 2026-11-03 01:53:21 +00:00
Regenerate zz_generated deepcopy (controller-gen object) and config/crd/bases
(controller-gen crd) so the merged NodeCluster/Indexer/Explorer/Gateway spec
fields land in the API. Converge the Explorer indexer endpoint onto the
Indexer Service (name={indexer.Name}, port=indexerPortDefault 8091) instead of
the stale {name}-indexer:4000, and update the test.
425 lines
18 KiB
YAML
425 lines
18 KiB
YAML
---
|
|
apiVersion: apiextensions.k8s.io/v1
|
|
kind: CustomResourceDefinition
|
|
metadata:
|
|
annotations:
|
|
controller-gen.kubebuilder.io/version: v0.18.0
|
|
name: indexers.nchain.hanzo.ai
|
|
spec:
|
|
group: nchain.hanzo.ai
|
|
names:
|
|
kind: Indexer
|
|
listKind: IndexerList
|
|
plural: indexers
|
|
shortNames:
|
|
- idx
|
|
singular: indexer
|
|
scope: Namespaced
|
|
versions:
|
|
- additionalPrinterColumns:
|
|
- jsonPath: .spec.chainRef
|
|
name: Chain
|
|
type: string
|
|
- jsonPath: .status.phase
|
|
name: Phase
|
|
type: string
|
|
- jsonPath: .status.indexedHeight
|
|
name: Height
|
|
type: integer
|
|
- jsonPath: .status.readyReplicas
|
|
name: Ready
|
|
type: integer
|
|
- jsonPath: .metadata.creationTimestamp
|
|
name: Age
|
|
type: date
|
|
name: v1alpha1
|
|
schema:
|
|
openAPIV3Schema:
|
|
description: |-
|
|
Indexer is the Schema for the indexers API.
|
|
It deploys a blockchain data indexer for a specific Chain.
|
|
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: IndexerSpec defines the desired state of a blockchain data
|
|
indexer.
|
|
properties:
|
|
chainRef:
|
|
description: ChainRef is the name of the Chain to index.
|
|
type: string
|
|
contractVerification:
|
|
default: true
|
|
description: ContractVerification enables contract source verification.
|
|
type: boolean
|
|
defiIndexing:
|
|
description: DefiIndexing enables DeFi protocol indexing (AMM, lending,
|
|
staking).
|
|
type: boolean
|
|
image:
|
|
description: Image for the indexer container.
|
|
properties:
|
|
pullPolicy:
|
|
default: IfNotPresent
|
|
description: PullPolicy defines when to pull the image.
|
|
enum:
|
|
- Always
|
|
- IfNotPresent
|
|
- Never
|
|
type: string
|
|
repository:
|
|
description: Repository is the container image repository.
|
|
type: string
|
|
tag:
|
|
default: latest
|
|
description: Tag is the container image tag.
|
|
type: string
|
|
required:
|
|
- repository
|
|
type: object
|
|
ingress:
|
|
description: Ingress configures external access to the indexer API.
|
|
properties:
|
|
annotations:
|
|
additionalProperties:
|
|
type: string
|
|
description: Annotations are additional annotations applied to
|
|
the Ingress resource.
|
|
type: object
|
|
clusterIssuer:
|
|
default: letsencrypt-prod
|
|
description: ClusterIssuer is the cert-manager ClusterIssuer to
|
|
use for TLS certificates.
|
|
type: string
|
|
enabled:
|
|
description: Enabled controls whether an Ingress resource is created.
|
|
type: boolean
|
|
hosts:
|
|
description: Hosts lists the hostnames for the Ingress.
|
|
items:
|
|
type: string
|
|
type: array
|
|
ingressClassName:
|
|
default: ingress
|
|
description: IngressClassName specifies the Ingress class to use.
|
|
type: string
|
|
tls:
|
|
default: true
|
|
description: TLS enables TLS termination on the Ingress.
|
|
type: boolean
|
|
type: object
|
|
nftIndexing:
|
|
description: NFTIndexing enables NFT indexing.
|
|
type: boolean
|
|
nodeClusterRef:
|
|
description: NodeClusterRef is the name of the NodeCluster to connect
|
|
to for chain data.
|
|
type: string
|
|
pollInterval:
|
|
default: 2
|
|
description: PollInterval is the block polling interval in seconds.
|
|
format: int32
|
|
minimum: 1
|
|
type: integer
|
|
port:
|
|
default: 8091
|
|
description: |-
|
|
Port is the HTTP API port the indexer serves. The canonical
|
|
ghcr.io/luxfi/indexer image listens on 8091.
|
|
format: int32
|
|
maximum: 65535
|
|
minimum: 1
|
|
type: integer
|
|
replicas:
|
|
default: 1
|
|
description: Replicas is the number of indexer instances.
|
|
format: int32
|
|
minimum: 1
|
|
type: integer
|
|
replication:
|
|
description: |-
|
|
Replication configures native streaming replication of the embedded
|
|
SQLite store to object storage for high availability and fast restore.
|
|
properties:
|
|
ageIdentitySecret:
|
|
description: AgeIdentitySecret is a Secret holding the age identity
|
|
for restore.
|
|
type: string
|
|
ageRecipient:
|
|
description: AgeRecipient (age public key) enables client-side
|
|
snapshot encryption.
|
|
type: string
|
|
credentialsSecret:
|
|
description: CredentialsSecret is a Secret with REPLICATE_S3_ACCESS_KEY
|
|
/ _SECRET_KEY.
|
|
type: string
|
|
enabled:
|
|
description: Enabled toggles replication.
|
|
type: boolean
|
|
incrementalIntervalSeconds:
|
|
description: IncrementalIntervalSeconds between incrementals.
|
|
Defaults to 5.
|
|
format: int64
|
|
type: integer
|
|
s3Bucket:
|
|
description: S3Bucket holds replication objects. Defaults to "replicate".
|
|
type: string
|
|
s3Endpoint:
|
|
description: S3Endpoint is the S3-compatible object-store endpoint.
|
|
type: string
|
|
s3Path:
|
|
description: S3Path is the key prefix for replication objects.
|
|
type: string
|
|
s3Region:
|
|
description: S3Region is the object-store region.
|
|
type: string
|
|
s3UseSsl:
|
|
description: S3UseSSL enables TLS to the object store.
|
|
type: boolean
|
|
snapshotIntervalSeconds:
|
|
description: SnapshotIntervalSeconds between full snapshots. Defaults
|
|
to 3600.
|
|
format: int64
|
|
type: integer
|
|
type: object
|
|
resources:
|
|
description: Resources (CPU/memory) for the indexer container.
|
|
properties:
|
|
limits:
|
|
additionalProperties:
|
|
anyOf:
|
|
- type: integer
|
|
- type: string
|
|
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
|
|
x-kubernetes-int-or-string: true
|
|
description: Limits describes the maximum amount of compute resources
|
|
allowed.
|
|
type: object
|
|
requests:
|
|
additionalProperties:
|
|
anyOf:
|
|
- type: integer
|
|
- type: string
|
|
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
|
|
x-kubernetes-int-or-string: true
|
|
description: Requests describes the minimum amount of compute
|
|
resources required.
|
|
type: object
|
|
type: object
|
|
rpcEndpoint:
|
|
description: |-
|
|
RPCEndpoint overrides the auto-discovered chain JSON-RPC endpoint.
|
|
When empty it is derived from the referenced NodeCluster headless service.
|
|
type: string
|
|
seedRestore:
|
|
description: |-
|
|
SeedRestore restores the embedded store from an object-store snapshot on
|
|
first boot via a marker-gated init container.
|
|
properties:
|
|
enabled:
|
|
description: Enabled toggles seed restoration.
|
|
type: boolean
|
|
markerPath:
|
|
description: MarkerPath tracks completion. Defaults to /data/.seeded.
|
|
type: string
|
|
objectStoreUrl:
|
|
description: ObjectStoreURL is the snapshot tarball URL when SourceType=ObjectStore.
|
|
type: string
|
|
restorePolicy:
|
|
description: 'RestorePolicy controls when to restore: IfNotSeeded
|
|
(default) or Always.'
|
|
type: string
|
|
sourceType:
|
|
description: |-
|
|
SourceType selects the restore mechanism. Only "ObjectStore" is handled
|
|
at the init-container layer.
|
|
type: string
|
|
type: object
|
|
snapshots:
|
|
description: Snapshots configures S3-based snapshots for the indexer
|
|
data.
|
|
properties:
|
|
bucket:
|
|
description: Bucket is the target bucket.
|
|
type: string
|
|
credentialsSecret:
|
|
description: CredentialsSecret references a Secret with S3 credentials.
|
|
type: string
|
|
endpoint:
|
|
description: Endpoint is the S3-compatible endpoint.
|
|
type: string
|
|
retentionCount:
|
|
default: 5
|
|
description: RetentionCount is the number of snapshots to retain.
|
|
format: int32
|
|
minimum: 1
|
|
type: integer
|
|
schedule:
|
|
description: Schedule is a cron expression for snapshot frequency.
|
|
type: string
|
|
type: object
|
|
storage:
|
|
description: Storage configures persistent storage for index data.
|
|
properties:
|
|
retentionPolicy:
|
|
allOf:
|
|
- enum:
|
|
- Retain
|
|
- Delete
|
|
- enum:
|
|
- Retain
|
|
- Delete
|
|
default: Retain
|
|
description: |-
|
|
RetentionPolicy determines whether the PVC is retained or deleted
|
|
when the parent resource is removed.
|
|
type: string
|
|
size:
|
|
anyOf:
|
|
- type: integer
|
|
- type: string
|
|
description: Size is the requested storage capacity.
|
|
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
|
|
x-kubernetes-int-or-string: true
|
|
storageClassName:
|
|
default: do-block-storage
|
|
description: StorageClassName specifies the Kubernetes StorageClass
|
|
to use.
|
|
type: string
|
|
required:
|
|
- size
|
|
type: object
|
|
traceEnabled:
|
|
default: true
|
|
description: TraceEnabled enables internal transaction tracing.
|
|
type: boolean
|
|
wsEndpoint:
|
|
description: |-
|
|
WSEndpoint overrides the auto-discovered chain WebSocket endpoint.
|
|
When empty it is derived from the referenced NodeCluster headless service.
|
|
type: string
|
|
required:
|
|
- chainRef
|
|
- image
|
|
- nodeClusterRef
|
|
type: object
|
|
status:
|
|
description: IndexerStatus defines the observed state of Indexer.
|
|
properties:
|
|
apiEndpoint:
|
|
description: APIEndpoint is the in-cluster URL of the indexer HTTP
|
|
API.
|
|
type: string
|
|
chainHeight:
|
|
description: ChainHeight is the latest block height reported by the
|
|
chain RPC.
|
|
format: int64
|
|
type: integer
|
|
conditions:
|
|
description: Conditions represent the latest observations of the indexer's
|
|
state.
|
|
items:
|
|
description: Condition contains details for one aspect of the current
|
|
state of this API Resource.
|
|
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.
|
|
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
|
|
databaseReady:
|
|
description: DatabaseReady indicates whether the indexer's embedded
|
|
store is ready.
|
|
type: boolean
|
|
indexedHeight:
|
|
description: IndexedHeight is the latest indexed block height.
|
|
format: int64
|
|
type: integer
|
|
observedGeneration:
|
|
description: ObservedGeneration is the most recent generation observed
|
|
by the controller.
|
|
format: int64
|
|
type: integer
|
|
phase:
|
|
description: Phase is the current lifecycle phase.
|
|
enum:
|
|
- Pending
|
|
- Creating
|
|
- Bootstrapping
|
|
- Running
|
|
- Degraded
|
|
- Deleting
|
|
type: string
|
|
readyReplicas:
|
|
description: ReadyReplicas is the number of indexer replicas that
|
|
are ready.
|
|
format: int32
|
|
type: integer
|
|
type: object
|
|
type: object
|
|
served: true
|
|
storage: true
|
|
subresources:
|
|
status: {}
|