pub struct AppService {
pub args: Option<Option<Vec<String>>>,
pub command: Option<Option<Vec<String>>>,
pub env: Option<Option<Vec<EnvVar>>>,
pub image: String,
pub metrics: Option<Option<Box<AppMetrics>>>,
pub middlewares: Option<Option<Vec<Middleware>>>,
pub name: String,
pub probes: Option<Option<Box<Probes>>>,
pub resources: Option<Box<ResourceRequirements>>,
pub routing: Option<Option<Vec<Routing>>>,
pub storage: Option<Option<Box<StorageConfig>>>,
}Expand description
AppService : AppService significantly extends the functionality of your Tembo Postgres instance by running tools and software built by the Postgres open source community. Example: This will configure and install a Postgrest container along side the Postgres instance, install pg_graphql extension, and configure the ingress routing to expose the Postgrest service. yaml apiVersion: coredb.io/v1alpha1 kind: CoreDB metadata: name: test-db spec: trunk_installs: - name: pg_graphql version: 1.2.0 extensions: - name: pg_graphql locations: - database: postgres enabled: true appServices: - name: postgrest image: postgrest/postgrest:v10.0.0 routing: # only expose /rest/v1 and /graphql/v1 - port: 3000 ingressPath: /rest/v1 middlewares: - my-headers - port: 3000 ingressPath: /graphql/v1 middlewares: - map-gql - my-headers middlewares: - customRequestHeaders: name: my-headers config: # removes auth header from request Authorization: \"\" Content-Profile: graphql Accept-Profile: graphql - stripPrefix: name: my-strip-prefix config: - /rest/v1 # reroute gql and rest requests - replacePathRegex: name: map-gql config: regex: /graphql/v1/? replacement: /rpc/resolve env: - name: PGRST_DB_URI valueFromPlatform: ReadWriteConnection - name: PGRST_DB_SCHEMA value: \"public, graphql\" - name: PGRST_DB_ANON_ROLE value: postgres - name: PGRST_LOG_LEVEL value: info
Fields§
§args: Option<Option<Vec<String>>>Defines the arguments to pass into the container if needed. You define this in the same manner as you would for all Kubernetes containers. See the Kubernetes docs.
command: Option<Option<Vec<String>>>Defines the command into the container if needed. You define this in the same manner as you would for all Kubernetes containers. See the Kubernetes docs.
env: Option<Option<Vec<EnvVar>>>Defines the environment variables to pass into the container if needed. You define this in the same manner as you would for all Kubernetes containers. See the Kubernetes docs.
image: StringDefines the container image to use for the appService.
metrics: Option<Option<Box<AppMetrics>>>§middlewares: Option<Option<Vec<Middleware>>>Defines the ingress middeware configuration for the appService. This is specifically configured for the ingress controller Traefik.
name: StringDefines the name of the appService.
probes: Option<Option<Box<Probes>>>§resources: Option<Box<ResourceRequirements>>§routing: Option<Option<Vec<Routing>>>Defines the routing configuration for the appService.
storage: Option<Option<Box<StorageConfig>>>Implementations§
Source§impl AppService
impl AppService
Sourcepub fn new(image: String, name: String) -> AppService
pub fn new(image: String, name: String) -> AppService
AppService significantly extends the functionality of your Tembo Postgres instance by running tools and software built by the Postgres open source community. Example: This will configure and install a Postgrest container along side the Postgres instance, install pg_graphql extension, and configure the ingress routing to expose the Postgrest service. yaml apiVersion: coredb.io/v1alpha1 kind: CoreDB metadata: name: test-db spec: trunk_installs: - name: pg_graphql version: 1.2.0 extensions: - name: pg_graphql locations: - database: postgres enabled: true appServices: - name: postgrest image: postgrest/postgrest:v10.0.0 routing: # only expose /rest/v1 and /graphql/v1 - port: 3000 ingressPath: /rest/v1 middlewares: - my-headers - port: 3000 ingressPath: /graphql/v1 middlewares: - map-gql - my-headers middlewares: - customRequestHeaders: name: my-headers config: # removes auth header from request Authorization: \"\" Content-Profile: graphql Accept-Profile: graphql - stripPrefix: name: my-strip-prefix config: - /rest/v1 # reroute gql and rest requests - replacePathRegex: name: map-gql config: regex: /graphql/v1/? replacement: /rpc/resolve env: - name: PGRST_DB_URI valueFromPlatform: ReadWriteConnection - name: PGRST_DB_SCHEMA value: \"public, graphql\" - name: PGRST_DB_ANON_ROLE value: postgres - name: PGRST_LOG_LEVEL value: info
Trait Implementations§
Source§impl Clone for AppService
impl Clone for AppService
Source§fn clone(&self) -> AppService
fn clone(&self) -> AppService
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more