A Kubernetes Hasura instance.
import { Hasura } from 'cdk8s-hasura'
new Hasura(scope: Construct, id: string, props: HasuraProps)
Name | Type | Description |
---|---|---|
scope |
constructs.Construct |
No description. |
id |
string |
No description. |
props |
HasuraProps |
No description. |
- Type: constructs.Construct
- Type: string
- Type: HasuraProps
Name | Description |
---|---|
toString |
Returns a string representation of this construct. |
public toString(): string
Returns a string representation of this construct.
Name | Description |
---|---|
isConstruct |
Checks if x is a construct. |
import { Hasura } from 'cdk8s-hasura'
Hasura.isConstruct(x: any)
Checks if x
is a construct.
Use this method instead of instanceof
to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs
library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct
in each copy of the constructs
library
is seen as a different class, and an instance of one class will not test as
instanceof
the other class. npm install
will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof
will behave
unpredictably. It is safest to avoid using instanceof
, and using
this type-testing method instead.
- Type: any
Any object.
Name | Type | Description |
---|---|---|
node |
constructs.Node |
The tree node. |
config |
cdk8s-plus-28.ConfigMap |
No description. |
deployment |
cdk8s-plus-28.Deployment |
No description. |
secret |
cdk8s-plus-28.Secret |
No description. |
service |
cdk8s-plus-28.Service |
No description. |
public readonly node: Node;
- Type: constructs.Node
The tree node.
public readonly config: ConfigMap;
- Type: cdk8s-plus-28.ConfigMap
public readonly deployment: Deployment;
- Type: cdk8s-plus-28.Deployment
public readonly secret: Secret;
- Type: cdk8s-plus-28.Secret
public readonly service: Service;
- Type: cdk8s-plus-28.Service
import { HasuraProps } from 'cdk8s-hasura'
const hasuraProps: HasuraProps = { ... }
Name | Type | Description |
---|---|---|
adminSecret |
string |
Secret passphrase used to authenticate the admin user with the Hasura instance. |
database |
string |
The name of the Postgres Database. |
host |
string |
The host of the Postgres database. |
postgresPassword |
cdk8s-plus-28.EnvValue |
Env variable for the Postgres password. |
postgresUsername |
cdk8s-plus-28.EnvValue |
Env variable for the Postgres username. |
enableConsole |
boolean |
Enable the web UI for Hasura. |
image |
string |
No description. |
labels |
{[ key: string ]: string} |
Labels to apply to all Hasura resources. |
logLevel |
string |
Log level for Hasura. |
namespace |
string |
Namespace to apply to all Hasura resources. |
public readonly adminSecret: string;
- Type: string
Secret passphrase used to authenticate the admin user with the Hasura instance.
public readonly database: string;
- Type: string
The name of the Postgres Database.
public readonly host: string;
- Type: string
The host of the Postgres database.
public readonly postgresPassword: EnvValue;
- Type: cdk8s-plus-28.EnvValue
Env variable for the Postgres password.
public readonly postgresUsername: EnvValue;
- Type: cdk8s-plus-28.EnvValue
Env variable for the Postgres username.
public readonly enableConsole: boolean;
- Type: boolean
- Default: true
Enable the web UI for Hasura.
public readonly image: string;
- Type: string
- Default: 'hasura/graphql-engine:latest'
public readonly labels: {[ key: string ]: string};
- Type: {[ key: string ]: string}
- Default: { app: "hasura" }
Labels to apply to all Hasura resources.
public readonly logLevel: string;
- Type: string
- Default: info
Log level for Hasura.
Possible values are: "debug", "info", "warn", "error".
public readonly namespace: string;
- Type: string
- Default: undefined (will be assigned to the 'default' namespace)
Namespace to apply to all Hasura resources.
The Postgres instance must be created in this namespace so that they may connect.